public interface DeviceAuthenticationCallback
Modifier and Type | Method and Description |
---|---|
void |
onError(int fpErrorCode)
Only applicable for biometric/bio-fingerprint.
|
void |
onFailed()
User authentication failed.
|
void |
onHelp(int fpCode,
CharSequence detail)
Only applicable for biometric/bio-fingerprint.
|
void |
onSuccess()
User is authenticated, process will continue next step
|
void onSuccess()
void onFailed()
Application should handle accordingly example if biometric/bio-fingerprint failed, app can suggest user to fallback to use keyguard
void onError(int fpErrorCode)
System returned error while doing user authenticate e.g. user touch wrong finger. Application is suggested to fallback to use keyguard to authenticate the user.
fpErrorCode
- The system biometric/bio-fingerprint error.BiometricPrompt.AuthenticationCallback
,
Biometric prompt error codesvoid onHelp(int fpCode, @NonNull CharSequence detail)
This API is called whenever a recoverable error occurred during the authentication process. The end-user is expected to try again or application to trigger the Keyguard fallback.
fpCode
- The help codedetail
- The help message detailBiometricPrompt.AuthenticationCallback
,
Biometric prompt help codes