Questions tagged [android-biometric]

128 questions
4
votes
1 answer

Invalidate SecretKey when new Biometrics are added

I am running into an issue where I want to invalidate a SecretKey when a user adds a new fingerprint to their Android device. I can generate the key, pull up the biometric prompt with no issues. When I add a new fingerprint, the key is not throwing…
4
votes
1 answer

Biometric Prompt in onResume throws FragmentManager is already executing transactions

I intend to show androidx biometric prompt whenever the user returns to the fragment after navigating away from screen. For this, I have placed the authentication logic in Fragment level onResume. It works fine while navigating in app. But, whenever…
4
votes
1 answer

How to save and compare 2 fingerprints on Android

I would like to integrate fingerprint in the authentication process for my project and then save and compare this fingerprint. I have tried integrate several pieces of code, but so far none have worked. How can I save and compare fingerprints in an…
4
votes
1 answer

How to check if device supports face authentication for BiometricPrompt

In my project, we're adding this biometric authentication feature using BiometricPrompt. The biometric can be enabled in the app's settings but the app also needs to display if face biometric is supported on the user's device. Based on my research,…
4
votes
1 answer

In Android 10 devices, Biometric prompt is failing with ERROR_CANCELED all the time on top of lock screen

In Android 10 devices, Biometric prompt is failing with BiometricPrompt.ERROR_CANCELED all the time on top of the lock screen. Error is returned in onAuthenticationError callback of BiometricPrompt.AuthenticationCallback class. The biometric prompt…
3
votes
1 answer

BiometricManager.canAuthenticate(BIOMETRIC_STRONG) == BIOMETRIC_SUCCESS but KeyPairGenerator.initialize() => java.lang.IllegalStateException on API 29

Sorry for such a long question. I've tried to include all relevant information and it is quite a lot. I've been working on this issue for a few weeks now and am in desperate need of help. General info I am developing a flutter app that requires…
3
votes
0 answers

Error code 12 in Biometric Authentication - device have only FaceID

I am doing login validation with Biometric prompt dependency:usedandroidx.biometric:biometric-ktx:1.2.0-alpha04 checked the hardware supported or not using this code fun isBiometricHardWareAvailable(con: Context): Boolean { var result = false val…
3
votes
0 answers

Biometric API - How to force to use Face authentication?

I want to force a device with face id, to use Face authentication to login in my application, using Biometric API. I'm using BIOMETRIC_WEAK but, its always asking for fingerprint instead face id. BiometricPrompt.PromptInfo.Builder().apply { …
LMaker
  • 1,444
  • 3
  • 25
  • 38
3
votes
0 answers

Detect separately for availability of fingerprint and face authentication biometrics

My requirement is that if face authentication is available in user's phone, I'll prompt the user for enabling face recognition, and I won't prompt for fingerprint authentication. But if face authentication is not available in user's phone, or if the…
3
votes
1 answer

Android - Is biometric information tied to a specific user on a device, or the device in general?

I want to enable a user to log in to my app using their biometric information. However, I'm aware that there is multi-user functionality for Android devices, where you can register multiple users on a single device. I don't want a different user on…
3
votes
1 answer

How to replace deprecated KeyGenParameterSpec.Builder.setUserAuthenticationValidityDurationSeconds?

From android 11 setUserAuthenticationValidityDurationSeconds are deprecated in favor of setUserAuthenticationParameters inside KeyGenParameterSpec.Builder but seams there is any support for previous versions. so, what are best the solution…
3
votes
1 answer

How to use BiometricPrompt with CryptoObject to get KeyStore access for both Decryption and Encryption at the same time?

PROBLEM DESCRIPTION: When accessing the Android KeyStore with BiometricPrompt authentication, the BiometricPrompt appears every time when I have to perform read or write operation to the KeyStore. I am looking for a solution to authenticate only…
3
votes
1 answer

Android - BiometricPrompt detect whether is a face id or touch id

In my Android app, I use this code to ask user for biometrical authentication: val title = "..." val subtitle = "..." BiometricPrompt.PromptInfo.Builder() .setTitle(title) .setSubtitle(subtitle) .build() My case…
3
votes
0 answers

Face authentication using React native keychain in Android

I'm trying to set and get data using react native keychain library with below options: accessControl: ACCESS_CONTROL.BIOMETRY_ANY, accessible: ACCESSIBLE.WHEN_UNLOCKED I was successfully set the data. When I'm trying to retrieve data using…
3
votes
1 answer

Android Biometric : IllegalStateException. At least one biometric must be enrolled to create keys that require user authentication

I am using the android Biometricx library for face and fingerprint authentication. When only FaceID is registered and I try to create secret key I am getting "IllegalStatException: At least one biometric must be enrolled to create keys that require…
1
2
3
8 9