Most visited

Recently visited

Added in API level 23

FingerprintManager.AuthenticationCallback

public static abstract class FingerprintManager.AuthenticationCallback
extends Object

java.lang.Object
   ↳ android.hardware.fingerprint.FingerprintManager.AuthenticationCallback


回调结构提供给authenticate(CryptoObject, CancellationSignal, int, AuthenticationCallback, Handler) authenticate(CryptoObject, CancellationSignal, int, AuthenticationCallback, Handler)用户必须提供这个实现来监听指纹事件。

Summary

Public constructors

FingerprintManager.AuthenticationCallback()

Public methods

void onAuthenticationError(int errorCode, CharSequence errString)

当遇到不可恢复的错误并且操作完成时调用。

void onAuthenticationFailed()

当指纹有效但未被识别时调用。

void onAuthenticationHelp(int helpCode, CharSequence helpString)

在认证期间遇到可恢复的错误时调用。

void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)

在识别指纹时调用。

Inherited methods

From class java.lang.Object

Public constructors

FingerprintManager.AuthenticationCallback

Added in API level 23
FingerprintManager.AuthenticationCallback ()

Public methods

onAuthenticationError

Added in API level 23
void onAuthenticationError (int errorCode, 
                CharSequence errString)

当遇到不可恢复的错误并且操作完成时调用。 此对象不会进一步回调。

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
void onAuthenticationFailed ()

当指纹有效但未被识别时调用。

onAuthenticationHelp

Added in API level 23
void onAuthenticationHelp (int helpCode, 
                CharSequence helpString)

在认证期间遇到可恢复的错误时调用。 提供帮助字符串是为了向用户提供有关出错的指导,例如“传感器脏,请清洁它。”

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
void onAuthenticationSucceeded (FingerprintManager.AuthenticationResult result)

在识别指纹时调用。

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

Hooray!