CreateCredentialRequest.DisplayInfo


class CreateCredentialRequest.DisplayInfo


Information that may be used for display purposes when rendering UIs to collect the user consent and choice.

Summary

Public companion functions

CreateCredentialRequest.DisplayInfo

Returns a RequestDisplayInfo from a CreateCredentialRequest.credentialData Bundle.

Public constructors

DisplayInfo(userId: CharSequence, userDisplayName: CharSequence?)

Constructs a DisplayInfo.

DisplayInfo(
    userId: CharSequence,
    userDisplayName: CharSequence?,
    preferDefaultProvider: String?
)

Constructs a DisplayInfo.

Public properties

CharSequence?

an optional display name in addition to the userId that may be displayed next to the userId during the user consent to help your user better understand the credential being created

CharSequence

the user identifier of the created credential

Public companion functions

parseFromCredentialDataBundle

Added in 1.3.0-alpha03
@RequiresApi(value = 23)
fun parseFromCredentialDataBundle(from: Bundle): CreateCredentialRequest.DisplayInfo

Returns a RequestDisplayInfo from a CreateCredentialRequest.credentialData Bundle.

Parameters
from: Bundle

the raw display data in the Bundle format, retrieved from CreateCredentialRequest.credentialData

Public constructors

DisplayInfo

Added in 1.2.0
DisplayInfo(userId: CharSequence, userDisplayName: CharSequence? = null)

Constructs a DisplayInfo.

Parameters
userId: CharSequence

the user id of the created credential

userDisplayName: CharSequence? = null

an optional display name in addition to the userId that may be displayed next to the userId during the user consent to help your user better understand the credential being created

DisplayInfo

Added in 1.2.0
DisplayInfo(
    userId: CharSequence,
    userDisplayName: CharSequence?,
    preferDefaultProvider: String?
)

Constructs a DisplayInfo.

Parameters
userId: CharSequence

the user id of the created credential

userDisplayName: CharSequence?

an optional display name in addition to the userId that may be displayed next to the userId during the user consent to help your user better understand the credential being created

preferDefaultProvider: String?

the preferred default provider component name to prioritize in the selection UI flows. Your app must have the permission android.permission.CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS to specify this, or it would not take effect. Also this bit may not take effect for Android API level 33 and below, depending on the pre-34 provider(s) you have chosen.

Public properties

userDisplayName

Added in 1.2.0
val userDisplayNameCharSequence?

an optional display name in addition to the userId that may be displayed next to the userId during the user consent to help your user better understand the credential being created

userId

Added in 1.2.0
val userIdCharSequence

the user identifier of the created credential