PublicKeyCredentialEntry.Builder


class PublicKeyCredentialEntry.Builder


Builder for PublicKeyCredentialEntry

Summary

Public constructors

Builder(
    context: Context,
    username: CharSequence,
    pendingIntent: PendingIntent,
    beginGetPublicKeyCredentialOption: BeginGetPublicKeyCredentialOption
)

Public functions

PublicKeyCredentialEntry

Builds an instance of PublicKeyCredentialEntry

PublicKeyCredentialEntry.Builder
setAutoSelectAllowed(autoSelectAllowed: Boolean)

Sets whether the entry should be auto-selected.

PublicKeyCredentialEntry.Builder
setDefaultIconPreferredAsSingleProvider(
    isDefaultIconPreferredAsSingleProvider: Boolean
)

When set to true, the UI prefers to render the default credential type icon when you are the single available provider; false by default.

PublicKeyCredentialEntry.Builder

Sets a displayName to be shown on the UI with this entry

PublicKeyCredentialEntry.Builder
setIcon(icon: Icon)

Sets the icon to be shown on the UI with this entry

PublicKeyCredentialEntry.Builder
setLastUsedTime(lastUsedTime: Instant?)

Sets the last used time of this account

Public constructors

Builder

Added in 1.2.0
Builder(
    context: Context,
    username: CharSequence,
    pendingIntent: PendingIntent,
    beginGetPublicKeyCredentialOption: BeginGetPublicKeyCredentialOption
)

Public functions

build

Added in 1.2.0
fun build(): PublicKeyCredentialEntry

Builds an instance of PublicKeyCredentialEntry

setAutoSelectAllowed

Added in 1.2.0
fun setAutoSelectAllowed(autoSelectAllowed: Boolean): PublicKeyCredentialEntry.Builder

Sets whether the entry should be auto-selected. The value is false by default

setDefaultIconPreferredAsSingleProvider

Added in 1.3.0-alpha03
fun setDefaultIconPreferredAsSingleProvider(
    isDefaultIconPreferredAsSingleProvider: Boolean
): PublicKeyCredentialEntry.Builder

When set to true, the UI prefers to render the default credential type icon when you are the single available provider; false by default.

setDisplayName

Added in 1.2.0
fun setDisplayName(displayName: CharSequence?): PublicKeyCredentialEntry.Builder

Sets a displayName to be shown on the UI with this entry

setIcon

Added in 1.2.0
fun setIcon(icon: Icon): PublicKeyCredentialEntry.Builder

Sets the icon to be shown on the UI with this entry

setLastUsedTime

Added in 1.2.0
fun setLastUsedTime(lastUsedTime: Instant?): PublicKeyCredentialEntry.Builder

Sets the last used time of this account

This information will be used to sort the entries on the selector.