public class Message extends Object implements Serializable
| Constructor and Description |
|---|
Message() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAction()
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.
|
String |
getBody()
The message body.
|
String |
getImageIconUrl()
The URL that points to the icon image for the push notification icon, for
example, the app icon.
|
String |
getImageUrl()
The URL that points to an image used in the push notification.
|
String |
getJsonBody()
The JSON payload used for a silent push.
|
String |
getMediaUrl()
The URL that points to the media resource, for example a .mp4 or .gif
file.
|
Boolean |
getSilentPush()
Indicates if the message should display on the users device.
|
String |
getTitle()
The message title that displays above the message on the user's device.
|
String |
getUrl()
The URL to open in the user's mobile browser.
|
int |
hashCode() |
Boolean |
isSilentPush()
Indicates if the message should display on the users device.
|
void |
setAction(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.
|
void |
setAction(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.
|
void |
setBody(String body)
The message body.
|
void |
setImageIconUrl(String imageIconUrl)
The URL that points to the icon image for the push notification icon, for
example, the app icon.
|
void |
setImageUrl(String imageUrl)
The URL that points to an image used in the push notification.
|
void |
setJsonBody(String jsonBody)
The JSON payload used for a silent push.
|
void |
setMediaUrl(String mediaUrl)
The URL that points to the media resource, for example a .mp4 or .gif
file.
|
void |
setSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
void |
setTitle(String title)
The message title that displays above the message on the user's device.
|
void |
setUrl(String url)
The URL to open in the user's mobile browser.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Message |
withAction(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.
|
Message |
withAction(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.
|
Message |
withBody(String body)
The message body.
|
Message |
withImageIconUrl(String imageIconUrl)
The URL that points to the icon image for the push notification icon, for
example, the app icon.
|
Message |
withImageUrl(String imageUrl)
The URL that points to an image used in the push notification.
|
Message |
withJsonBody(String jsonBody)
The JSON payload used for a silent push.
|
Message |
withMediaUrl(String mediaUrl)
The URL that points to the media resource, for example a .mp4 or .gif
file.
|
Message |
withSilentPush(Boolean silentPush)
Indicates if the message should display on the users device.
|
Message |
withTitle(String title)
The message title that displays above the message on the user's device.
|
Message |
withUrl(String url)
The URL to open in the user's mobile browser.
|
public String getAction()
Constraints:
Allowed Values: OPEN_APP, DEEP_LINK, URL
Actionpublic void setAction(String action)
Constraints:
Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic Message withAction(String action)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic void setAction(Action action)
Constraints:
Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic Message withAction(Action action)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: OPEN_APP, DEEP_LINK, URL
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.Actionpublic String getBody()
public void setBody(String body)
body - The message body. Can include up to 140 characters.public Message withBody(String body)
Returns a reference to this object so that method calls can be chained together.
body - The message body. Can include up to 140 characters.public String getImageIconUrl()
public void setImageIconUrl(String imageIconUrl)
imageIconUrl - The URL that points to the icon image for the push
notification icon, for example, the app icon.public Message withImageIconUrl(String imageIconUrl)
Returns a reference to this object so that method calls can be chained together.
imageIconUrl - The URL that points to the icon image for the push
notification icon, for example, the app icon.public String getImageUrl()
public void setImageUrl(String imageUrl)
imageUrl - The URL that points to an image used in the push
notification.public Message withImageUrl(String imageUrl)
Returns a reference to this object so that method calls can be chained together.
imageUrl - The URL that points to an image used in the push
notification.public String getJsonBody()
public void setJsonBody(String jsonBody)
jsonBody - The JSON payload used for a silent push.public Message withJsonBody(String jsonBody)
Returns a reference to this object so that method calls can be chained together.
jsonBody - The JSON payload used for a silent push.public String getMediaUrl()
public void setMediaUrl(String mediaUrl)
mediaUrl - The URL that points to the media resource, for example a
.mp4 or .gif file.public Message withMediaUrl(String mediaUrl)
Returns a reference to this object so that method calls can be chained together.
mediaUrl - The URL that points to the media resource, for example a
.mp4 or .gif file.public Boolean isSilentPush()
public Boolean getSilentPush()
public void setSilentPush(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.public Message withSilentPush(Boolean silentPush)
Returns a reference to this object so that method calls can be chained together.
silentPush - Indicates if the message should display on the users
device. Silent pushes can be used for Remote Configuration and
Phone Home use cases.public String getTitle()
public void setTitle(String title)
title - The message title that displays above the message on the
user's device.public Message withTitle(String title)
Returns a reference to this object so that method calls can be chained together.
title - The message title that displays above the message on the
user's device.public String getUrl()
public void setUrl(String url)
url - The URL to open in the user's mobile browser. Used if the
value for Action is URL.public Message withUrl(String url)
Returns a reference to this object so that method calls can be chained together.
url - The URL to open in the user's mobile browser. Used if the
value for Action is URL.public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.