# BiometricPromptResult

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/BiometricPromptResult.kt+class:androidx.credentials.provider.BiometricPromptResult) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

*** ** * ** ***

<br />

```
public final class BiometricPromptResult
```

<br />

*** ** * ** ***

The result of a Biometric Prompt authentication flow, that is propagated to the provider if the provider requested for `https://developer.android.com/reference/androidx/credentials/CredentialManager` to handle the authentication flow.

An instance of this class will always be part of the final provider request, either the `https://developer.android.com/reference/androidx/credentials/provider/ProviderGetCredentialRequest` or the `https://developer.android.com/reference/androidx/credentials/provider/ProviderCreateCredentialRequest` that the provider receives after the user selects a `https://developer.android.com/reference/androidx/credentials/provider/CredentialEntry` or a `https://developer.android.com/reference/androidx/credentials/provider/CreateEntry` respectively.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#BiometricPromptResult(androidx.credentials.provider.AuthenticationError)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError authenticationError)` An unsuccessful biometric prompt result, denoting that authentication has failed. |
| `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#BiometricPromptResult(androidx.credentials.provider.AuthenticationResult)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/AuthenticationResult authenticationResult )` A successful biometric prompt result, denoting that authentication has succeeded. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError` | `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#getAuthenticationError()()` error information, non-null if the authentication flow has failured, meaning that `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#isSuccessful()` will be false in this case |
| `final https://developer.android.com/reference/androidx/credentials/provider/AuthenticationResult` | `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#getAuthenticationResult()()` the result of the authentication flow, non-null if the authentication flow was successful |
| `int` | `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#isSuccessful()()` whether the result is a success result, in which case `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#authenticationResult()` should be non-null |

## Public constructors

### BiometricPromptResult

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
public BiometricPromptResult(@NonNull AuthenticationError authenticationError)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError authenticationError` | the error that caused the biometric prompt authentication flow to fail |

### BiometricPromptResult

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
public BiometricPromptResult(
    @NonNull AuthenticationResult authenticationResult
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/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](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
public final AuthenticationError getAuthenticationError()
```

error information, non-null if the authentication flow has failured, meaning that `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#isSuccessful()` will be false in this case

### getAuthenticationResult

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
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](https://developer.android.com/jetpack/androidx/releases/credentials#1.5.0)

```
public final boolean isSuccessful()
```

whether the result is a success result, in which case `https://developer.android.com/reference/androidx/credentials/provider/BiometricPromptResult#authenticationResult()` should be non-null