BiometricPrompt.AuthenticationCallback


abstract class BiometricPrompt.AuthenticationCallback


A collection of methods that may be invoked by BiometricPrompt during authentication.

Summary

Public constructors

Public functions

Unit
onAuthenticationError(errorCode: Int, errString: CharSequence)

Called when an unrecoverable error has been encountered and authentication has stopped.

Unit

Called when a biometric (e.g. fingerprint, face, etc.) is presented but not recognized as belonging to the user.

Unit

Called when a biometric (e.g. fingerprint, face, etc.) is recognized, indicating that the user has successfully authenticated.

Public constructors

AuthenticationCallback

Added in 1.0.0
AuthenticationCallback()

Public functions

onAuthenticationError

Added in 1.0.0
fun onAuthenticationError(errorCode: Int, errString: CharSequence): Unit

Called when an unrecoverable error has been encountered and authentication has stopped.

After this method is called, no further events will be sent for the current authentication session.

Parameters
errorCode: Int

An integer ID associated with the error.

errString: CharSequence

A human-readable string that describes the error.

onAuthenticationFailed

Added in 1.0.0
fun onAuthenticationFailed(): Unit

Called when a biometric (e.g. fingerprint, face, etc.) is presented but not recognized as belonging to the user.

onAuthenticationSucceeded

Added in 1.0.0
fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult): Unit

Called when a biometric (e.g. fingerprint, face, etc.) is recognized, indicating that the user has successfully authenticated.

After this method is called, no further events will be sent for the current authentication session.

Parameters
result: BiometricPrompt.AuthenticationResult

An object containing authentication-related data.