omnight / phonehook

12 stars 8 forks source link

[android] Can't see any "available data sources" #28

Closed ahjolinna closed 7 years ago

ahjolinna commented 7 years ago

I just installed phonehook on my Xperia Z3+ using android 7.0, and everytime I open it I get a pop that says I should add some data sources to get started, and I press "okay" I just get an empty "available sources" page everytime

I should also add that I use Telia (just changed their name from Sonera) and I live in Finland...if this info matters

ps. I loved this app when I use it on my Jolla phone, I hope I can use sailfishOS again when the Xperia X phones arrives with SailfishOS

omnight commented 7 years ago

Hi!

There is currently an issue with Android 7 that causes the app not to be able to establish SSL connections (so it can't download anything from https), I have a fix in the works, but running the app in the emulator causes a crash, even though it seems to work ok with my Android 6.0 test phone. If you are interested in trying out an alpha apk-file (which may or may not work) I can send it to you.

ahjolinna commented 7 years ago

@omnight : well that sucks, but then again many phone manufacturers are really slow to update android if they even bother, so this wont be a problem for many... anyway sure I can test the alpha build, sounds like fun

PS. have you heard about clazy? it checks for "inefficient Qt coding mistakes"

omnight commented 7 years ago

I might have to delay that alpha build a bit, did some more testing and it seems the SSL-lib changes are causing new crashes. The problem is that Android 7 doesn't ship with SSL binaries that Qt can use, and Qt does not include any due to licensing issues, so now you have to compile your own.

I haven't heard about clazy, but I will check it out once my app is actually working again :)

ahjolinna commented 7 years ago

any progress yet?...

(btw. Qt 5.9 will be the next LTS release and it will arrive 31st May 2017) ...are you going to use v5.9 for android version?

PS. when you are trying clazy, it has problems with Qt5.8 at least on windows : bug report

omnight commented 7 years ago

Hi, sorry for the delay, I'm still having a lot of issues getting anything to run on the emulator without immediately crashing. Even now I can only test on the emulator by disabling hardware acceleration, which then causes most of my app to render as a white surface.

I've attached a zipped APK, which has some unnecessary files, but I've gotten at least some success with establishing SSL-connections.

phonehook_android7_test.zip

ahjolinna commented 7 years ago

well that sucks...anyway have you only tried that on emulator and not on actual device? it also good to check the documents about testing if u haven't already

also, I did try that apk on my phone and it said that the file was corrupted.


I really hope the Sony Xperia X sailfishOS phone will arrive soon so I don't need to use android anymore.

omnight commented 7 years ago

Sorry, may have mixed up the files, here is another attempt

phonehook_android7_test2.zip

I have tested this one on my Android 6 phone and in the half-broken Android 7 emulator.

ahjolinna commented 7 years ago

that wasnt any better at all, do u think Qt5.9 could help? ...I know that 5.8 was really broken release

omnight commented 7 years ago

The latest one is built with 5.9 beta 3, but it has a debug signature, so you will need to uninstall any Google Play version of the app and also enable "install from unknown sources" in settings.

Are you still getting errors while doing that?

ahjolinna commented 7 years ago

I forgot to remove the play store version, anyway it works now.. At least I can see the "list"...

One thing I noticed is that "fonecta app" says that I have to old phonehook version... Fonecta.fi works/opens...but login doesn't work

Fonecta doesn't use phone number as the username anymore it's now email address... And/or Facebook/Google account is also supported https://tili.fonecta.fi/login#/

omnight commented 7 years ago

Yeah, the Android version is a bit behind the Sailfish version, I'll try to get it up to speed. Anyway, good thing that you can see the list now, that was my biggest issue.

omnight commented 7 years ago

Here is a new test version that should hopefully work better with Fonecta phonehook_android7_test3.zip

ahjolinna commented 7 years ago

fonecta app "works" now but not the login...nothing happens when I try to login

unfortunately their documentation is in finnish (only?) https://api.fonecta.fi/api-docs/yhteystieto-api

omnight commented 7 years ago

The login is actually made when a lookup is performed, so try using the test function to look up a number after entering your login details.

ahjolinna commented 7 years ago

okay login seems to work ...maybe... not 100% sure...that sucks that there isnt any "login indicator".....and yes I tested the "test function" and search in general...and no luck with it

ahjolinna commented 7 years ago

okay now it works? wtf? :D

omnight commented 7 years ago

I tested the "Search" function now with Fonecta, and that didn't work so well for me (app crashed), will look into it next week.

ahjolinna commented 7 years ago

well it worked for me at least once now...I didnt have the crash issue....btw. the "home" and "settings" thing don't do anything either

omnight commented 7 years ago

Yeah, I probably messed up some code that prevents the settings page from loading. It's getting there! :)

ahjolinna commented 7 years ago

well baby steps... and there is no hurry at least until Qt5.9 has been released

omnight commented 7 years ago

I've fixed the bugs that I found, and also updated the Fonecta App source to better handle search.

New version: phonehook_android7_test4.zip

ahjolinna commented 7 years ago

seems to work little bit better ...cant say that much about the search yet, at least the "home button/page" works now, but settings one is still broken...if you try from the "home page" nothings happens...and from other "pages" it just goes to an blank page

omnight commented 7 years ago

Interestingly, the settings page works fine on Android 5, but crashes on Android 6/7, seems to be related to this issue: https://bugreports.qt.io/browse/QTBUG-59026

Qt 5.9 got a new release yesterday, so I'm going to try that out.

ahjolinna commented 7 years ago

yeah it also seems qt5.9 stable release will be little bit late..the RC1 was meant to arrive the 17th may but it will now arrive next week instead...anyway did you try out the clazy thing with 5.9(beta)

omnight commented 7 years ago

Here's a new version built with 5.9 beta 4, also added a few minor features that the Sailfish version has.

phonehook_android7_test5.zip

I had a look at clazy and it looks very useful, but not sure I can use it with the current Android-only setup I have, since it uses gcc instead of clang.

ahjolinna commented 7 years ago

cool, the settings page works now at least...will test it more soon...anyway... nowdays I'm personally all for using clang instead of gcc ...also:

Android NDK: GCC is now deprecated, everyone should be switching to Clang

and https://developer.android.com/ndk/guides/standalone_toolchain.html#working_with_clang

ahjolinna commented 7 years ago

the "test number" (fonecta app) doesnt seem to work yet, I do get a popup but it says that it cant find the number...but when I go to normal search it finds it just fine.

(I tested my own phone number)

omnight commented 7 years ago

Might be some issue after first login. Does it work if you clear the cache and test the number again?

ahjolinna commented 7 years ago

clearing the cache made it worse...now "test number" doesn't work at all :D

"normal search " does still work

omnight commented 7 years ago

Did you use the in-app "Clear Cache" option for the source, or the android clear cache feature? I realize now that I wasn't too specific.

I'll run some more tests here and see if I can reproduce the issue.

ahjolinna commented 7 years ago

in-app "Clear Cache" option

omnight commented 7 years ago

I've made another update to the Fonecta App source, it seems that the fields returned from the server can vary a bit (haven't figured out why yet) which caused the response parsing to fail.

ahjolinna commented 7 years ago

didnt work yet

omnight commented 7 years ago

Even after clearing? It works for me now, so don't know what the problem is this time

ahjolinna commented 7 years ago

it seems 2nd try is the charm, at least after running simpli clean (F-secure booster was based on this) ...and the in-app "Clear Cache" option

btw. could/have your tried to build phonehook with Clang instead of Gcc ?

omnight commented 7 years ago

So even if you delete/re-install the app it still only works on the 2nd try? If you can provide adb logs to me (just scrub sensitive information) I might be able to see what's going on.

I'm actually not sure how to change over to clang. It seems that Qt has added support for clang, but they still build with gcc because the libs are too big when compiling with clang. https://bugreports.qt.io/browse/QTBUG-50724

ahjolinna commented 7 years ago

it seems to work now also after reinstalling it...I'm not sure why it didn't at first... anyway I haven't found any doc/status report about building android apps with clang with v5.9...have to wait for the actual release....as qt has been moving towards clang, but hasn't made it default yet for android


btw. shouldn't you need to add permission request support?

omnight commented 7 years ago

Since Qt 5.9 has been released properly now, I've built a new version of Phonehook linking with Qt 5.9.

I also noticed that I had accidentally been working from an earlier commit for the earlier test versions I put up here, so several of the issues are actually already fixed in the live Google Play version. I've done an attempt to merge everything, so now a bit more stuff should be working (like the Truecaller App source).

phonehook_android7_test6.zip

ahjolinna commented 7 years ago

sorry for the late reply, anyway I just tested it and everything seems to work, oc I have some other gripes with it ...mostly with UI/UX...I will maybe do another bug report about that (I doubt it as I only care about sailfishOS version soon)

so anyways closing this..


if you are intrested to do something about the android UI, I would maybe check the KDE's Kirigami (guidelines) project https://techbase.kde.org/Kirigami