Android - Biometrics on Android 9 (SDK 28) - Phone has face recognition available but BiometricManager returns null

Viewed 571

I am adding Biometrics to my app for when its available on the device. I am using a Samsung phone running Android 9... the phone has face recognition and I have my face registered.

The issue is, when i use BiometricManager.canAuthenticate() to ask the device what Biometrics are available, it fails saying "no Biometrics are available on the device". Further digging revealed that the BiometricManager.canAuthenticate() method only checks for facial recognition if the SDK is >= Android Q (SDK 29)... this makes no sense at all.

If I ignore the canAuthenticate() method result and attempt to display a BiometricPrompt, it works 100% successfully... the user is prompted, the face is recognized, and I am able to login to the app using only face recognition. Furthermore, all of the Authentication method callbacks work, onAuthenticationError method knows if Biometrics are enrolled or not...

If this works on Android 9, why the F is the BiometricsManager only checking when the SDK is Android 10?

If one of my users has a similar device as me (Android 9 with face recognition) and they try to enable it in my app and they get a popup saying "your device has no biometric authentication available" that will seem like a pretty big flaw...

Is there any other way to confirm face recognition biometrics is available? Because the documented solution is not correct based on my case.

0 Answers
Related