WalletObjectMessage.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
This method is deprecated.
This value is unused by the platform and will be removed in the future.
Sets the uri to which users are directed when they click on the message.
Sets the message body.
The maximum length is 200 characters for an expanded template with no image or 150
characters if you specify an image.
Sets the period of time that the message will be displayed to users.
TimeInterval
can have both start timestamp and end timestamp defined for each message. A message is
displayed immediately after a Wallet Object is inserted unless a startTimeTimestamp is
set. The message will appear in a list of messages indefinitely if endTimestamp is not
provided.
Sets the message header.
The maximum length is 35 characters for an expanded template with no image or 25
characters if you specify an image.
This method is deprecated.
This value is unused by the platform and will be removed in the future.
Sets the uri of the image to display with the message.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eWalletObjectMessage.Builder\u003c/code\u003e is used to create WalletObjectMessage instances for displaying messages in Google Wallet.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set the header, body, display interval, and an image for the message (although image and action URI are deprecated).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetBody()\u003c/code\u003e has a maximum length of 200 characters without an image and 150 with an image.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetHeader()\u003c/code\u003e has a maximum length of 35 characters without an image and 25 with an image.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetDisplayInterval()\u003c/code\u003e controls the message display duration based on start and end timestamps.\u003c/p\u003e\n"]]],[],null,["# WalletObjectMessage.Builder\n\npublic final class **WalletObjectMessage.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder to create a [WalletObjectMessage](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage). \n\n### Public Method Summary\n\n|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [WalletObjectMessage](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage) | [build](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#build())() |\n| [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder) | [setActionUri](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#setActionUri(com.google.android.gms.wallet.wobs.UriData))([UriData](/android/reference/com/google/android/gms/wallet/wobs/UriData) uri) *This method is deprecated. This value is unused by the platform and will be removed in the future.* |\n| [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder) | [setBody](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#setBody(java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) body) Sets the message body. |\n| [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder) | [setDisplayInterval](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#setDisplayInterval(com.google.android.gms.wallet.wobs.TimeInterval))([TimeInterval](/android/reference/com/google/android/gms/wallet/wobs/TimeInterval) interval) Sets the period of time that the message will be displayed to users. |\n| [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder) | [setHeader](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#setHeader(java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) header) Sets the message header. |\n| [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder) | [setImageUri](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder#setImageUri(com.google.android.gms.wallet.wobs.UriData))([UriData](/android/reference/com/google/android/gms/wallet/wobs/UriData) uri) *This method is deprecated. This value is unused by the platform and will be removed in the future.* |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [WalletObjectMessage](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage)\n**build** ()\n\n#### public [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder)\n**setActionUri** ([UriData](/android/reference/com/google/android/gms/wallet/wobs/UriData) uri)\n\n**This method is deprecated.** \n\nThis value is unused by the platform and will be removed in the future. \nSets the uri to which users are directed when they click on the message. \n\n#### public [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder)\n**setBody** ([String](//developer.android.com/reference/java/lang/String.html) body)\n\nSets the message body.\n\nThe maximum length is 200 characters for an expanded template with no image or 150\ncharacters if you specify an image. \n\n#### public [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder)\n**setDisplayInterval** ([TimeInterval](/android/reference/com/google/android/gms/wallet/wobs/TimeInterval) interval)\n\nSets the period of time that the message will be displayed to users.\n\n[TimeInterval](/android/reference/com/google/android/gms/wallet/wobs/TimeInterval)\ncan have both start timestamp and end timestamp defined for each message. A message is\ndisplayed immediately after a Wallet Object is inserted unless a startTimeTimestamp is\nset. The message will appear in a list of messages indefinitely if endTimestamp is not\nprovided. \n\n#### public [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder)\n**setHeader** ([String](//developer.android.com/reference/java/lang/String.html) header)\n\nSets the message header.\n\nThe maximum length is 35 characters for an expanded template with no image or 25\ncharacters if you specify an image. \n\n#### public [WalletObjectMessage.Builder](/android/reference/com/google/android/gms/wallet/wobs/WalletObjectMessage.Builder)\n**setImageUri** ([UriData](/android/reference/com/google/android/gms/wallet/wobs/UriData) uri)\n\n**This method is deprecated.** \n\nThis value is unused by the platform and will be removed in the future. \nSets the uri of the image to display with the message."]]