Google berkomitmen untuk mendorong terwujudnya keadilan rasial bagi komunitas Kulit Hitam. Lihat caranya.

AuthenticationCallback

abstract class AuthenticationCallback
kotlin.Any
   ↳ androidx.biometric.BiometricPrompt.AuthenticationCallback

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

Summary

Public constructors

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

Public methods
open Unit
onAuthenticationError(errorCode: Int, @NonNull errString: CharSequence)

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

open Unit

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

open Unit

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

Public constructors

<init>

AuthenticationCallback()

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

Public methods

onAuthenticationError

open fun onAuthenticationError(
    errorCode: Int,
    @NonNull 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

open fun onAuthenticationFailed(): Unit

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

onAuthenticationSucceeded

open fun onAuthenticationSucceeded(@NonNull 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.