public static interface

InAppMessageManager.EventListener

com.salesforce.marketingcloud.messages.iam.InAppMessageManager.EventListener

Class Overview

When an object of this type is registered with the InAppMessageManager, its methods will be called to signal certain in app message events.

Summary

Public Methods
abstract void didCloseMessage(InAppMessage message)
This method will be called when the InAppMessage is dismissed.
abstract void didShowMessage(InAppMessage message)
This method will be called when the InAppMessage is first displayed on screen.
abstract boolean shouldShowMessage(InAppMessage message)
This method will be called before a in app message is presented.

Public Methods

public abstract void didCloseMessage (InAppMessage message)

This method will be called when the InAppMessage is dismissed.

Parameters
message The InAppMessage that was displayed

public abstract void didShowMessage (InAppMessage message)

This method will be called when the InAppMessage is first displayed on screen.

Parameters
message The InAppMessage that is being displayed

public abstract boolean shouldShowMessage (InAppMessage message)

This method will be called before a in app message is presented. You can return false to prevent the message from being displayed. You can later use showMessage(String) to display the message if the message is still on the device and active.

Parameters
message The InAppMessage that will be displayed
Returns
  • Return true to present the message. false will prevent the message from being displayed.