# PublicKeyCredentialEntry

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

*** ** * ** ***

<br />

```
@RequiresApi(value = 23)
class PublicKeyCredentialEntry : CredentialEntry
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.credentials.provider.CredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry) ||
|   | ↳ | [androidx.credentials.provider.PublicKeyCredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry) |

*** ** * ** ***

A public key credential entry that is displayed on the account selector UI. This entry denotes that a credential of type `https://developer.android.com/reference/kotlin/androidx/credentials/PublicKeyCredential#TYPE_PUBLIC_KEY_CREDENTIAL()` is available for the user to select.

Once this entry is selected, the corresponding `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#pendingIntent()` will be invoked. The provider can then show any activity they wish to. Before finishing the activity, provider must set the final `https://developer.android.com/reference/kotlin/androidx/credentials/GetCredentialResponse` through the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PendingIntentHandler#setGetCredentialResponse(android.content.Intent,androidx.credentials.GetCredentialResponse,androidx.credentials.provider.ProviderGetCredentialRequest)` helper API.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#username()` is empty |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry` |

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#fromCredentialEntry(android.service.credentials.CredentialEntry)(credentialEntry: https://developer.android.com/reference/android/service/credentials/CredentialEntry.html)` Converts a framework `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html` class to a Jetpack `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry` class |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#PublicKeyCredentialEntry(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)( context: https://developer.android.com/reference/android/content/Context.html, username: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html, beginGetPublicKeyCredentialOption: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPublicKeyCredentialOption, displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?, lastUsedTime: https://developer.android.com/reference/java/time/Instant.html?, icon: https://developer.android.com/reference/android/graphics/drawable/Icon.html, isAutoSelectAllowed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, isDefaultIconPreferredAsSingleProvider: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 35) https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#PublicKeyCredentialEntry(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)( context: https://developer.android.com/reference/android/content/Context.html, username: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html, beginGetPublicKeyCredentialOption: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPublicKeyCredentialOption, displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?, lastUsedTime: https://developer.android.com/reference/java/time/Instant.html?, icon: https://developer.android.com/reference/android/graphics/drawable/Icon.html, isAutoSelectAllowed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, isDefaultIconPreferredAsSingleProvider: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, biometricPromptData: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BiometricPromptData? )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#displayName()` the displayName of the account holding the public key credential |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#hasDefaultIcon()` whether this entry was created without a custom icon and hence contains a default icon set by the library, only to be used in Android API levels \>= 28 |
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#icon()` the icon to be displayed with this entry on the UI, must be created using `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithResource(android.content.Context, int)` when possible, and especially not with `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithBitmap(android.graphics.Bitmap)` as the latter consumes more memory and may cause undefined behavior due to memory implications on internal transactions; defaulted to a fallback public key credential icon if not provided |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#isAutoSelectAllowed()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#isAutoSelectAllowedFromOption()` whether the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#beginGetCredentialOption()` request for which this entry was created allows this entry to be auto-selected |
| `https://developer.android.com/reference/java/time/Instant.html?` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#lastUsedTime()` the last used time of this entry. |
| `https://developer.android.com/reference/android/app/PendingIntent.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#pendingIntent()` the `https://developer.android.com/reference/android/app/PendingIntent.html` that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE` to allow the Android system to attach the final request, and NOT with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT` as it can be invoked multiple times |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#typeDisplayName()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#username()` the username of the account holding the public key credential |

### Inherited properties

From [androidx.credentials.provider.CredentialEntry](https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#affiliatedDomain()`

the user visible affiliated domain, a CharSequence representation of a web domain or an app package name that the given credential in this entry is associated with when it is different from the requesting entity, default null
`https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialOption` `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#beginGetCredentialOption()`

the option from the original `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest`, for which this credential entry is being added
`https://developer.android.com/reference/kotlin/androidx/credentials/provider/BiometricPromptData?` `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#biometricPromptData()`

the data that is set optionally to utilize a credential manager flow that directly handles the biometric verification and presents back the response; set to null by default, so if not opted in, the embedded biometric prompt flow will not show
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#entryGroupId()`

an ID used for deduplication or to group entries during display
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#isDefaultIconPreferredAsSingleProvider()`

when set to true, the UI prefers to render the default credential type icon when you are the only available provider; see individual subclasses for these default icons (e.g. for `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry`, it is based on `R.drawable.adx_ic_password`)

## Public companion functions

### fromCredentialEntry

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

```
fun fromCredentialEntry(credentialEntry: CredentialEntry): PublicKeyCredentialEntry?
```

Converts a framework `https://developer.android.com/reference/android/service/credentials/CredentialEntry.html` class to a Jetpack `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry` class

Note that this API is not needed in a general credential retrieval flow that is implemented using this jetpack library, where you are only required to construct an instance of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry` to populate the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialResponse`.

| Parameters |
|---|---|
| `credentialEntry: https://developer.android.com/reference/android/service/credentials/CredentialEntry.html` | the instance of framework class to be converted |

## Public constructors

### PublicKeyCredentialEntry

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

```
PublicKeyCredentialEntry(
    context: Context,
    username: CharSequence,
    pendingIntent: PendingIntent,
    beginGetPublicKeyCredentialOption: BeginGetPublicKeyCredentialOption,
    displayName: CharSequence? = null,
    lastUsedTime: Instant? = null,
    icon: Icon = Icon.createWithResource(context, R.drawable.adx_ic_passkey),
    isAutoSelectAllowed: Boolean = false,
    isDefaultIconPreferredAsSingleProvider: Boolean = false
)
```

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | the context of the calling app, required to retrieve fallback resources |
| `username: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | the username of the account holding the public key credential |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | the `https://developer.android.com/reference/android/app/PendingIntent.html` that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE` to allow the Android system to attach the final request, and NOT with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT` as it can be invoked multiple times |
| `beginGetPublicKeyCredentialOption: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPublicKeyCredentialOption` | the option from the original `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest`, for which this credential entry is being added |
| `displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html? = null` | the displayName of the account holding the public key credential |
| `lastUsedTime: https://developer.android.com/reference/java/time/Instant.html? = null` | the last used time the credential underlying this entry was used by the user, distinguishable up to the milli second mark only such that if two entries have the same millisecond precision, they will be considered to have been used at the same time |
| `icon: https://developer.android.com/reference/android/graphics/drawable/Icon.html = Icon.createWithResource(context, R.drawable.adx_ic_passkey)` | the icon to be displayed with this entry on the selector, if not set, a default icon representing a public key credential type is set by the library |
| `isAutoSelectAllowed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether this entry is allowed to be auto selected if it is the only one on the UI, only takes effect if the app requesting for credentials also opts for auto select |
| `isDefaultIconPreferredAsSingleProvider: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | when set to true, the UI prefers to render the default credential type icon (see the default value of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)`) when you are the only available provider; false by default |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)` is null |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean)` is empty |

### PublicKeyCredentialEntry

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

```
@RequiresApi(value = 35)
PublicKeyCredentialEntry(
    context: Context,
    username: CharSequence,
    pendingIntent: PendingIntent,
    beginGetPublicKeyCredentialOption: BeginGetPublicKeyCredentialOption,
    displayName: CharSequence? = null,
    lastUsedTime: Instant? = null,
    icon: Icon = Icon.createWithResource(context, R.drawable.adx_ic_passkey),
    isAutoSelectAllowed: Boolean = false,
    isDefaultIconPreferredAsSingleProvider: Boolean = false,
    biometricPromptData: BiometricPromptData? = null
)
```

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | the context of the calling app, required to retrieve fallback resources |
| `username: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | the username of the account holding the public key credential |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | the `https://developer.android.com/reference/android/app/PendingIntent.html` that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE` to allow the Android system to attach the final request, and NOT with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT` as it can be invoked multiple times |
| `beginGetPublicKeyCredentialOption: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetPublicKeyCredentialOption` | the option from the original `https://developer.android.com/reference/kotlin/androidx/credentials/provider/BeginGetCredentialRequest`, for which this credential entry is being added |
| `displayName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html? = null` | the displayName of the account holding the public key credential |
| `lastUsedTime: https://developer.android.com/reference/java/time/Instant.html? = null` | the last used time the credential underlying this entry was used by the user, distinguishable up to the milli second mark only such that if two entries have the same millisecond precision, they will be considered to have been used at the same time |
| `icon: https://developer.android.com/reference/android/graphics/drawable/Icon.html = Icon.createWithResource(context, R.drawable.adx_ic_passkey)` | the icon to be displayed with this entry on the selector, if not set, a default icon representing a public key credential type is set by the library |
| `isAutoSelectAllowed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether this entry is allowed to be auto selected if it is the only one on the UI, only takes effect if the app requesting for credentials also opts for auto select |
| `isDefaultIconPreferredAsSingleProvider: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | when set to true, the UI prefers to render the default credential type icon (see the default value of `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)`) when you are the only available provider; false by default |
| `biometricPromptData: https://developer.android.com/reference/kotlin/androidx/credentials/provider/BiometricPromptData? = null` | the data that is set optionally to utilize a credential manager flow that directly handles the biometric verification and presents back the response; set to null by default, so if not opted in, the embedded biometric prompt flow will not show |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)`, `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)`, or `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)` is null |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/provider/PublicKeyCredentialEntry#(android.content.Context,kotlin.CharSequence,android.app.PendingIntent,androidx.credentials.provider.BeginGetPublicKeyCredentialOption,kotlin.CharSequence,java.time.Instant,android.graphics.drawable.Icon,kotlin.Boolean,kotlin.Boolean,androidx.credentials.provider.BiometricPromptData)` is empty |

## Public properties

### displayName

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

```
val displayName: CharSequence?
```

the displayName of the account holding the public key credential

### hasDefaultIcon

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

```
val hasDefaultIcon: Boolean
```

whether this entry was created without a custom icon and hence contains a default icon set by the library, only to be used in Android API levels \>= 28

### icon

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

```
val icon: Icon
```

the icon to be displayed with this entry on the UI, must be created using `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithResource(android.content.Context, int)` when possible, and especially not with `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithBitmap(android.graphics.Bitmap)` as the latter consumes more memory and may cause undefined behavior due to memory implications on internal transactions; defaulted to a fallback public key credential icon if not provided

### isAutoSelectAllowed

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

```
val isAutoSelectAllowed: Boolean
```

### isAutoSelectAllowedFromOption

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

```
val isAutoSelectAllowedFromOption: Boolean
```

whether the `https://developer.android.com/reference/kotlin/androidx/credentials/provider/CredentialEntry#beginGetCredentialOption()` request for which this entry was created allows this entry to be auto-selected

### lastUsedTime

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

```
val lastUsedTime: Instant?
```

the last used time of this entry. Note that this value will only be distinguishable up to the milli second mark. If two entries have the same millisecond precision, they will be considered to have been used at the same time

### pendingIntent

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

```
val pendingIntent: PendingIntent
```

the `https://developer.android.com/reference/android/app/PendingIntent.html` that will get invoked when the user selects this entry, must be created with a unique request code per entry, with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE` to allow the Android system to attach the final request, and NOT with flag `https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT` as it can be invoked multiple times

### typeDisplayName

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

```
val typeDisplayName: CharSequence
```

### username

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

```
val username: CharSequence
```

the username of the account holding the public key credential