# CredentialManagerCallback

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

*** ** * ** ***


```
public interface CredentialManagerCallback<R extends Object, E extends Object>
```

<br />

*** ** * ** ***

Callback interface intended for use when an asynchronous Credential Manager operation may result in a failure.

This interface may be used in cases where an asynchronous Credential Manager API may complete either with a value, or an exception.

| Parameters |
|---|---|
| `<R extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the result that's being sent |
| `<E extends https://developer.android.com/reference/java/lang/Object.html>` | the type of the exception being returned |

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback#onError(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull E e)` |
| `abstract void` | `https://developer.android.com/reference/androidx/credentials/CredentialManagerCallback#onResult(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull R result)` |

## Public methods

### onError

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

```
abstract void onError(@NonNull E e)
```

### onResult

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

```
abstract void onResult(@NonNull R result)
```