Package com.batch.android
Class BatchInboxNotificationContent
- java.lang.Object
-
- com.batch.android.BatchInboxNotificationContent
-
public class BatchInboxNotificationContent extends java.lang.ObjectBatchInboxNotificationContent is a model representing the content of an inbox notification
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBatchInboxNotificationContent(InboxNotificationContentInternal internalContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetBody()java.util.DategetDate()java.lang.StringgetNotificationIdentifier()Unique identifier for this notification.BatchPushPayloadgetPushPayload()GetBatchPushPayloadinstance, property initialized with the notification's original push payloadjava.util.Map<java.lang.String,java.lang.String>getRawPayload()Get the payload in its raw JSON form.BatchNotificationSourcegetSource()java.lang.StringgetTitle()booleanisDeleted()Deprecated.You should refresh your copy of the data with getFetchedNotifications() after using markAsDeleted.booleanisSilent()Returns whether Batch considers this a silent notification.booleanisUnread()
-
-
-
Constructor Detail
-
BatchInboxNotificationContent
protected BatchInboxNotificationContent(InboxNotificationContentInternal internalContent)
- Parameters:
internalContent-
-
-
Method Detail
-
getNotificationIdentifier
@NonNull public java.lang.String getNotificationIdentifier()
Unique identifier for this notification.- Returns:
- The unique notification identifier. Do not make assumptions about its format: it can change at any time.
-
getTitle
@Nullable public java.lang.String getTitle()
-
getBody
@Nullable public java.lang.String getBody()
-
getSource
@NonNull public BatchNotificationSource getSource()
-
isUnread
public boolean isUnread()
-
isDeleted
@Deprecated public boolean isDeleted()
Deprecated.You should refresh your copy of the data with getFetchedNotifications() after using markAsDeleted.Flag indicating whether this notification is deleted or not.- Returns:
- true if notification is deleted
-
getDate
@NonNull public java.util.Date getDate()
-
isSilent
public 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 by Batch SDK. Warning: Other services listening to push messages might display it.
-
getRawPayload
@NonNull public java.util.Map<java.lang.String,java.lang.String> getRawPayload()
Get the payload in its raw JSON form. This might differ from what you're used to in other classes handling push payloads. If you want to simulate the push behaviour, callBatchPushPayload.getPushBundle()on the instance given bygetPushPayload().
-
getPushPayload
@NonNull public BatchPushPayload getPushPayload() throws BatchPushPayload.ParsingException
GetBatchPushPayloadinstance, property initialized with the notification's original push payload
-
-