Marketing Cloud SDK / com.salesforce.marketingcloud.messages.iam / InAppMessageManager / EventListener


interface EventListener

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



This method will be called when the InAppMessage is dismissed.

abstract fun didCloseMessage(message: InAppMessage): Unit


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

abstract fun didShowMessage(message: InAppMessage): Unit


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 InAppMessageManager#showMessage(String) to display the message if the message is still on the device and active.

abstract fun shouldShowMessage(message: InAppMessage): Boolean