GetCredentialRequest.Builder


class GetCredentialRequest.Builder


A builder for GetCredentialRequest.

Summary

Public constructors

Public functions

GetCredentialRequest.Builder

Adds a specific type of CredentialOption.

GetCredentialRequest

Builds a GetCredentialRequest.

GetCredentialRequest.Builder

Sets the list of CredentialOption.

GetCredentialRequest.Builder
setOrigin(origin: String)

Sets the origin of a different application if the request is being made on behalf of that application.

GetCredentialRequest.Builder
setPreferIdentityDocUi(preferIdentityDocUi: Boolean)

Sets the Boolean preferIdentityDocUi to true if the requester wants to prefer using a UI suited for Identity Documents like mDocs, Driving License etc.

GetCredentialRequest.Builder
setPreferImmediatelyAvailableCredentials(
    preferImmediatelyAvailableCredentials: Boolean
)

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

Sets service ComponentName from which the Credential Selector UI will pull its label and icon to render top level branding.

Public constructors

Builder

Added in 1.2.0
Builder()

Public functions

addCredentialOption

Added in 1.2.0
fun addCredentialOption(credentialOption: CredentialOption): GetCredentialRequest.Builder

Adds a specific type of CredentialOption.

setCredentialOptions

fun setCredentialOptions(credentialOptions: List<CredentialOption>): GetCredentialRequest.Builder

Sets the list of CredentialOption.

setOrigin

Added in 1.2.0
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

Added in 1.2.0
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

Added in 1.2.0
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

Added in 1.2.0
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.