Can't Detect Fingerprint Sensor on Android 12
Hi, please I've not been able to detect the fingerprint sensor on a Samsung Galaxy Note20 Ultra 5G which runs android 12, it works well on another android device running android version 11 though.
I've installed this library successfully and add the following permissions to the AndroidManifest.
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
But nothing is returned when I call getSupportedBiometryType from react-native-keychain for the devices running android 12, please am I missing something for android 12? I'm still researching and will drop my findings here.
Also confirmed on a Samsung Galaxy S22 Ultra, running Android 12. getSupportedBiometryType returns null.
EDIT:
I was running v6.2.0. Upgrading to latest (v8.0.0) fixes the issue for me.
Strange @damonbauer , I've upgraded, cleaned with Gradlew and built again but still getting null.
I've noticed though that when I change the following code in the DeviceAvailability class within the library's Java code from.
public static boolean isStrongBiometricAuthAvailable(@NonNull final Context context) {
return BiometricManager.from(context).canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG) == BIOMETRIC_SUCCESS;
}
to
public static boolean isStrongBiometricAuthAvailable(@NonNull final Context context) {
return BiometricManager.from(context).canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) != BIOMETRIC_SUCCESS;
}
It detects the fingerprint sensor and stores the password with setGenericPassword but when I try to call the Fingerprint sensor to scan with getGenericPassword it gives an error saying. code: 11, msg: No fingerprints enrolled.