Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Andorid when API level<23 #118

Closed
ashwinkumar6 opened this Issue Mar 8, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@ashwinkumar6
Copy link
Member

ashwinkumar6 commented Mar 8, 2019

The native library used for android libsafe_authenticator.so for the architecture armeabi-v7a is currently not working on the SafeAuthenticator for API level <23`

Solution:
Re-built the safe_authenticator native library from safe_client_libs with a toolchain having android api level 21 using ~/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --api 21 --install-dir ~/toolchains/android-21-arm-toolchain

replace the libsafe_authenticator.so file generated with the one present at location \safe-authenticator-mobile\SafeAuthenticator.Android\lib\armeabi-v7a

@S-Coyle

This comment has been minimized.

Copy link
Contributor

S-Coyle commented Mar 13, 2019

Note that the current released apk was built using the old native libs. So after updating the libs on S3 we will have to generate a new apk with the new libs. This would be a separate release on githiub.

Now to test, (we need to delete the old nativeauthlibs previously downloaded)

  1. Go to System's TempPath and delete the nativeauthlibs folder
  2. Delete the lib folder in safe-authenticator-mobile\SafeAuthenticator.Android
  3. Delete the Native References folder in safe-authenticator-mobile\SafeAuthenticator.iOS
  4. Finally build and launch on arm emulator
@S-Coyle

This comment has been minimized.

Copy link
Contributor

S-Coyle commented Mar 13, 2019

Some test notes after building safe-authenticator-mobile with updated libs:

  • on first test the app kept crashing on launch. Replicated on emulator API 19 armeabi-v7a android v4.4 and on my own device API 28 x86_64 Android v9.0. Before building this I had some issues with Visual Studio losing the path to my java SDK so assuming this issue is related to that.
  • Rebuilt from scratch and re-tested. Confirmed I was now able to open app & login/out on live on emulator API 19 armeabi-v7a android v4.4, and on my own device API 28 x86_64 Android v9.0.
  • Tested on emulator API 16 armeabi-v7a android v4.1 - seeing same results as reported in the original bug, I get to the login screen and nothing is responsive.
  • Tested again on a different emulator device with same API 16 armeabi-v7a android v4.1 and seeing the same issue.
  • Tested on an emulator with API 17 armeabi-v7a android 4.2 - same issue
  • Tested on an emulator with API 18 armeabi-v7a android 4.3 - works fine Allows me to enter login details but then crashes with Unfortunately, SAFE Authenticator has stopped pop up.
    Note that I updated the final test above, for API 18, and the summary below - although the secret & response fields are responsive on API 18, the app actually crashed when I tried to login.

Summary - Looks like switching our SCL libraries to API 21 has resulted in the authenticator app now working on Android v4.4+ for armeabi-v7a, which is an improvement on v6.0+. However, we have stated in the forum that we support v4.1+ so not sure whether this is fix acceptable. Will raise with the team.

@S-Coyle

This comment has been minimized.

Copy link
Contributor

S-Coyle commented Mar 14, 2019

Update on the test results above - @ravinderjangra did some digging into the cause and the issue seems to be with the mono runtime, not with Authenticator app. To confirm this, he tried creating a new app and he is getting the same issue with that also. So, for now it looks like we can change the minimum support version to v4.3 or v4.4. Mono issue link: xamarin/xamarin-android#2392.

@ashwinkumar6

This comment has been minimized.

Copy link
Member Author

ashwinkumar6 commented Mar 18, 2019

After performing further testing, we have come to the conclusion that the above-mentioned mono issue exists only on 4.1. There were few other issues faced when testing on 4.2 and 4.3 which are

  • Image button not supported on Android when API level < 19 (#120)
  • Add fallback option when opening hyperlinks using ChromeCustomTabs (#121)
  • Hide auto-reconnect option if API level < 19 (#122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.