we are currently trying to sign data with biometrics, which we use the androidx.biometric library for.
The Problem is, if no Fingerprint ist installed but a face registered we cannot generate any keys.
With Fingerprint only or with the combination of fingerprint and face everything works perfect.
With only the face registered we get the following exception during key generation:
Caused by: java.security.InvalidAlgorithmParameterException: java.lang.IllegalStateException: At least one biometric must be enrolled to create keys requiring user authentication for every use
Before we start the key generation we test the presence of biometric as following:
boolean isAvailable = biometricManager.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS;
The Test-Device as a Samsung Galaxy S10 with Android 10.
Thank you for help and best regards
Turn on biometrics in the Android device settingsOpen your phone's Settings and locate the security or biometrics menu. From this menu, set your biometrics preferences to fingerprint.
The biometric authentication feature allows your mobile app (iOS, Android) users to log in to their device either using their Fingerprint or Face ID. This feature allows the end-users to quickly access their app using their fingerprint and it is considered as the most secure way of login.
Select Settings . Under "Accounts," select Screen lock. Enter your password and select Confirm. Next to "Edit fingerprints," select Set up.
Google has updated androidx biometric sdk. If you are going to use strong type authentication in your application.Authentication can be checked for the strong type. If your device is suitable for this, you can create a cryptoObject.
https://developer.android.com/jetpack/androidx/releases/biometric#1.1.0-alpha02
https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#canAuthenticate(int)
val canAuthenticate = BiometricManager.from (context)
.canAuthenticate (BiometricManager.Authenticators.BIOMETRIC_STRONG)
After this check, you can proceed to key generation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With