For questions about Android's BiometricPrompt API feature used for biometric authentication.
Questions tagged [android-biometric-prompt]
211 questions
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…

Sparsh Dutta
- 2,450
- 4
- 27
- 54
3
votes
0 answers
Show authentication prompt with only device credential option on Android 10 and lower
I can display biometric prompt with device credentials using 'androidx.biometric:biometric:1.2.0-alpha03' as,
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle("Login to My App")
.setSubtitle("Log in using your…

sneharc
- 493
- 3
- 21
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…

Alessandro Scarozza
- 4,273
- 6
- 31
- 39
3
votes
1 answer
class file for android.security.identity.IdentityCredential not found
As part of authentication in my app, I am trying to implement biometric authentication.
I did the required code changes as per documentation.
When building my application, I am facing the below build error.
class file for…

vjr
- 33
- 4
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…

S. Kolesnik
- 31
- 2
3
votes
1 answer
Flutter local_auth issues on android certain devices
I'm currently having issues with local_auth on certain devices: LG-G6 (Android 7.0) and Samsung Galaxy J7 Pro (Both running on android 7), and i believe there's more android devices having this issue.
Authentication always fails on the…

Tshepo Sibiya
- 79
- 9
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…

user677767
- 203
- 3
- 10
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…

abhishek maharajpet
- 482
- 1
- 4
- 18
3
votes
1 answer
BiometricManager on Android 9
Android 9/Android P (API 28) is said to support facial recognition via BiometricPrompt. All of the tutorials that I've read use BiometricManager for detecting Facial recognition support - but this class wasn't added until API 29 (Android 10/Android…

steve hannah
- 4,586
- 11
- 18
3
votes
2 answers
Crash using biometric androidx library
In my app I'm using androidx biometric support library 1.0.1. On Android 9 I can see this kind of bug but I have no idea where they come from::
02-01 13:00:06.422 23937 23937 E AndroidRuntime: FATAL EXCEPTION: main
02-01 13:00:06.422 23937 23937 E…

greywolf82
- 21,813
- 18
- 54
- 108
3
votes
3 answers
Android biometric authentication invalid variables in AuthenticationCallback when using device credential
I am using androidx.biometric:biometric:1.0.1 everything works fine but when I have a device without a biometric sensor (or when the user didn't set his fingerprint or etc) and I try to use DeviceCredentials after doing authentication my function…

feridok
- 648
- 7
- 26
3
votes
1 answer
BiometricPrompt: Why should we check KeyguardManager.isDeviceSecure() before enabling setDeviceCredentialAllowed?
The documentation of BiometricPrompt.PromptInfo's setDeviceCredentialAllowed method states:
[...] Developers should first check KeyguardManager.isDeviceSecure() before enabling this. If the device is not secure,…

Florian Walther
- 6,237
- 5
- 46
- 104
3
votes
2 answers
java.lang.IllegalArgumentException: Device credential not supported with crypto
I am trying to set up the BiometricPrompt, but I need an authentication with a CryptoObject, which seems to not be possible when the…

K.Cvetanovska
- 73
- 1
- 7
3
votes
2 answers
How to associate the user fingerprint with the login information
I'm trying to understand how to implement bio-metric authentication on an app, specifically using a fingerprint.
From what I understood so far the API only provides 3 different information: auth failed, auth success and no fingerprint registered in…

Shadow
- 4,168
- 5
- 41
- 72