# PendingGetCredentialRequest

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

*** ** * ** ***

<br />

```
public final class PendingGetCredentialRequest
```

<br />

*** ** * ** ***

Request to be set on an Android `https://developer.android.com/reference/android/view/View.html`, which will be invoked when the `https://developer.android.com/reference/android/view/View.html` is focused/clicked by the user.

Note that the `https://developer.android.com/reference/androidx/credentials/PendingGetCredentialRequest#callback()` only handles a final `https://developer.android.com/reference/androidx/credentials/GetCredentialResponse` and no errors are propagated to the callback.

See `https://developer.android.com/reference/android/view/View.html#setPendingCredentialRequest(android.credentials.GetCredentialRequest, android.os.OutcomeReceiver&lt;android.credentials.GetCredentialResponse,android.credentials.GetCredentialException&gt;)` for details on how this request will be used.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/PendingGetCredentialRequest#PendingGetCredentialRequest(androidx.credentials.GetCredentialRequest,kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/GetCredentialRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/GetCredentialResponse, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> callback )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/GetCredentialResponse, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>` | `https://developer.android.com/reference/androidx/credentials/PendingGetCredentialRequest#getCallback()()` the callback on which the final `https://developer.android.com/reference/androidx/credentials/GetCredentialResponse` is returned, after the user has made its selections |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/GetCredentialRequest` | `https://developer.android.com/reference/androidx/credentials/PendingGetCredentialRequest#getRequest()()` the `https://developer.android.com/reference/androidx/credentials/GetCredentialRequest` to be invoked when a given view on which this request is set is focused |

## Public constructors

### PendingGetCredentialRequest

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

```
public PendingGetCredentialRequest(
    @NonNull GetCredentialRequest request,
    @NonNull Function1<@NonNull GetCredentialResponse, Unit> callback
)
```

## Public methods

### getCallback

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

```
public final @NonNull Function1<@NonNull GetCredentialResponse, Unit> getCallback()
```

the callback on which the final `https://developer.android.com/reference/androidx/credentials/GetCredentialResponse` is returned, after the user has made its selections

### getRequest

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

```
public final @NonNull GetCredentialRequest getRequest()
```

the `https://developer.android.com/reference/androidx/credentials/GetCredentialRequest` to be invoked when a given view on which this request is set is focused