AuthenticationCallback
abstract class AuthenticationCallback
| kotlin.Any | |
| ↳ | android.hardware.biometrics.BiometricPrompt.AuthenticationCallback | 
Callback structure provided to BiometricPrompt.authenticate(CancellationSignal, or BiometricPrompt.authenticate(CryptoObject,. Users must provide an implementation of this for listening to authentication events.
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| open Unit | onAuthenticationError(errorCode: Int, errString: CharSequence!)Called when an unrecoverable error has been encountered and the operation is complete. | 
| open Unit | Called when a biometric is valid but not recognized. | 
| open Unit | onAuthenticationHelp(helpCode: Int, helpString: CharSequence!)Called when a recoverable error has been encountered during authentication. | 
| open Unit | Called when a biometric is recognized. | 
Public constructors
AuthenticationCallback
AuthenticationCallback()
Public methods
onAuthenticationError
open fun onAuthenticationError(
errorCode: Int,
errString: CharSequence!
): Unit
Called when an unrecoverable error has been encountered and the operation is complete. No further actions will be made on this object.
| Parameters | |
|---|---|
| errorCode | Int: An integer identifying the error message | 
| errString | CharSequence!: A human-readable error string that can be shown on an UI | 
onAuthenticationFailed
open fun onAuthenticationFailed(): Unit
Called when a biometric is valid but not recognized.
onAuthenticationHelp
open fun onAuthenticationHelp(
helpCode: Int,
helpString: CharSequence!
): Unit
Called when a recoverable error has been encountered during authentication. The help string is provided to give the user guidance for what went wrong, such as "Sensor dirty, please clean it."
| Parameters | |
|---|---|
| helpCode | Int: An integer identifying the error message | 
| helpString | CharSequence!: A human-readable string that can be shown on an UI | 
onAuthenticationSucceeded
open fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult!): Unit
Called when a biometric is recognized.
| Parameters | |
|---|---|
| result | BiometricPrompt.AuthenticationResult!: An object containing authentication-related data | 
