3

Android 9/Android P (API 28) is said to support facial recognition via BiometricPrompt. All of the tutorials that I've read use BiometricManager for detecting Facial recognition support - but this class wasn't added until API 29 (Android 10/Android Q).

So, how can I detect facial recognition support on API 28?

My preference is to do this without using the AndroidX support library, as I've read conflicting information about what the support library's version of BiometricManager.canAuthenticate() results mean when run on API 28 and lower.

1 Answer 1

3

Answering my own question. It appears that even on Android 10 there is no way to find out if the device supports facial recognition, since BiometricManager.canAuthenticate() will return success if the device supports fingerprint auth. From API Docs:

This is the equivalent of canAuthenticate(int) with Authenticators#BIOMETRIC_WEAK

And BiometricManager.canAuthenticate(int) isn't available until API 30.

So using BiometricManager on Android 10 is no different than using the deprecated FingerprintManager.

So working back to my question about BiometricManager support on Android 9. There is no difference between using FingerprintManager and BiometricManager when it is running on an Android 9 device. Therefore the equivalent of BiometricManager is FingerprintManager.

But this doesn't help someone like me that is looking for a way to determine if the device supports facial recognition. There doesn't seem to be any way to determine this pre Android 11.

Sign up to request clarification or add additional context in comments.

1 Comment

There isn't really any way of doing that with BiometricManager.canAuthenticate(int) either. There may be devices - either now or in the future - on which the fingerprint and face recognition sensors have the same strongness.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.