-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Wrong behaviour in Android 10 with disablebackup false #417
Comments
I have this issue on Android 11 |
After inspecting the source, it seems the duplicated dialog is a plugin workaround to bypass an Android 10+ introduced bug reported years ago. I've been working on a PR to replace the deprecated setDeviceCredentialAllowed method to API's 30 setAllowedAuthenticators only to find out that the latest stable Biometric API 1.1.0 still includes this bug. 🙄 This bug was partially fixed in androidx.biometric:biometric:1.2.0-alpha04:
This 1.2.0 alpha 04 fix was released 6 months ago and there is not even a release candidate version yet, not to mention a stable release. 😠 Now all depends on the androidx developers to release a stable version with this fix, however, they seem to prefer wasting time with Kotlin and adding more features than fixing issues reported 3 years ago. Yep, that's definitely the Google Android team. Testing biometric API 1.2.0 alpha 04Building the app with this unstable alpha API and with target SDK 30 triggers this error:
Which means the fix requires API 31 build tools. I'm not sure if Cordova 11 can be safely compiled against SDK 31, so that's the end of my research for now. I've wasted an entire day dealing with this bugged API for nothing. Bugged androidx biometric API 1.1.0 (stable) behaviourThis issue does not affect Android 9 and earlier devices. They managed to introduce it somewhere in API level 29. |
Bug report
The .show method seems to be flawed in Android 10.
Behavior in Android 7/8/9
Behavior in Android 10 (Samsung, Redmi)
BiometricPrompt.PromptInfo.Builder notice
The setDeviceCredentialAllowed method shows this warning:
The reality check shows the exact opposite, behaviour with setDeviceCredentialAllowed(true) does work as expected UNTIL Android 10 which duplicates the dialogs. And cancelling the pattern/pin dialog corrrectly returns a BIOMETRIC_DISMISSED failure callback.
Plugin demo app
To easily test this plugin, I've created and uploaded a small Fingerprint Plugin demo app. Kindly let me know if this behavior persists in your Android 10+ phones.
Environment
The text was updated successfully, but these errors were encountered: