1

Bio metrics FACE ID working only in Samsung device

dependencies {
    def biometric_version = "1.0.0"

    implementation "androidx.biometric:biometric:$biometric_version"
}

I have implemented above biometrics android but it works fine in all devices But face Id only working in Samsung device (tested in Samsung s9)

Giorgos Neokleous
  • 1,709
  • 1
  • 14
  • 25
android2892
  • 43
  • 1
  • 6

1 Answers1

0

The Biometric Library is built to recognize the form factor that is present on the device. So if a device has the hardware for facial recognition then the library will recognize it. If a device only supports fingerprint, then the prompt will show fingerprint.

Have you checked the following?

  1. whether there is biometric (facial, in your case) hardware available on the device,
  2. whether the user has enrolled templates,
  3. whether the user has enabled biometric authentication.

Are you checking canAuthenticate()?

override fun onClick(view: View) {
   val promptInfo = createPromptInfo()
   if (BiometricManager.from(context)
               .canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) {
       biometricPrompt.authenticate(promptInfo, cryptoObject)
   } else {
       loginWithPassword()
   }
}

What errors are you getting? The following blog posts may provide further guidance

  1. Using BiometricPrompt
  2. More details on using BiometricPrompt and migration
Isai Damier
  • 976
  • 6
  • 8
  • if (BiometricManager.from(getActivity()) .canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) { Globals.showToast(getActivity(), "support"); } else Globals.showToast(getActivity(), "unsupport"); 1.MI,one plus have enrolled face id(only face id enrolled)in their respective Device but i get unsupport Toast And when both face id and fingerprint enrolled same issue But when only fingerPrint is enrolled it works 2.face id and finerPrintworks only for samsung devices – android2892 Nov 28 '19 at 06:42
  • It might be due to some OS restrictions on other devices. Even I am facing the same. – abhishek maharajpet Jun 22 '20 at 08:35