BiometricPromptResult


public final class BiometricPromptResult


The result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for androidx.credentials.CredentialManager to handle the authentication flow.

An instance of this class will always be part of the final provider request, either the ProviderGetCredentialRequest or the ProviderCreateCredentialRequest that the provider receives after the user selects a CredentialEntry or a CreateEntry respectively.

Summary

Public constructors

An unsuccessful biometric prompt result, denoting that authentication has failed.

BiometricPromptResult(
    @NonNull AuthenticationResult authenticationResult
)

A successful biometric prompt result, denoting that authentication has succeeded.

Public methods

boolean
equals(Object other)
final AuthenticationError

error information, non-null if the authentication flow has failured, meaning that isSuccessful will be false in this case

final AuthenticationResult

the result of the authentication flow, non-null if the authentication flow was successful

int
final boolean

whether the result is a success result, in which case authenticationResult should be non-null

Public constructors

BiometricPromptResult

Added in 1.5.0-alpha02
public BiometricPromptResult(@NonNull AuthenticationError authenticationError)

An unsuccessful biometric prompt result, denoting that authentication has failed.

Parameters
@NonNull AuthenticationError authenticationError

the error that caused the biometric prompt authentication flow to fail

BiometricPromptResult

Added in 1.5.0-alpha02
public BiometricPromptResult(
    @NonNull AuthenticationResult authenticationResult
)

A successful biometric prompt result, denoting that authentication has succeeded.

Parameters
@NonNull AuthenticationResult authenticationResult

the result after a successful biometric prompt authentication operation

Public methods

equals

public boolean equals(Object other)

getAuthenticationError

Added in 1.5.0-alpha02
public final AuthenticationError getAuthenticationError()

error information, non-null if the authentication flow has failured, meaning that isSuccessful will be false in this case

getAuthenticationResult

Added in 1.5.0-alpha02
public final AuthenticationResult getAuthenticationResult()

the result of the authentication flow, non-null if the authentication flow was successful

hashCode

public int hashCode()

isSuccessful

Added in 1.5.0-alpha02
public final boolean isSuccessful()

whether the result is a success result, in which case authenticationResult should be non-null