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

Sets the biometric prompt data to optionally utilize a credential manager flow that directly handles the biometric verification for you and gives you the response; set to null by default, indicating the default behavior is to not utilize this embedded biometric prompt flow.

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

setBiometricPromptData

Added in 1.5.0-beta01
@RequiresApi
fun setBiometricPromptData(biometricPromptData: BiometricPromptData?): PublicKeyCredentialEntry.Builder

Sets the biometric prompt data to optionally utilize a credential manager flow that directly handles the biometric verification for you and gives you the response; set to null by default, indicating the default behavior is to not utilize this embedded biometric prompt flow.

setDefaultIconPreferredAsSingleProvider

Added in 1.5.0-beta01
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.