-
- All Implemented Interfaces:
-
com.batch.android.Batch.EventDispatcher.Payload
public class MessagingEventPayload implements Batch.EventDispatcher.Payload
Payload accessor for a MESSAGING_SHOW and other MESSAGING events.
-
-
Constructor Summary
Constructors Constructor Description MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload)MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload, Action action, String buttonAnalyticsId)MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload, Action action)
-
Method Summary
Modifier and Type Method Description StringgetTrackingId()Get the tracking ID associated with the event. StringgetWebViewAnalyticsID()Get the button analytics ID associated with the event. StringgetDeeplink()Get the deeplink url associated with the event. booleanisPositiveAction()Indicate if the action associated with the event is positive. StringgetCustomValue(@NonNull() String key)Get a value from a key within the custom payload associated with the event. BatchMessagegetMessagingPayload()Get the raw payload associated with the event BatchPushPayloadgetPushPayload()Get the raw payload associated with the event -
-
Constructor Detail
-
MessagingEventPayload
MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload)
-
MessagingEventPayload
MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload, Action action, String buttonAnalyticsId)
-
MessagingEventPayload
MessagingEventPayload(BatchMessage message, JSONObject payload, JSONObject customPayload, Action action)
-
-
Method Detail
-
getTrackingId
@Nullable() String getTrackingId()
Get the tracking ID associated with the event.Only set for in-app, see isNotificationEvent.
-
getWebViewAnalyticsID
@Nullable() String getWebViewAnalyticsID()
Get the button analytics ID associated with the event.Only used for messages of types MESSAGING_WEBVIEW_CLICK or MESSAGING_CLOSE.Matches the "analyticsID" parameter of various methods of the JavaScript SDK.
-
getDeeplink
@Nullable() String getDeeplink()
Get the deeplink url associated with the event.Only set for MESSAGING_CLICK, NOTIFICATION_OPEN and NOTIFICATION_DISPLAY
-
isPositiveAction
boolean isPositiveAction()
Indicate if the action associated with the event is positive.A positive action is :- An Open for a push campaign- A CTA click or Global tap containing a deeplink or a custom action for a messaging campaign
-
getCustomValue
@Nullable() String getCustomValue(@NonNull() String key)
Get a value from a key within the custom payload associated with the event.
-
getMessagingPayload
@Nullable() BatchMessage getMessagingPayload()
Get the raw payload associated with the event
-
getPushPayload
@Nullable() BatchPushPayload getPushPayload()
Get the raw payload associated with the event
-
-
-
-