FireflyMobile
FireflyMobile copied to clipboard
"security" setting disabled even though Pin is configured
Firefly III Server Version: 5.7.9
Firefly III Mobile Version: 5.0.7
Android Version: 10
Device Information:
- BRAND: Nokia
- MODEL: 7plus
Expected Behavior
I'd like to go into settings and enable "security"
Current Behavior
"security" is disabled and say "please enable pin / password / biometrics in your device settings"
Steps to Reproduce
Not sure how to reproduce. My device is secured with a PIN and has a few fingers registered. Is there any way I can get more information about why the current check fails?
I think I found the issue, FireflyMobile does test support via:
https://github.com/emansih/FireflyMobile/blob/4c7d3d121ca5127d19d5070f9b51c32f9ca047a0/app/src/main/java/xyz/hisname/fireflyiii/ui/settings/SettingsFragment.kt#L204-L205
The Android API docs https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int) note:
Note that not all combinations of authenticator types are supported prior to Android 11 (API 30). Specifically, DEVICE_CREDENTIAL alone is unsupported prior to API 30, and BIOMETRIC_STRONG | DEVICE_CREDENTIAL is unsupported on API 28-29. Developers that wish to check for the presence of a PIN, pattern, or password on these versions should instead use KeyguardManager.isDeviceSecure().
this seems to suggest that on Android 10 canAuthenticate(BiometricManager.Authenticators.DEVICE_CREDENTIAL)
will never return True and as such will not work. Does this make sense?
I have verified that the attached PR fixes the issue and imo it seems to correct to actually ask for biometric authenticators. That said I am not really familiar with Android APIs.