WalletCard.Builder Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| WalletCard.Builder(String, Icon, ICharSequence, PendingIntent) |
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN. |
| WalletCard.Builder(String, Icon, String, PendingIntent) |
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN. |
| WalletCard.Builder(String, WalletCardType, Icon, ICharSequence, PendingIntent) |
Initializes a wallet card builder with an identifier, card type, image, content description, and pending intent. |
| WalletCard.Builder(String, WalletCardType, Icon, String, PendingIntent) |
Initializes a wallet card builder with an identifier, card type, image, string content description, and pending intent. |
WalletCard.Builder(String, Icon, ICharSequence, PendingIntent)
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)]
public Builder(string cardId, Android.Graphics.Drawables.Icon cardImage, Java.Lang.ICharSequence contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Graphics.Drawables.Icon * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder
Parameters
- cardId
- String
The card id must be non-null and unique within the list of cards returned. <b>Note: </b> this card ID should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
- cardImage
- Icon
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(). If the card image
does not have these dimensions, it may appear distorted when it
is scaled to fit these dimensions on screen. Bitmaps must be
of type android.graphics.Bitmap.Config#HARDWARE for
performance reasons.
- contentDescription
- ICharSequence
The content description of the card image. This field is required and may not be null or empty. <b>Note: </b> this message should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
- pendingIntent
- PendingIntent
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. It is
recommended that the pending intent be immutable (use PendingIntent#FLAG_IMMUTABLE).
- Attributes
Remarks
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN. Calls Builder#Builder(String, int, Icon, CharSequence, PendingIntent)
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
WalletCard.Builder(String, Icon, String, PendingIntent)
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)]
public Builder(string cardId, Android.Graphics.Drawables.Icon cardImage, string contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Graphics.Drawables.Icon * string * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder
Parameters
- cardId
- String
The non-null card identifier. It must be unique within the response list and must not contain personal information.
- cardImage
- Icon
The non-null card image. Bitmap images must use the hardware configuration and should match the image dimensions in the request.
- contentDescription
- String
The nonempty description of the card image. It must not contain personal information.
- pendingIntent
- PendingIntent
The non-null pending intent sent when the user taps the card. The wallet requests device unlock first if needed. Use an immutable pending intent as recommended by Android.
- Attributes
Remarks
Called when a card type is not provided, in which case it defaults to CARD_TYPE_UNKNOWN. Calls Builder.Builder(String,int,Icon,CharSequence,PendingIntent)
Android reference for android.service.quickaccesswallet.WalletCard.Builder.Builder.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
WalletCard.Builder(String, WalletCardType, Icon, ICharSequence, PendingIntent)
Initializes a wallet card builder with an identifier, card type, image, content description, and pending intent.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)]
public Builder(string cardId, Android.Service.QuickAccessWallet.WalletCardType cardType, Android.Graphics.Drawables.Icon cardImage, Java.Lang.ICharSequence contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Service.QuickAccessWallet.WalletCardType * Android.Graphics.Drawables.Icon * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder
Parameters
- cardId
- String
The card id must be non-null and unique within the list of cards returned. <b>Note: </b> this card ID should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
- cardType
- WalletCardType
Integer representing the card type. The card type must be non-null.
- cardImage
- Icon
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(). If the card image
does not have these dimensions, it may appear distorted when it
is scaled to fit these dimensions on screen. Bitmaps must be
of type android.graphics.Bitmap.Config#HARDWARE for
performance reasons.
- contentDescription
- ICharSequence
The content description of the card image. This field is required and may not be null or empty. <b>Note: </b> this message should <b>not</b> contain PII (Personally Identifiable Information, such as username or email address).
- pendingIntent
- PendingIntent
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. It is
recommended that the pending intent be immutable (use PendingIntent#FLAG_IMMUTABLE).
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
WalletCard.Builder(String, WalletCardType, Icon, String, PendingIntent)
Initializes a wallet card builder with an identifier, card type, image, string content description, and pending intent.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)]
public Builder(string cardId, Android.Service.QuickAccessWallet.WalletCardType cardType, Android.Graphics.Drawables.Icon cardImage, string contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Service.QuickAccessWallet.WalletCardType * Android.Graphics.Drawables.Icon * string * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder
Parameters
- cardId
- String
The card id must be non-null and unique within the list of cards returned. Note: this card ID should not contain PII (Personally Identifiable Information, such as username or email address).
- cardType
- WalletCardType
Integer representing the card type. The card type must be non-null. Value is one of the following: WalletCard.CARD_TYPE_UNKNOWN; WalletCard.CARD_TYPE_PAYMENT; WalletCard.CARD_TYPE_NON_PAYMENT
- cardImage
- Icon
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(). If the card image does not have these dimensions, it may appear distorted when it is scaled to fit these dimensions on screen. Bitmaps must be of type Bitmap.Config.HARDWARE for performance reasons. This value cannot be null.
- contentDescription
- String
The content description of the card image. This field is required and may not be null or empty. Note: this message should not contain PII (Personally Identifiable Information, such as username or email address).
- pendingIntent
- PendingIntent
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. It is recommended that the pending intent be immutable (use PendingIntent.FLAG_IMMUTABLE). This value cannot be null.
- Attributes
Remarks
Android reference for android.service.quickaccesswallet.WalletCard.Builder.Builder.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.