AuthenticationCallback
abstract class AuthenticationCallback
kotlin.Any | |
↳ | androidx.core.hardware.fingerprint.FingerprintManagerCompat.AuthenticationCallback |
Callback structure provided to FingerprintManagerCompat#authenticate(CryptoObject, * int, CancellationSignal, AuthenticationCallback, Handler)
. Users of
must provide an implementation of this for listening to fingerprint events.
Summary
Public constructors | |
---|---|
<init>() Callback structure provided to |
Public methods | |
---|---|
open Unit |
onAuthenticationError(errMsgId: 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(helpMsgId: Int, helpString: CharSequence!) Called when a recoverable error has been encountered during authentication. |
open Unit |
Called when a fingerprint is recognized. |
Public constructors
<init>
AuthenticationCallback()
Callback structure provided to FingerprintManagerCompat#authenticate(CryptoObject, * int, CancellationSignal, AuthenticationCallback, Handler)
. Users of
must provide an implementation of this for listening to fingerprint events.
Public methods
onAuthenticationError
open fun onAuthenticationError(
errMsgId: Int,
errString: CharSequence!
): Unit
Called when an unrecoverable error has been encountered and the operation is complete. No further callbacks will be made on this object.
Parameters | |
---|---|
errMsgId |
Int: An integer identifying the error message |
errString |
CharSequence!: A human-readable error string that can be shown in UI |
onAuthenticationFailed
open fun onAuthenticationFailed(): Unit
Called when a fingerprint is valid but not recognized.
onAuthenticationHelp
open fun onAuthenticationHelp(
helpMsgId: 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 | |
---|---|
helpMsgId |
Int: An integer identifying the error message |
helpString |
CharSequence!: A human-readable string that can be shown in UI |
onAuthenticationSucceeded
open fun onAuthenticationSucceeded(result: FingerprintManagerCompat.AuthenticationResult!): Unit
Called when a fingerprint is recognized.
Parameters | |
---|---|
result |
FingerprintManagerCompat.AuthenticationResult!: An object containing authentication-related data |