2

I am using android biometrics API in my app. The version number is:

1.1.0-alpha02

and the device I am testing it on is android 10 (Oneplus 7 pro). Now the biometrics is always showing me the option of fingerprint and not the face recognition to authenticate my app. I have enabled face recognition from settings.

I understand that in the alpha release they have added "Weak" and "Strong" in "setAllowedAuthenticators" method but neither of the options shows me face recognition.

If face recognition is always weak then when I set :

setAllowedAuthenticators(BIOMETRIC_WEAK)

It should use face recognition but it never does.

I have also tested this on Samsung Note 10-lite

nick.tdr
  • 4,627
  • 4
  • 28
  • 41
  • Which `authenticate` method are you using? Note that the one taking a `CryptoObject` does not allow for WEAK biometrics to be used, and will throw an `IllegalArgumentException` if you try to use it with WEAK biometrics. – Michael Sep 24 '20 at 14:50
  • I am not using any cryptoObject. I am only using BiometricPrompt and PromptInfo. I only have to show the dialog for authentication and upon success, the dialog closes and the user can use the app. I am not encrypting any information using biometrics data. – nick.tdr Sep 25 '20 at 02:47
  • In your device, did face detection work with androidx library 1.0.1 (stable release) ? Authenticators were only introduced from 1.1.0-alpha02 release. – Shanker Sep 25 '20 at 08:58
  • @nick.tdr is your problem solved? because I am also facing the same issue – Jenis Kasundra Feb 05 '21 at 05:40
  • im also facing the same issue. my device is one plus 7 pro – rafi Feb 11 '21 at 12:29

1 Answers1

3

For face feature to appear in Biometric System Authentication prompt, individual device face sensors should be compatible with Android Biometric stack.

With setAllowedAuthenticators(BIOMETRIC_WEAK), we are only informing Android system that we want those Biometric features(face, fingerprint, iris) in the Biometric System prompt, which are configured in device settings by App user and also qualify the BIOMETRIC_WEAK requirements,

More info on the BIOMETRIC_WEAK and BIOMETRIC_STRONG can be found in below link. https://source.android.com/compatibility/android-cdd#7_3_10_biometric_sensors

Shanker
  • 864
  • 6
  • 24