Added in API level 23
Deprecated in API level 28

AuthenticationCallback

abstract class AuthenticationCallback
kotlin.Any
   ↳ android.hardware.fingerprint.FingerprintManager.AuthenticationCallback

Callback structure provided to FingerprintManager#authenticate(CryptoObject,. Users of android.hardware.fingerprint.FingerprintManager#authenticate(android.hardware.fingerprint.FingerprintManager.CryptoObject,android.os.CancellationSignal,int,android.hardware.fingerprint.FingerprintManager.AuthenticationCallback,android.os.Handler) must provide an implementation of this for listening to fingerprint 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 fingerprint 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 fingerprint is recognized.

Public constructors

AuthenticationCallback

AuthenticationCallback()

Public methods

onAuthenticationError

Added in API level 23
open fun onAuthenticationError(
    errorCode: Int,
    errString: CharSequence!
): Unit

Deprecated: Deprecated in Java.

Called when an unrecoverable error has been encountered and the operation is complete. No further callbacks 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 in UI

onAuthenticationFailed

Added in API level 23
open fun onAuthenticationFailed(): Unit

Deprecated: Deprecated in Java.

Called when a fingerprint is valid but not recognized.

onAuthenticationHelp

Added in API level 23
open fun onAuthenticationHelp(
    helpCode: Int,
    helpString: CharSequence!
): Unit

Deprecated: Deprecated in Java.

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 in UI

onAuthenticationSucceeded

Added in API level 23
open fun onAuthenticationSucceeded(result: FingerprintManager.AuthenticationResult!): Unit

Deprecated: Deprecated in Java.

Called when a fingerprint is recognized.

Parameters
result FingerprintManager.AuthenticationResult!: An object containing authentication-related data