Added in API level 34

CredentialDescription


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

Represents the type and contained data fields of a Credential.

Summary

Inherited constants
Public constructors
CredentialDescription(type: String, supportedElementKeys: MutableSet<String!>, credentialEntries: MutableList<CredentialEntry!>)

Constructs a CredentialDescription.

Public methods
Int

Boolean
equals(other: Any?)

getType() and getSupportedElementKeys() are enough for equality check.

MutableList<CredentialEntry!>

Returns the credential entries to be used in the UI.

MutableSet<String!>

Returns the flattened JSON string that will be matched with requests.

String

Returns the type of the Credential described.

Int

getType() and getSupportedElementKeys() are enough for hashing.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<CredentialDescription!>

Public constructors

CredentialDescription

Added in API level 34
CredentialDescription(
    type: String,
    supportedElementKeys: MutableSet<String!>,
    credentialEntries: MutableList<CredentialEntry!>)

Constructs a CredentialDescription.

Parameters
type String: the type of the credential returned. This value cannot be null.
supportedElementKeys MutableSet<String!>: Keys of elements to match with Credential requests. This value cannot be null.
credentialEntries MutableList<CredentialEntry!>: a list of CredentialEntrys that are to be shown on the account selector if a credential matches with this description. Each entry contains information to be displayed within an entry on the UI, as well as a android.app.PendingIntent that will be invoked if the user selects this entry. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If type is empty.

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

equals

Added in API level 34
fun equals(other: Any?): Boolean

getType() and getSupportedElementKeys() are enough for equality check.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getCredentialEntries

Added in API level 34
fun getCredentialEntries(): MutableList<CredentialEntry!>

Returns the credential entries to be used in the UI.

Return
MutableList<CredentialEntry!> This value cannot be null.

getSupportedElementKeys

Added in API level 34
fun getSupportedElementKeys(): MutableSet<String!>

Returns the flattened JSON string that will be matched with requests.

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

getType

Added in API level 34
fun getType(): String

Returns the type of the Credential described.

Return
String This value cannot be null.

hashCode

Added in API level 34
fun hashCode(): Int

getType() and getSupportedElementKeys() are enough for hashing. Constructor enforces CredentialEntry to have the same type and android.app.slice.Slice contained by the entry can not be hashed.

Return
Int a hash code value for this 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<CredentialDescription!>