CreateEntry.Builder
class CreateEntry.Builder
A builder for CreateEntry
Summary
Public constructors |
|---|
Builder(accountName: CharSequence, pendingIntent: PendingIntent)constructs an instance of |
Public functions |
|
|---|---|
CreateEntry |
build()Builds an instance of |
CreateEntry.Builder |
setAutoSelectAllowed(autoSelectAllowed: Boolean)Sets whether the entry should be auto-selected. |
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. |
CreateEntry.Builder |
setDescription(description: CharSequence?)Sets a localized description to be displayed on the UI at the time of credential creation. |
CreateEntry.Builder |
Sets an icon to be displayed with the entry on the UI |
CreateEntry.Builder |
setLastUsedTime(lastUsedTime: Instant?)Sets the last time this account was used |
CreateEntry.Builder |
setPasswordCredentialCount(count: Int)Sets the password credential count, denoting how many credentials of type |
CreateEntry.Builder |
setPublicKeyCredentialCount(count: Int)Sets the password credential count, denoting how many credentials of type |
CreateEntry.Builder |
setTotalCredentialCount(count: Int)Sets the total credential count, denoting how many credentials in total does the provider have stored. |
Public constructors
Builder
Builder(accountName: CharSequence, pendingIntent: PendingIntent)
constructs an instance of CreateEntry.Builder
| Parameters | |
|---|---|
accountName: CharSequence |
the name of the account where the credential will be registered |
pendingIntent: PendingIntent |
the |
Public functions
build
fun build(): CreateEntry
Builds an instance of CreateEntry
| Throws | |
|---|---|
IllegalArgumentException |
If |
setAutoSelectAllowed
fun setAutoSelectAllowed(autoSelectAllowed: Boolean): CreateEntry.Builder
Sets whether the entry should be auto-selected. The value is false by default.
setBiometricPromptData
@RequiresApi(value = 35)
fun setBiometricPromptData(biometricPromptData: BiometricPromptData?): CreateEntry.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.
setDescription
fun setDescription(description: CharSequence?): CreateEntry.Builder
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 | |
|---|---|
IllegalArgumentException |
if |
setIcon
fun setIcon(icon: Icon?): CreateEntry.Builder
Sets an icon to be displayed with the entry on the UI
setLastUsedTime
fun setLastUsedTime(lastUsedTime: Instant?): CreateEntry.Builder
Sets the last time this account was used
setPasswordCredentialCount
fun setPasswordCredentialCount(count: Int): CreateEntry.Builder
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
fun setPublicKeyCredentialCount(count: Int): CreateEntry.Builder
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
fun setTotalCredentialCount(count: Int): CreateEntry.Builder
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.