-
public class BatchInboxNotificationContentBatchInboxNotificationContent is a model representing the content of an inbox notification
-
-
Method Summary
Modifier and Type Method Description StringgetNotificationIdentifier()Unique identifier for this notification. StringgetTitle()StringgetBody()BatchNotificationSourcegetSource()booleanisUnread()DategetDate()booleanisSilent()Returns whether Batch considers this a silent notification.A silent notification is a notification with no title and message, which won't be displayed byBatch SDK.Warning: Other services listening to push messages might display it. Map<String, String>getRawPayload()Get the payload in its raw JSON form. synchronized BatchPushPayloadgetPushPayload()Get BatchPushPayload instance, property initialized with the notification's original push payload booleanhasLandingMessage()Whether the notification content has a landing message attached voiddisplayLandingMessage(@NonNull() Context context)Display the landing message attached to a BatchInboxNotificationContent.Do nothing if no message is attached. -
-
Method Detail
-
getNotificationIdentifier
@NonNull() String getNotificationIdentifier()
Unique identifier for this notification.
-
getSource
@NonNull() BatchNotificationSource getSource()
-
isUnread
boolean isUnread()
-
isSilent
boolean isSilent()
Returns whether Batch considers this a silent notification.A silent notification is a notification with no title and message, which won't be displayed byBatch SDK.Warning: Other services listening to push messages might display it.
-
getRawPayload
@NonNull() Map<String, String> getRawPayload()
Get the payload in its raw JSON form. This might differ from what you're used to in other classeshandling push payloads. If you want to simulate the push behaviour, call getPushBundle on the instance given by getPushPayload .
-
getPushPayload
@NonNull() synchronized BatchPushPayload getPushPayload()
Get BatchPushPayload instance, property initialized with the notification's original push payload
-
hasLandingMessage
boolean hasLandingMessage()
Whether the notification content has a landing message attached
-
displayLandingMessage
void displayLandingMessage(@NonNull() Context context)
Display the landing message attached to a BatchInboxNotificationContent.Do nothing if no message is attached.
Note that this method will work even if Batch is in do not disturb mode.
The given context should be an Activity instance to enable support for the banner format, as ithas to be attached to an activity.
- Parameters:
context- Your activity's context, Can't be null.
-
-
-
-