# ProviderGetCredentialRequest

Added in 1.0.0-alpha05

*** ** * ** ***


```
public final class ProviderGetCredentialRequest
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final https://developer.android.com/reference/androidx/credentials/registry/provider/SelectedCredentialSet` | `https://developer.android.com/reference/androidx/credentials/registry/provider/ProviderGetCredentialRequest#(androidx.credentials.provider.ProviderGetCredentialRequest).getSelectedCredentialSet()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/ProviderGetCredentialRequest receiver)` Returns credential set selected by the user. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/registry/provider/ProviderGetCredentialRequest#(androidx.credentials.provider.ProviderGetCredentialRequest).getSelectedEntryId()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/ProviderGetCredentialRequest receiver)` Returns the id of the entry selected by the user. |

## Public methods

### getSelectedCredentialSet

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderGetCredentialRequest.kt+symbol:selectedCredentialSet) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
public static final SelectedCredentialSet getSelectedCredentialSet(@NonNull ProviderGetCredentialRequest receiver)
```

Returns credential set selected by the user.

A null return means that the credential user case isn't registry based. In other words, it means the credentials weren't registered through the `https://developer.android.com/reference/androidx/credentials/registry/provider/RegistryManager#registerCredentials(androidx.credentials.registry.provider.RegisterCredentialsRequest)` API.

For how to handle a user selection and extract the `https://developer.android.com/reference/androidx/credentials/provider/ProviderGetCredentialRequest` containing the selection information, see `https://developer.android.com/reference/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()`.

### getSelectedEntryId

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderGetCredentialRequest.kt+symbol:selectedEntryId) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
public static final String getSelectedEntryId(@NonNull ProviderGetCredentialRequest receiver)
```

Returns the id of the entry selected by the user. For example, for a digital credential entry, this maps to the corresponding entry's `https://developer.android.com/reference/androidx/credentials/registry/provider/digitalcredentials/DigitalCredentialEntry#id()`.

A null return means that entry ID isn't supported for the given type of the use case at all. For example, a `https://developer.android.com/reference/androidx/credentials/provider/PasswordCredentialEntry` does not have an id property and so this getter will return null if the selected entry was a password credential.

For how to handle a user selection and extract the `https://developer.android.com/reference/androidx/credentials/provider/ProviderGetCredentialRequest` containing the selection information, see `https://developer.android.com/reference/androidx/credentials/registry/provider/RegistryManager#ACTION_GET_CREDENTIAL()`.