cordova-plugin-fingerprint-aio icon indicating copy to clipboard operation
cordova-plugin-fingerprint-aio copied to clipboard

Faceid not support on android device

Open ifbbprochris opened this issue 4 years ago • 17 comments

Bug report

the auth api return -106 error code, even when I turn on the face id

Environment

package version: 4.0.2

test device: android 9

Logs

fingerprintErr:{"code":-106,"message":"BIOMETRIC_NOT_ENROLLED"}

ifbbprochris avatar Jan 22 '21 08:01 ifbbprochris

+1 I have the same problem. Samsung M20 supported FaceId a couple of days ago - updated plugin and no longer recognizes face

Max19901 avatar Jan 27 '21 10:01 Max19901

+1 I have the same problem with Samsung galaxy a8

RonYaari avatar Feb 02 '21 07:02 RonYaari

+1 I'm using android 10, and I register my face ID but when I invoke Fingerprint.isAvailable it returns the error BIOMETRIC_NOT_ENROLLED. and when I enroll my fingerprint it return success which means that the plugin doesn't support faceId authentication .

oumaymasalhii avatar Feb 05 '21 10:02 oumaymasalhii

Is there any update on this issue ?

tdfeslo avatar Mar 18 '21 20:03 tdfeslo

Is there any update on this issue?

fathanyr avatar Apr 09 '21 06:04 fathanyr

Tried to adopt this plugin in my code. My testing devices are the following. Both have fingerprint scanner and face recognition. Both have face screen unlock turned on, and it works well for this purpose.

  • Samsung Galaxy S8 w/ Android 9
  • Xiaomi Mi 10 Lite w/ Android 10

Plugin utilizes standard Android API calls (from AndroidX support library):

Nevertheless, attempt to use it does nothing from user point of view.

  1. Checking biometric availability (call Fingerprint.isAvailable() in JS) results an error: { code: -106, message: BIOMETRIC_NOT_ENROLLED }
  2. Force showing auth dialog (call Fingerprint.show() in JS) results the same error. If I remove this check for availability in Java code, I get prompt with PIN, not with face recognition.

Possibly, problem may be somewhere in AndroidX internally. SO says:

Android Biometric APIs would only work on the devices which have their biometric features (face,fingerprint, iris) compatible with Android Biometric stack. I have a set of devices with Face feature support, among them only few support Android Biometrics.

Continue research.

contfedorov avatar May 19 '21 10:05 contfedorov

@oumaymasalhii

+1 I'm using android 10, and I register my face ID but when I invoke Fingerprint.isAvailable it returns the error BIOMETRIC_NOT_ENROLLED. and when I enroll my fingerprint it return success which means that the plugin doesn't support faceId authentication .

Could you clarify what device do you use? I have the same error with my Xiaomi Mi 10 Lite (M2002J9E). It has face unlock, but plugin does not work with it. So, it doesn't mean that plugin have no FaceID support for Android. Plugin uses standard Android API provided by OS. Looks like this API does not work properly or device vendor did not provide correct implementation.

android-biometric-impl

contfedorov avatar May 24 '21 13:05 contfedorov

I also have this issue on a Samsung A11, would love to have this issue fixed if possible. If there's any information I can contribute that would help, I would be happy to do so.

scotthmusson avatar Jan 14 '22 20:01 scotthmusson

same issue on galaxy tab A7, face recognition enabled and the plugin says BIOMETRIC_HARDWARE_NOT_SUPPORTED, will probably try to use some other plugin for face recognition on android

patrikkelmen1 avatar Jan 17 '22 12:01 patrikkelmen1

IIUC this plugin performs as follows:-

  • fingerprint iOS - OK
  • fingerprint Android - OK
  • face iOS - OK
  • face Android - not so good (according to this ticket)

@patrikkelmen1 did you find a workng face plugin for Android ?

petercutting avatar Feb 21 '22 08:02 petercutting

@petercutting unfortunately not yet (I had other priorities - so I wasn't really looking)

patrikkelmen1 avatar Feb 21 '22 09:02 patrikkelmen1

Face ID in Android is not considered a strong biometric for most devices. That means it provides no cipher. We encounter this but in our case, it was just when trying to save the secret that it was failing and we just provided a fallback for such a situation. Now, this is the case in Android 12. I suspect in older versions (like 9) it will just say not supported and the cause will be from the android x library directly.

pitAlex avatar Apr 19 '22 18:04 pitAlex

I have solved the Android Face ID issue by modifying following files:

  1. cordova-plugin-src/cordova-plugin-fingerprint-aio/src/android/build.gradle Line 2: implementation "androidx.biometric:biometric:1.1.0"

https://developer.android.com/jetpack/androidx/releases/biometric#1.1.0

  1. cordova-plugin-src/cordova-plugin-fingerprint-aio/src/android/Fingerprint.java Line 139: int error = BiometricManager.from(cordova.getContext()).canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG);

https://androidx.de/androidx/biometric/BiometricManager.html#canAuthenticate(int)

It does not cover all the devices though, here is the link to track this issue with google. FaceID authentication using BiometricPrompt from AndoidX library cant unlock cipher key

prajapatijay95 avatar Sep 30 '22 01:09 prajapatijay95

@prajapatijay95 I am facing an issue after doing the above changes

BiometricActivity.java:12: error: package does not exist import androidx.appcompat.app.AppCompatActivity;

How did you resolve this issue in BiometricActivity.java? Did you face the same issue? Can you please help me with it?

codehack26 avatar Feb 23 '23 07:02 codehack26

@codehack26 Sorry for the late reply. I have not faced this issue. I just made a change to 2 files mentioned in my other comment. Maybe try it with gradle sync.

prajapatijay95 avatar Mar 23 '23 23:03 prajapatijay95

@prajapatijay95 I did the above two file changes but still getting { code: -106, message: BIOMETRIC_NOT_ENROLLED } can you pls help me how you resolved?

jdpsah avatar May 26 '23 12:05 jdpsah