GetCredentialRequest.Builder
class GetCredentialRequest.Builder
A builder for GetCredentialRequest.
Summary
Public constructors |
|---|
Builder() |
Public functions |
|
|---|---|
GetCredentialRequest.Builder |
addCredentialOption(credentialOption: CredentialOption)Adds a specific type of |
GetCredentialRequest |
build()Builds a |
GetCredentialRequest.Builder |
setCredentialOptions(credentialOptions: List<CredentialOption>)Sets the list of |
GetCredentialRequest.Builder |
Sets the |
GetCredentialRequest.Builder |
setPreferIdentityDocUi(preferIdentityDocUi: Boolean)Sets the |
GetCredentialRequest.Builder |
setPreferImmediatelyAvailableCredentials(Sets whether you prefer the operation to return immediately when there is no available credentials instead of falling back to discovering remote options. |
GetCredentialRequest.Builder |
setPreferUiBrandingComponentName(component: ComponentName?)Sets service |
Public functions
addCredentialOption
fun addCredentialOption(credentialOption: CredentialOption): GetCredentialRequest.Builder
Adds a specific type of CredentialOption.
build
fun build(): GetCredentialRequest
Builds a GetCredentialRequest.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
If |
setCredentialOptions
fun setCredentialOptions(credentialOptions: List<CredentialOption>): GetCredentialRequest.Builder
Sets the list of CredentialOption.
setOrigin
fun setOrigin(origin: String): GetCredentialRequest.Builder
Sets the origin of a different application if the request is being made on behalf of that application. For API level >=34, setting a non-null value for this parameter, will throw a SecurityException if android.permission.CREDENTIAL_MANAGER_SET_ORIGIN is not present.
setPreferIdentityDocUi
fun setPreferIdentityDocUi(preferIdentityDocUi: Boolean): GetCredentialRequest.Builder
Sets the Boolean preferIdentityDocUi to true if the requester wants to prefer using a UI suited for Identity Documents like mDocs, Driving License etc.
setPreferImmediatelyAvailableCredentials
fun setPreferImmediatelyAvailableCredentials(
preferImmediatelyAvailableCredentials: Boolean
): GetCredentialRequest.Builder
Sets whether you prefer the operation to return immediately when there is no available credentials instead of falling back to discovering remote options. The default value is false.
setPreferUiBrandingComponentName
fun setPreferUiBrandingComponentName(component: ComponentName?): GetCredentialRequest.Builder
Sets service ComponentName from which the Credential Selector UI will pull its label and icon to render top level branding. Your app must have the permission android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS to specify this, or it would not take effect. Notice that this bit may not take effect for Android API level 33 and below, depending on the pre-34 provider(s) you have chosen.