public class MessageNotification extends AbstractSelfDescribing
| Modifier and Type | Field and Description |
|---|---|
String |
action
The action associated with the notification.
|
List<MessageNotificationAttachment> |
attachments
Attachments added to the notification (they can be part of the data object).
|
String |
body
The notification's body.
|
List<String> |
bodyLocArgs
Variable string values to be used in place of the format specifiers in bodyLocArgs to use to localize the body text to the user's current localization.
|
String |
bodyLocKey
The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
|
String |
category
The category associated to the notification.
|
Boolean |
contentAvailable
The application is notified of the delivery of the notification if it's in the foreground or background, the app will be woken up (iOS only).
|
String |
group
The group which this notification is part of.
|
String |
icon
The icon associated to the notification (Android only).
|
Integer |
notificationCount
The number of items this notification represents.
|
String |
notificationTimestamp
The time when the event of the notification occurred.
|
static String |
PARAM_ACTION |
static String |
PARAM_BODY |
static String |
PARAM_BODYLOCARGS |
static String |
PARAM_BODYLOCKEY |
static String |
PARAM_CATEGORY |
static String |
PARAM_CONTENTAVAILABLE |
static String |
PARAM_GROUP |
static String |
PARAM_ICON |
static String |
PARAM_MESSAGENOTIFICATIONATTACHMENTS |
static String |
PARAM_NOTIFICATIONCOUNT |
static String |
PARAM_NOTIFICATIONTIMESTAMP |
static String |
PARAM_SOUND |
static String |
PARAM_SUBTITLE |
static String |
PARAM_TAG |
static String |
PARAM_THREADIDENTIFIER |
static String |
PARAM_TITLE |
static String |
PARAM_TITLELOCARGS |
static String |
PARAM_TITLELOCKEY |
static String |
PARAM_TRIGGER |
static String |
SCHEMA |
String |
sound
The sound played when the device receives the notification.
|
String |
subtitle
The notification's subtitle.
|
String |
tag
An identifier similar to 'group' but usable for different purposes (Android only).
|
String |
threadIdentifier
An identifier similar to 'group' but usable for different purposes (iOS only).
|
String |
title
The notification's title.
|
List<String> |
titleLocArgs
Variable string values to be used in place of the format specifiers in titleLocArgs to use to localize the title text to the user's current localization.
|
String |
titleLocKey
The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
|
MessageNotificationTrigger |
trigger
The trigger that raised the notification message.
|
customContexts, trueTimestamp| Constructor and Description |
|---|
MessageNotification(String title,
String body,
MessageNotificationTrigger trigger)
Creates a Message Notification event that represents a push notification or a local notification.
|
| Modifier and Type | Method and Description |
|---|---|
MessageNotification |
action(String action)
The action associated with the notification.
|
MessageNotification |
attachments(List<MessageNotificationAttachment> attachments)
Attachments added to the notification (they can be part of the data object).
|
MessageNotification |
bodyLocArgs(List<String> bodyLocArgs)
Variable string values to be used in place of the format specifiers in bodyLocArgs to use to localize the body text to the user's current localization.
|
MessageNotification |
bodyLocKey(String bodyLocKey)
The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
|
MessageNotification |
category(String category)
The category associated to the notification.
|
MessageNotification |
contentAvailable(Boolean contentAvailable)
The application is notified of the delivery of the notification if it's in the foreground or background, the app will be woken up (iOS only).
|
Map<String,Object> |
getDataPayload() |
String |
getSchema() |
MessageNotification |
group(String group)
The group which this notification is part of.
|
MessageNotification |
icon(String icon)
The icon associated to the notification (Android only).
|
MessageNotification |
notificationCount(Integer notificationCount)
The number of items this notification represents.
|
MessageNotification |
notificationTimestamp(String notificationTimestamp)
The time when the event of the notification occurred.
|
MessageNotification |
sound(String sound)
The sound played when the device receives the notification.
|
MessageNotification |
subtitle(String subtitle)
The notification's subtitle.
|
MessageNotification |
tag(String tag)
An identifier similar to 'group' but usable for different purposes (Android only).
|
MessageNotification |
threadIdentifier(String threadIdentifier)
An identifier similar to 'group' but usable for different purposes (iOS only).
|
MessageNotification |
titleLocArgs(List<String> titleLocArgs)
Variable string values to be used in place of the format specifiers in titleLocArgs to use to localize the title text to the user's current localization.
|
MessageNotification |
titleLocKey(String titleLocKey)
The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
|
beginProcessing, contexts, endProcessing, getContexts, getTrueTimestamp, trueTimestamppublic static final String SCHEMA
public static final String PARAM_ACTION
public static final String PARAM_MESSAGENOTIFICATIONATTACHMENTS
public static final String PARAM_BODY
public static final String PARAM_BODYLOCARGS
public static final String PARAM_BODYLOCKEY
public static final String PARAM_CATEGORY
public static final String PARAM_CONTENTAVAILABLE
public static final String PARAM_GROUP
public static final String PARAM_ICON
public static final String PARAM_NOTIFICATIONCOUNT
public static final String PARAM_NOTIFICATIONTIMESTAMP
public static final String PARAM_SOUND
public static final String PARAM_SUBTITLE
public static final String PARAM_TAG
public static final String PARAM_THREADIDENTIFIER
public static final String PARAM_TITLE
public static final String PARAM_TITLELOCARGS
public static final String PARAM_TITLELOCKEY
public static final String PARAM_TRIGGER
@Nullable public String action
@Nullable public List<MessageNotificationAttachment> attachments
@NonNull public final String body
@Nullable public List<String> bodyLocArgs
@Nullable public String bodyLocKey
@Nullable public String category
@Nullable public Boolean contentAvailable
@Nullable public String group
@Nullable public String icon
@Nullable public Integer notificationCount
@Nullable public String notificationTimestamp
@Nullable public String sound
@Nullable public String subtitle
@Nullable public String tag
@Nullable public String threadIdentifier
@NonNull public final String title
@Nullable public List<String> titleLocArgs
@Nullable public String titleLocKey
@NonNull public final MessageNotificationTrigger trigger
public MessageNotification(@NonNull
String title,
@NonNull
String body,
@NonNull
MessageNotificationTrigger trigger)
title - Title of message notification.body - Body content of the message notification.trigger - The trigger that raised this notification: remote notification (push), position related (location), date-time related (calendar, timeInterval) or app generated (other).@NonNull public MessageNotification action(@Nullable String action)
@NonNull public MessageNotification attachments(@Nullable List<MessageNotificationAttachment> attachments)
@NonNull public MessageNotification bodyLocArgs(@Nullable List<String> bodyLocArgs)
@NonNull public MessageNotification bodyLocKey(@Nullable String bodyLocKey)
@NonNull public MessageNotification category(@Nullable String category)
@NonNull public MessageNotification contentAvailable(@Nullable Boolean contentAvailable)
@NonNull public MessageNotification group(@Nullable String group)
@NonNull public MessageNotification icon(@Nullable String icon)
@NonNull public MessageNotification notificationCount(@Nullable Integer notificationCount)
@NonNull public MessageNotification notificationTimestamp(@Nullable String notificationTimestamp)
@NonNull public MessageNotification sound(@Nullable String sound)
@NonNull public MessageNotification subtitle(@Nullable String subtitle)
@NonNull public MessageNotification tag(@Nullable String tag)
@NonNull public MessageNotification threadIdentifier(@Nullable String threadIdentifier)
@NonNull public MessageNotification titleLocArgs(@Nullable List<String> titleLocArgs)
@NonNull public MessageNotification titleLocKey(@Nullable String titleLocKey)
@NonNull public String getSchema()
getSchema in class AbstractSelfDescribing