InAppMessageManager
WhenReadyListener
Package: com.salesforce.marketingcloud.inappmessagingfeature
Module: In App Messaging Feature Module v1.0.0
Public interface for managing In-App Messages. This interface provides methods for displaying messages, configuring appearance, and listening to message lifecycle events.
1interface EventListenerWhen an object of this type is registered with the InAppMessageManager, its methods will be called to signal certain in app message events.
1abstract fun setInAppMessageListener(listener: InAppMessageManager.EventListener?)Set a EventListener that will be called during In App Message life cycle events.
Parameters:
| Name | Type | Description |
|---|---|---|
| listener | InAppMessageManager.EventListener? | The event listener to register |
1abstract fun setStatusBarColor(@ColorInt color: Int)Set the color of the In App Message Activity status bar on Android 21 or higher.
Parameters:
| Name | Type | Description |
|---|---|---|
| color | @ColorInt Int | The color value for the status bar |
1abstract fun setTypeface(typeface: Typeface?)Set the font Typeface to be used for In app Messages.
Parameters:
| Name | Type | Description |
|---|---|---|
| typeface | Typeface? | The Android Typeface to apply to in-app messages |
1abstract fun showMessage(messageId: String)Will display the InAppMessage with the matching id as long as certain conditions are met.
Parameters:
| Name | Type | Description |
|---|---|---|
| messageId | String | The ID of the message to display |