Interface DeviceAuthenticationCallback


public interface DeviceAuthenticationCallback
Callback to update the status of the user authentication (for example, during a payment process).
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(int fpErrorCode)
    Only applicable for biometric/bio-fingerprint authentication.
    void
    User authentication failed.
    void
    onHelp(int fpCode, CharSequence detail)
    Only applicable for biometric/bio-fingerprint authentication.
    void
    End user is authenticated, the process will proceed to the next step.
  • Method Details

    • onSuccess

      void onSuccess()
      End user is authenticated, the process will proceed to the next step.
    • onFailed

      void onFailed()
      User authentication failed.

      Application should handle accordingly. For example, if biometrics/bio-fingerprint authentication fails, the application is suggested to use device keyguard as a fallback to the end user.

    • onError

      void onError(int fpErrorCode)
      Only applicable for biometric/bio-fingerprint authentication.

      The system returned an error while authenticating the user. For example, user uses the wrong finger for fingerprint authentication. Application is suggested to use device keyguard as a fallback to authenticate the user.

      Parameters:
      fpErrorCode - The system biometric/bio-fingerprint error on authentication.
      See Also:
    • onHelp

      void onHelp(int fpCode, @NonNull CharSequence detail)
      Only applicable for biometric/bio-fingerprint authentication.

      This API is called whenever a recoverable error occurs during the authentication process. The end user is expected to try again, otherwise, the application will trigger the device keyguard fallback.

      Parameters:
      fpCode - The help codes to the errors of biometric/bio-fingerprint authentication.
      detail - Details of the help message.
      See Also: