BiometricPrompt.AuthenticationCallback


public abstract class BiometricPrompt.AuthenticationCallback


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

Summary

Public constructors

Public methods

void
onAuthenticationError(int errorCode, @NonNull CharSequence errString)

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

void

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

void

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
public AuthenticationCallback()

Public methods

onAuthenticationError

Added in 1.0.0
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString)

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
int errorCode

An integer ID associated with the error.

@NonNull CharSequence errString

A human-readable string that describes the error.

onAuthenticationFailed

Added in 1.0.0
public void onAuthenticationFailed()

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
public void onAuthenticationSucceeded(
    @NonNull BiometricPrompt.AuthenticationResult result
)

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
@NonNull BiometricPrompt.AuthenticationResult result

An object containing authentication-related data.