-
public interface Batch.Messaging.LifecycleListenerListener interface for messaging views lifecycle events.Implement this if you want to be notified of what happens to the messaging view (for example, perform some analytics on show/hide).You're also required to implement this if you want to add actions with a "callback" type.
-
-
Method Summary
Modifier and Type Method Description abstract voidonBatchMessageShown(@Nullable() String messageIdentifier)Called when the message view appeared on screen. abstract voidonBatchMessageClosed(@Nullable() String messageIdentifier)Called when the message view disappeared from the screen. voidonBatchMessageActionTriggered(@Nullable() String messageIdentifier, int index, @NonNull() BatchMessageAction action)Called when the message view will be dismissed due to the user pressing a CTA or the global tap action.Not applicable for the WebView format. voidonBatchMessageWebViewActionTriggered(@Nullable() String messageIdentifier, @Nullable() String analyticsID, @Nullable() BatchMessageAction action)Called when the WebView message view will be dismissed due to the user navigating away or triggering anaction (using the Javascript SDK). voidonBatchMessageCancelledByUser(@Nullable() String messageIdentifier)Called when the message view will be dismissed due to the user pressing the close button,or the system's Back button. voidonBatchMessageCancelledByAutoclose(@Nullable() String messageIdentifier)Called when the message view will be dismissed due to the auto close timer running out voidonBatchMessageCancelledByError(@Nullable() String messageIdentifier)Called when the message view will be dismissed due to an error when loading the message's content.Can only happen on WebView and Image messages. -
-
Method Detail
-
onBatchMessageShown
abstract void onBatchMessageShown(@Nullable() String messageIdentifier)
Called when the message view appeared on screen.
- Parameters:
messageIdentifier- Analytics message identifier string.
-
onBatchMessageClosed
abstract void onBatchMessageClosed(@Nullable() String messageIdentifier)
Called when the message view disappeared from the screen.
- Parameters:
messageIdentifier- Analytics message identifier string.
-
onBatchMessageActionTriggered
void onBatchMessageActionTriggered(@Nullable() String messageIdentifier, int index, @NonNull() BatchMessageAction action)
Called when the message view will be dismissed due to the user pressing a CTA or the global tap action.Not applicable for the WebView format.
- Parameters:
messageIdentifier- Analytics message identifier string.index- Index of the action/CTA.action- Action that will be performed.
-
onBatchMessageWebViewActionTriggered
void onBatchMessageWebViewActionTriggered(@Nullable() String messageIdentifier, @Nullable() String analyticsID, @Nullable() BatchMessageAction action)
Called when the WebView message view will be dismissed due to the user navigating away or triggering anaction (using the Javascript SDK).
- Parameters:
messageIdentifier- Analytics message identifier string.analyticsID- Analytics identifier.action- Action that will be performed, can be null.
-
onBatchMessageCancelledByUser
void onBatchMessageCancelledByUser(@Nullable() String messageIdentifier)
Called when the message view will be dismissed due to the user pressing the close button,or the system's Back button.
- Parameters:
messageIdentifier- Analytics message identifier string.
-
onBatchMessageCancelledByAutoclose
void onBatchMessageCancelledByAutoclose(@Nullable() String messageIdentifier)
Called when the message view will be dismissed due to the auto close timer running out
- Parameters:
messageIdentifier- Analytics message identifier string.
-
onBatchMessageCancelledByError
void onBatchMessageCancelledByError(@Nullable() String messageIdentifier)
Called when the message view will be dismissed due to an error when loading the message's content.Can only happen on WebView and Image messages.
- Parameters:
messageIdentifier- Analytics message identifier string.
-
-
-
-