Added in API level 30

GetWalletCardsRequest


class GetWalletCardsRequest : Parcelable
kotlin.Any
   ↳ android.service.quickaccesswallet.GetWalletCardsRequest

Represents a request to a QuickAccessWalletService for walletCards. Wallet cards may represent anything that a user might carry in their wallet -- a credit card, library card, a transit pass, etc. This request contains the desired size of the card images and icons as well as the maximum number of cards that may be returned in the GetWalletCardsResponse.

Cards may be displayed with an optional icon and label. The icon and label should communicate the same idea. For example, if a card can be used at an NFC terminal, the icon could be an NFC icon and the label could inform the user how to interact with the NFC terminal.

The maximum number of cards that may be displayed in the wallet is provided in getMaxCards(). The QuickAccessWalletService may provide up to this many cards in the GetWalletCardsResponse.getWalletCards(). If the list of cards provided exceeds this number, some of the cards may not be shown to the user.

Summary

Inherited constants
Public constructors
GetWalletCardsRequest(cardWidthPx: Int, cardHeightPx: Int, iconSizePx: Int, maxCards: Int)

Creates a new GetWalletCardsRequest.

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Int

The desired height of the WalletCard.getCardImage(), in pixels.

Int

The desired width of the WalletCard.getCardImage(), in pixels.

Int

Wallet cards may be displayed next to an icon.

Int

The maximum size of the GetWalletCardsResponse.getWalletCards().

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<GetWalletCardsRequest!>

Public constructors

GetWalletCardsRequest

Added in API level 30
GetWalletCardsRequest(
    cardWidthPx: Int,
    cardHeightPx: Int,
    iconSizePx: Int,
    maxCards: Int)

Creates a new GetWalletCardsRequest.

Parameters
cardWidthPx Int: The width of the card image in pixels.
cardHeightPx Int: The height of the card image in pixels.
iconSizePx Int: The width and height of the optional card icon in pixels.
maxCards Int: The maximum number of cards that may be provided in the response.

Public methods

describeContents

Added in API level 30
fun describeContents(): Int

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.

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

getCardHeightPx

Added in API level 30
fun getCardHeightPx(): Int

The desired height of the WalletCard.getCardImage(), in pixels. The dimensions of the card image are requested so that it may be rendered without scaling.

getCardWidthPx

Added in API level 30
fun getCardWidthPx(): Int

The desired width of the WalletCard.getCardImage(), in pixels. The dimensions of the card image are requested so that it may be rendered without scaling.

The cardWidthPx and cardHeightPx should be applied to the size of the android.service.quickaccesswallet.WalletCard#getCardImage(). The size of the card image is specified so that it may be rendered accurately and without distortion caused by scaling.

getIconSizePx

Added in API level 30
fun getIconSizePx(): Int

Wallet cards may be displayed next to an icon. The icon can help to convey additional information about the state of the card. If the provided icon is a bitmap, its width and height should equal iconSizePx so that it is rendered without distortion caused by scaling.

getMaxCards

Added in API level 30
fun getMaxCards(): Int

The maximum size of the GetWalletCardsResponse.getWalletCards(). If the list of cards exceeds this number, not all cards may be displayed.

writeToParcel

Added in API level 30
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 30
static val CREATOR: Parcelable.Creator<GetWalletCardsRequest!>