Added in API level 34

CredentialOption

class CredentialOption : Parcelable
kotlin.Any
   ↳ android.credentials.CredentialOption

Information about a specific type of credential to be requested during a android.credentials.CredentialManager#getCredential operation.

Summary

Nested classes

A builder for CredentialOption.

Constants
static String

Bundle key to the list of elements keys supported/requested.

Inherited constants
Public methods
Int

MutableSet<ComponentName!>

Returns the set of ComponentName corresponding to providers that must receive this option.

Bundle

Returns the partial request data that will be sent to the provider during the initial credential candidate query stage.

Bundle

Returns the full request data.

String

Returns the requested credential type.

Boolean

Returns true if the request must only be fulfilled by a system provider, and false otherwise.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<CredentialOption!>

Constants

SUPPORTED_ELEMENT_KEYS

Added in API level 34
static val SUPPORTED_ELEMENT_KEYS: String

Bundle key to the list of elements keys supported/requested. Framework will use this key to determine which types of Credentials will utilize Credential Registry when filtering Credential Providers to ping.

Value: "android.credentials.GetCredentialOption.SUPPORTED_ELEMENT_KEYS"

Public methods

describeContents

Added in API level 34
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getAllowedProviders

Added in API level 34
fun getAllowedProviders(): MutableSet<ComponentName!>

Returns the set of ComponentName corresponding to providers that must receive this option.

Return
MutableSet<ComponentName!> This value cannot be null.

getCandidateQueryData

Added in API level 34
fun getCandidateQueryData(): Bundle

Returns the partial request data that will be sent to the provider during the initial credential candidate query stage. For security reason, a provider will receive the request data in two stages. First it gets this partial request that do not contain sensitive user information; it uses this information to provide credential candidates that the [@code CredentialManager] will show to the user. Next, the full request data, getCredentialRetrievalData(), will be sent to a provider only if the user further grants the consent by choosing a candidate from the provider.

Return
Bundle This value cannot be null.

getCredentialRetrievalData

Added in API level 34
fun getCredentialRetrievalData(): Bundle

Returns the full request data.

Return
Bundle This value cannot be null.

getType

Added in API level 34
fun getType(): String

Returns the requested credential type.

Return
String This value cannot be null.

isSystemProviderRequired

Added in API level 34
fun isSystemProviderRequired(): Boolean

Returns true if the request must only be fulfilled by a system provider, and false otherwise.

toString

Added in API level 34
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 34
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 34
static val CREATOR: Parcelable.Creator<CredentialOption!>