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
@RequiresApi(value = 23)
createFrom(from: Bundle)

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

createFrom

Added in 1.5.0-beta01
@RequiresApi(value = 23)
fun createFrom(from: Bundle): CreateCredentialRequest.DisplayInfo

Returns a RequestDisplayInfo from a CreateCredentialRequest.credentialData Bundle.

It is recommended to construct a DisplayInfo by direct constructor calls, instead of using this API. This API should only be used by a small subset of system apps that reconstruct an existing object for user interactions such as collecting consents.

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