# Print output for @column tags ?>
public
final
class
WalletCard
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.service.quickaccesswallet.WalletCard |
A WalletCard
can represent anything that a user might carry in their wallet -- a credit
card, library card, transit pass, etc. Cards are identified by a String identifier and contain a
card image, card image content description, and a PendingIntent
to be used if the user
clicks on the card. Cards may be displayed with an icon and label, though these are optional.
Nested classes | |
---|---|
class |
WalletCard.Builder
Builder for |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<WalletCard> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
Icon
|
getCardIcon()
An icon may be shown alongside the card image to convey information about how the card can be used, or if some other action must be taken before using the card. |
String
|
getCardId()
The card id must be unique within the list of cards returned. |
Icon
|
getCardImage()
The visual representation of the card. |
CharSequence
|
getCardLabel()
A card label may be shown alongside the card image to convey information about how the card can be used, or if some other action must be taken before using the card. |
CharSequence
|
getContentDescription()
The content description of the card image. |
PendingIntent
|
getPendingIntent()
If the user performs a click on the card, this PendingIntent will be sent. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(android.os.Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
public Icon getCardIcon ()
An icon may be shown alongside the card image to convey information about how the card can be used, or if some other action must be taken before using the card. For example, an NFC logo could indicate that the card is NFC-enabled and will be provided to an NFC terminal if the phone is held in close proximity to the NFC reader.
If the supplied Icon is backed by a bitmap, it should have width and height
GetWalletCardsRequest#getIconSizePx()
.
Returns | |
---|---|
Icon |
This value may be null . |
public String getCardId ()
The card id must be unique within the list of cards returned.
Returns | |
---|---|
String |
This value cannot be null . |
public Icon getCardImage ()
The visual representation of the card. If the card image Icon is a bitmap, it should have a
width of GetWalletCardsRequest#getCardWidthPx()
and a height of GetWalletCardsRequest.getCardHeightPx()
.
Returns | |
---|---|
Icon |
This value cannot be null . |
public CharSequence getCardLabel ()
A card label may be shown alongside the card image to convey information about how the card can be used, or if some other action must be taken before using the card. For example, an NFC-enabled card could be labeled "Hold near reader" to inform the user of how to use NFC cards when interacting with an NFC reader.
If the provided label is too long to fit on one line, it may be truncated and ellipsized.
Returns | |
---|---|
CharSequence |
This value may be null . |
public CharSequence getContentDescription ()
The content description of the card image.
Returns | |
---|---|
CharSequence |
This value cannot be null . |
public PendingIntent getPendingIntent ()
If the user performs a click on the card, this PendingIntent will be sent. If the device is locked, the wallet will first request device unlock before sending the pending intent.
Returns | |
---|---|
PendingIntent |
This value cannot be null . |
public void writeToParcel (Parcel dest, int flags)
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.PARCELABLE_WRITE_RETURN_VALUE .
Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |