public static interface GCMMessage.Builder extends CopyableBuilder<GCMMessage.Builder,GCMMessage>
Modifier and Type | Method and Description |
---|---|
GCMMessage.Builder |
action(Action action)
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app
launches, or it becomes the foreground app if it has been sent to the background.
|
GCMMessage.Builder |
action(String action)
The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app
launches, or it becomes the foreground app if it has been sent to the background.
|
GCMMessage.Builder |
body(String body)
The message body of the notification, the email body or the text message.
|
GCMMessage.Builder |
collapseKey(String collapseKey)
This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be
collapsed, so that only the last message gets sent when delivery can be resumed.
|
GCMMessage.Builder |
data(Map<String,String> data)
The data payload used for a silent push.
|
GCMMessage.Builder |
iconReference(String iconReference)
The icon image name of the asset saved in your application.
|
GCMMessage.Builder |
imageIconUrl(String imageIconUrl)
The URL that points to an image used as the large icon to the notification content view.
|
GCMMessage.Builder |
imageUrl(String imageUrl)
The URL that points to an image used in the push notification.
|
GCMMessage.Builder |
priority(String priority)
Is this a transaction priority message or lower priority.
|
GCMMessage.Builder |
rawContent(String rawContent)
The Raw JSON formatted string to be used as the payload.
|
GCMMessage.Builder |
restrictedPackageName(String restrictedPackageName)
This parameter specifies the package name of the application where the registration tokens must match in
order to receive the message.
|
GCMMessage.Builder |
silentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
GCMMessage.Builder |
smallImageIconUrl(String smallImageIconUrl)
The URL that points to an image used as the small icon for the notification which will be used to represent
the notification in the status bar and content view
|
GCMMessage.Builder |
sound(String sound)
Indicates a sound to play when the device receives the notification.
|
GCMMessage.Builder |
substitutions(Map<String,? extends Collection<String>> substitutions)
Default message substitutions.
|
GCMMessage.Builder |
timeToLive(Integer timeToLive)
This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device is
offline.
|
GCMMessage.Builder |
title(String title)
The message title that displays above the message on the user's device.
|
GCMMessage.Builder |
url(String url)
The URL to open in the user's mobile browser.
|
copy
apply, build
GCMMessage.Builder action(String action)
action
- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your
app launches, or it becomes the foreground app if it has been sent to the background. This is the
default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display
a designated user interface within the app. URL - The default mobile browser on the user's device
launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK |
URLAction
,
Action
GCMMessage.Builder action(Action action)
action
- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your
app launches, or it becomes the foreground app if it has been sent to the background. This is the
default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display
a designated user interface within the app. URL - The default mobile browser on the user's device
launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK |
URLAction
,
Action
GCMMessage.Builder body(String body)
body
- The message body of the notification, the email body or the text message.GCMMessage.Builder collapseKey(String collapseKey)
collapseKey
- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can
be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended
to avoid sending too many of the same messages when the device comes back online or becomes active.GCMMessage.Builder data(Map<String,String> data)
data
- The data payload used for a silent push. This payload is added to the notifications'
data.pinpoint.jsonBody' objectGCMMessage.Builder iconReference(String iconReference)
iconReference
- The icon image name of the asset saved in your application.GCMMessage.Builder imageIconUrl(String imageIconUrl)
imageIconUrl
- The URL that points to an image used as the large icon to the notification content view.GCMMessage.Builder imageUrl(String imageUrl)
imageUrl
- The URL that points to an image used in the push notification.GCMMessage.Builder priority(String priority)
priority
- Is this a transaction priority message or lower priority.GCMMessage.Builder rawContent(String rawContent)
rawContent
- The Raw JSON formatted string to be used as the payload. This value overrides the message.GCMMessage.Builder restrictedPackageName(String restrictedPackageName)
restrictedPackageName
- This parameter specifies the package name of the application where the registration tokens must match
in order to receive the message.GCMMessage.Builder silentPush(Boolean silentPush)
silentPush
- Indicates if the message should display on the users device. Silent pushes can be used for Remote
Configuration and Phone Home use cases.GCMMessage.Builder smallImageIconUrl(String smallImageIconUrl)
smallImageIconUrl
- The URL that points to an image used as the small icon for the notification which will be used to
represent the notification in the status bar and content viewGCMMessage.Builder sound(String sound)
sound
- Indicates a sound to play when the device receives the notification. Supports default, or the filename
of a sound resource bundled in the app. Android sound files must reside in /res/raw/GCMMessage.Builder substitutions(Map<String,? extends Collection<String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by individual address substitutions.GCMMessage.Builder timeToLive(Integer timeToLive)
timeToLive
- This parameter specifies how long (in seconds) the message should be kept in GCM storage if the device
is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks.GCMMessage.Builder title(String title)
title
- The message title that displays above the message on the user's device.GCMMessage.Builder url(String url)
url
- The URL to open in the user's mobile browser. Used if the value for Action is URL.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.