# BiometricPrompt.AuthenticationCallback

Artifact: [androidx.biometric:biometric](https://developer.android.com/jetpack/androidx/releases/biometric) [View Source](https://cs.android.com/search?q=file:androidx/biometric/BiometricPrompt.java+class:androidx.biometric.BiometricPrompt.AuthenticationCallback) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/biometric#1.0.0)

*** ** * ** ***


```
public abstract class BiometricPrompt.AuthenticationCallback
```

<br />

*** ** * ** ***

A collection of methods that may be invoked by `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` during authentication.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationCallback#AuthenticationCallback()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationCallback#onAuthenticationError(int,java.lang.CharSequence)(int errorCode, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html errString)` Called when an unrecoverable error has been encountered and authentication has stopped. |
| `void` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationCallback#onAuthenticationFailed()()` Called when a biometric (e.g. fingerprint, face, etc.) is presented but not recognized as belonging to the user. |
| `void` | `https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationCallback#onAuthenticationSucceeded(androidx.biometric.BiometricPrompt.AuthenticationResult)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationResult result )` Called when a biometric (e.g. fingerprint, face, etc.) is recognized, indicating that the user has successfully authenticated. |

## Public constructors

### AuthenticationCallback

Added in 1.0.0

```
public AuthenticationCallback()
```

## Public methods

### onAuthenticationError

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

```
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString)
```

Called when an unrecoverable error has been encountered and authentication has stopped.

After this method is called, no further events will be sent for the current authentication session.

| Parameters |
|---|---|
| `int errorCode` | An integer ID associated with the error. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html errString` | A human-readable string that describes the error. |

### onAuthenticationFailed

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

```
public void onAuthenticationFailed()
```

Called when a biometric (e.g. fingerprint, face, etc.) is presented but not recognized as belonging to the user.

### onAuthenticationSucceeded

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

```
public void onAuthenticationSucceeded(
    @NonNull BiometricPrompt.AuthenticationResult result
)
```

Called when a biometric (e.g. fingerprint, face, etc.) is recognized, indicating that the user has successfully authenticated.

After this method is called, no further events will be sent for the current authentication session.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/biometric/BiometricPrompt.AuthenticationResult result` | An object containing authentication-related data. |