CreateEntry.Builder
public final class CreateEntry.Builder
A builder for CreateEntry
Summary
Public constructors |
|---|
Builder(constructs an instance of |
Public methods |
|
|---|---|
final @NonNull CreateEntry |
build()Builds an instance of |
final @NonNull CreateEntry.Builder |
setAutoSelectAllowed(boolean autoSelectAllowed)Sets whether the entry should be auto-selected. |
final @NonNull CreateEntry.Builder |
@RequiresApi(value = 35)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. |
final @NonNull CreateEntry.Builder |
setDescription(CharSequence description)Sets a localized description to be displayed on the UI at the time of credential creation. |
final @NonNull CreateEntry.Builder |
Sets an icon to be displayed with the entry on the UI |
final @NonNull CreateEntry.Builder |
setLastUsedTime(Instant lastUsedTime)Sets the last time this account was used |
final @NonNull CreateEntry.Builder |
setPasswordCredentialCount(int count)Sets the password credential count, denoting how many credentials of type |
final @NonNull CreateEntry.Builder |
setPublicKeyCredentialCount(int count)Sets the password credential count, denoting how many credentials of type |
final @NonNull CreateEntry.Builder |
setTotalCredentialCount(int count)Sets the total credential count, denoting how many credentials in total does the provider have stored. |
Public constructors
Builder
public Builder(
@NonNull CharSequence accountName,
@NonNull PendingIntent pendingIntent
)
constructs an instance of CreateEntry.Builder
| Parameters | |
|---|---|
@NonNull CharSequence accountName |
the name of the account where the credential will be registered |
@NonNull PendingIntent pendingIntent |
the |
Public methods
build
public final @NonNull CreateEntry build()
Builds an instance of CreateEntry
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
If |
setAutoSelectAllowed
public final @NonNull CreateEntry.Builder setAutoSelectAllowed(boolean autoSelectAllowed)
Sets whether the entry should be auto-selected. The value is false by default.
setBiometricPromptData
@RequiresApi(value = 35)
public final @NonNull CreateEntry.Builder setBiometricPromptData(BiometricPromptData biometricPromptData)
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.
setDescription
public final @NonNull CreateEntry.Builder setDescription(CharSequence description)
Sets a localized description to be displayed on the UI at the time of credential creation.
Typically this description should contain information informing the user of the credential being created, and where it is being stored. Providers are free to phrase this however they see fit.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if |
setIcon
public final @NonNull CreateEntry.Builder setIcon(Icon icon)
Sets an icon to be displayed with the entry on the UI
setLastUsedTime
public final @NonNull CreateEntry.Builder setLastUsedTime(Instant lastUsedTime)
Sets the last time this account was used
setPasswordCredentialCount
public final @NonNull CreateEntry.Builder setPasswordCredentialCount(int count)
Sets the password credential count, denoting how many credentials of type PasswordCredential.TYPE_PASSWORD_CREDENTIAL does the provider have stored.
This information will be displayed on the CreateEntry to help the user make a choice.
setPublicKeyCredentialCount
public final @NonNull CreateEntry.Builder setPublicKeyCredentialCount(int count)
Sets the password credential count, denoting how many credentials of type PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL does the provider have stored.
This information will be displayed on the CreateEntry to help the user make a choice.
setTotalCredentialCount
public final @NonNull CreateEntry.Builder setTotalCredentialCount(int count)
Sets the total credential count, denoting how many credentials in total does the provider have stored.
This total count no. does not need to be a total of the counts set through setPasswordCredentialCount and setPublicKeyCredentialCount.
This information will be displayed on the CreateEntry to help the user make a choice.