PublicKeyCredentialEntry.Builder


public final class PublicKeyCredentialEntry.Builder


Builder for PublicKeyCredentialEntry

Summary

Public constructors

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

Public methods

final @NonNull PublicKeyCredentialEntry

Builds an instance of PublicKeyCredentialEntry

final @NonNull PublicKeyCredentialEntry.Builder
setAutoSelectAllowed(boolean autoSelectAllowed)

Sets whether the entry should be auto-selected.

final @NonNull PublicKeyCredentialEntry.Builder
setDefaultIconPreferredAsSingleProvider(
    boolean isDefaultIconPreferredAsSingleProvider
)

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

final @NonNull PublicKeyCredentialEntry.Builder

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

final @NonNull PublicKeyCredentialEntry.Builder

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

final @NonNull PublicKeyCredentialEntry.Builder
setLastUsedTime(Instant lastUsedTime)

Sets the last used time of this account

Public constructors

Builder

Added in 1.2.0
public Builder(
    @NonNull Context context,
    @NonNull CharSequence username,
    @NonNull PendingIntent pendingIntent,
    @NonNull BeginGetPublicKeyCredentialOption beginGetPublicKeyCredentialOption
)

Public methods

build

Added in 1.2.0
public final @NonNull PublicKeyCredentialEntry build()

Builds an instance of PublicKeyCredentialEntry

setAutoSelectAllowed

Added in 1.2.0
public final @NonNull PublicKeyCredentialEntry.Builder setAutoSelectAllowed(boolean autoSelectAllowed)

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

setDefaultIconPreferredAsSingleProvider

Added in 1.3.0-alpha03
public final @NonNull PublicKeyCredentialEntry.Builder setDefaultIconPreferredAsSingleProvider(
    boolean isDefaultIconPreferredAsSingleProvider
)

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
public final @NonNull PublicKeyCredentialEntry.Builder setDisplayName(CharSequence displayName)

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

setIcon

Added in 1.2.0
public final @NonNull PublicKeyCredentialEntry.Builder setIcon(@NonNull Icon icon)

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

setLastUsedTime

Added in 1.2.0
public final @NonNull PublicKeyCredentialEntry.Builder setLastUsedTime(Instant lastUsedTime)

Sets the last used time of this account

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