# PendingIntentHandler

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

*** ** * ** ***


```
class PendingIntentHandler
```

<br />

*** ** * ** ***

PendingIntentHandler to be used by credential providers to extract requests from a given intent, or to set back a response or an exception to a given intent while dealing with activities invoked by pending intents set on a `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CreateEntry` for the create flow, or on a `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/Action`, or a `https://developer.android.com/reference/kotlin/androidx/credentials/provider/RemoteEntry` set for a get flow.

When user selects one of the entries mentioned above, the credential provider's corresponding activity is invoked. The intent associated with this activity must be extracted and passed into the utils in this class to extract the required requests.

When user interaction is complete, credential providers must set the activity result by calling `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` by setting an appropriate result code and data of type `https://developer.android.com/reference/android/content/Intent.html`. This data should also be prepared by using the utils in this class to populate the required response/exception.

See extension functions for `https://developer.android.com/reference/android/content/Intent.html` in IntentHandlerConverters.kt to help test intents that are set on pending intents in different entry classes.

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#retrieveBeginGetCredentialRequest(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system when the user selects an `https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction`. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderCreateCredentialRequest?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#retrieveProviderCreateCredentialRequest(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderCreateCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#retrieveProviderGetCredentialRequest(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html)` Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system, when the user selects a `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setBeginGetCredentialResponse(android.content.Intent,androidx.credentials.provider.BeginGetCredentialResponse)( intent: https://developer.android.com/reference/android/content/Intent.html, response: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse )` Sets the `https://developer.android.com/reference/android/service/credentials/BeginGetCredentialResponse.html` on the intent passed in. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setCreateCredentialException(android.content.Intent,androidx.credentials.exceptions.CreateCredentialException)( intent: https://developer.android.com/reference/android/content/Intent.html, exception: https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/CreateCredentialException )` Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/CreateCredentialException` if an error is encountered during the final phase of the create credential flow. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setCreateCredentialResponse(android.content.Intent,androidx.credentials.CreateCredentialResponse)( intent: https://developer.android.com/reference/android/content/Intent.html, response: https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse )` Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse` on the intent passed in. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setGetCredentialException(android.content.Intent,androidx.credentials.exceptions.GetCredentialException)( intent: https://developer.android.com/reference/android/content/Intent.html, exception: https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/GetCredentialException )` Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/GetCredentialException` if an error is encountered during the final phase of the get credential flow. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setGetCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse))(intent: https://developer.android.com/reference/android/content/Intent.html, response: https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse)` **This function is deprecated.** Use setGetCredentialResponse(Intent, GetCredentialResponse, ProviderGetCredentialRequest) instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)( intent: https://developer.android.com/reference/android/content/Intent.html, response: https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse, request: https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest )` Sets the `https://developer.android.com/reference/android/credentials/GetCredentialResponse.html` on the intent passed in. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#PendingIntentHandler()()` |

## Public companion functions

### retrieveBeginGetCredentialRequest

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

```
fun retrieveBeginGetCredentialRequest(intent: Intent): BeginGetCredentialRequest?
```

Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system when the user selects an `https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction`.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent associated with the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#retrieveBeginGetCredentialRequest(android.content.Intent)` is null |

### retrieveProviderCreateCredentialRequest

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

```
fun retrieveProviderCreateCredentialRequest(intent: Intent): ProviderCreateCredentialRequest?
```

Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderCreateCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent associated with the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#retrieveProviderCreateCredentialRequest(android.content.Intent)` is null |

### retrieveProviderGetCredentialRequest

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

```
fun retrieveProviderGetCredentialRequest(intent: Intent): ProviderGetCredentialRequest?
```

Extracts the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` from the provider's `https://developer.android.com/reference/android/app/PendingIntent.html` invoked by the Android system, when the user selects a `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent associated with the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#retrieveProviderGetCredentialRequest(android.content.Intent)` is null |

### setBeginGetCredentialResponse

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

```
fun setBeginGetCredentialResponse(
    intent: Intent,
    response: BeginGetCredentialResponse
): Unit
```

Sets the `https://developer.android.com/reference/android/service/credentials/BeginGetCredentialResponse.html` on the intent passed in. This intent is then set as the data associated with the result of the activity invoked by the `https://developer.android.com/reference/android/app/PendingIntent.html`, set on an `https://developer.android.com/reference/kotlin/androidx/credentials/provider/AuthenticationAction`. The intent is set using the `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` method that takes in the intent, as well as a result code.

A credential provider must set the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` if a valid response, or a valid exception is being set as part of the data to the result. However, if the credential provider is unable to resolve to a valid response or exception, the result code must be set to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED`. Note that setting the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` will re-surface the account selection bottom sheet that displayed the original `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`, hence allowing the user to re-select.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `response: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse` | the response to be set as an extra on the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setBeginGetCredentialResponse(android.content.Intent,androidx.credentials.provider.BeginGetCredentialResponse)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setBeginGetCredentialResponse(android.content.Intent,androidx.credentials.provider.BeginGetCredentialResponse)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setBeginGetCredentialResponse(android.content.Intent,androidx.credentials.provider.BeginGetCredentialResponse)` is null |

### setCreateCredentialException

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

```
fun setCreateCredentialException(
    intent: Intent,
    exception: CreateCredentialException
): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/CreateCredentialException` if an error is encountered during the final phase of the create credential flow.

A credential provider service returns a list of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CreateEntry` as part of the `https://developer.android.com/reference/android/service/credentials/BeginCreateCredentialResponse.html` to the query phase of the get-credential flow.

If the user selects one of these entries, the corresponding `https://developer.android.com/reference/android/app/PendingIntent.html` is fired and the provider's activity is invoked. If there is an error encountered during the lifetime of that activity, the provider must use this API to set an exception before finishing the activity.

The intent is set using the `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` method that takes in the intent, as well as a result code. A credential provider must set the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` if a valid credential, or a valid exception is being set as the data to the result. However, if the credential provider is unable to resolve to a valid response or exception, the result code must be set to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED`.

Note that setting the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` will re-surface the account selection bottom sheet that displayed the original `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CreateEntry`, hence allowing the user to re-select.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `exception: https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/CreateCredentialException` | the exception to be set as an extra to the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialException(android.content.Intent,androidx.credentials.exceptions.CreateCredentialException)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialException(android.content.Intent,androidx.credentials.exceptions.CreateCredentialException)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialException(android.content.Intent,androidx.credentials.exceptions.CreateCredentialException)` is null |

### setCreateCredentialResponse

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

```
fun setCreateCredentialResponse(
    intent: Intent,
    response: CreateCredentialResponse
): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse` on the intent passed in. This intent is then set as the data associated with the result of the activity invoked by the `https://developer.android.com/reference/android/app/PendingIntent.html` set on a `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CreateEntry`. The intent is set using the `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` method that takes in the intent, as well as a result code.

A credential provider must set the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` if a valid response, or a valid exception is being set as the data to the result. However, if the credential provider is unable to resolve to a valid response or exception, the result code must be set to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED`. Note that setting the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` will re-surface the account selection bottom sheet that displayed the original `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`, hence allowing the user to re-select.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `response: https://developer.android.com/reference/kotlin/androidx/credentials/CreateCredentialResponse` | the response to be set as an extra on the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialResponse(android.content.Intent,androidx.credentials.CreateCredentialResponse)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialResponse(android.content.Intent,androidx.credentials.CreateCredentialResponse)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setCreateCredentialResponse(android.content.Intent,androidx.credentials.CreateCredentialResponse)` is null |

### setGetCredentialException

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

```
fun setGetCredentialException(
    intent: Intent,
    exception: GetCredentialException
): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/GetCredentialException` if an error is encountered during the final phase of the get credential flow.

A credential provider service returns a list of `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html` as part of the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse` to the query phase of the get-credential flow. If the user selects one of these entries, the corresponding `https://developer.android.com/reference/android/app/PendingIntent.html` is fired and the provider's activity is invoked. If there is an error encountered during the lifetime of that activity, the provider must use this API to set an exception on the given intent before finishing the activity in question.

The intent is set using the `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` method that takes in the intent, as well as a result code. A credential provider must set the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` if a valid credential, or a valid exception is being set as the data to the result. However, if the credential provider is unable to resolve to a valid response or exception, the result code must be set to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED`.

Note that setting the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` will re-surface the account selection bottom sheet that displayed the original `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`, hence allowing the user to re-select.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `exception: https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/GetCredentialException` | the exception to be set as an extra to the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialException(android.content.Intent,androidx.credentials.exceptions.GetCredentialException)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialException(android.content.Intent,androidx.credentials.exceptions.GetCredentialException)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialException(android.content.Intent,androidx.credentials.exceptions.GetCredentialException)` is null |

### setGetCredentialResponse

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

```
fun [setGetCredentialResponse](https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse))(intent: Intent, response: GetCredentialResponse): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use setGetCredentialResponse(Intent, GetCredentialResponse, ProviderGetCredentialRequest) instead, use this instead:
>
> ```kotlin
> setGetCredentialResponse(intent, response, request)
> ```

Sets the `https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse` on the intent passed in.

This API is deprecated and will be removed in Credentials 2.0. Use setGetCredentialResponse(Intent, GetCredentialResponse, ProviderGetCredentialRequest) instead.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `response: https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse` | the response to be set as an extra on the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse)` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse)` is null |

### setGetCredentialResponse

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

```
fun setGetCredentialResponse(
    intent: Intent,
    response: GetCredentialResponse,
    request: ProviderGetCredentialRequest
): Unit
```

Sets the `https://developer.android.com/reference/android/credentials/GetCredentialResponse.html` on the intent passed in. This intent is then set as the data associated with the result of the activity invoked by the `https://developer.android.com/reference/android/app/PendingIntent.html`, set on a `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`. The intent is set using the `https://developer.android.com/reference/android/app/Activity.html#setResult(int)` method that takes in the intent, as well as a result code.

A credential provider must set the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_OK` if a valid credential, or a valid exception is being set as the data to the result. However, if the credential provider is unable to resolve to a valid response or exception, the result code must be set to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED`. Note that setting the result code to `https://developer.android.com/reference/android/app/Activity.html#RESULT_CANCELED` will re-surface the account selection bottom sheet that displayed the original `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html`, hence allowing the user to re-select.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html` | the intent to be set on the result of the `https://developer.android.com/reference/android/app/Activity.html` invoked through the `https://developer.android.com/reference/android/app/PendingIntent.html` |
| `response: https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse` | the response to be set as an extra on the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)` |
| `request: https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` | the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/ProviderGetCredentialRequest` that this `response` fulfills, retrieved through the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#retrieveProviderGetCredentialRequest(android.content.Intent)` method |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler.Companion#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)` is null |

## Public constructors

### PendingIntentHandler

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

```
PendingIntentHandler()
```