InAppMessageManager

Package: com.salesforce.marketingcloud.inappmessagingfeature

Module: In App Messaging Feature Module v1.0.0

Overview 

Public interface for managing In-App Messages. This interface provides methods for displaying messages, configuring appearance, and listening to message lifecycle events.

Nested Types 

EventListener 

1interface EventListener

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

Methods 

setInAppMessageListener 

1abstract fun setInAppMessageListener(listener: InAppMessageManager.EventListener?)

Set a EventListener that will be called during In App Message life cycle events.

Parameters:

NameTypeDescription
listenerInAppMessageManager.EventListener?The event listener to register

setStatusBarColor 

1abstract fun setStatusBarColor(@ColorInt color: Int)

Set the color of the In App Message Activity status bar on Android 21 or higher.

Parameters:

NameTypeDescription
color@ColorInt IntThe color value for the status bar

setTypeface 

1abstract fun setTypeface(typeface: Typeface?)

Set the font Typeface to be used for In app Messages.

Parameters:

NameTypeDescription
typefaceTypeface?The Android Typeface to apply to in-app messages

showMessage 

1abstract fun showMessage(messageId: String)

Will display the InAppMessage with the matching id as long as certain conditions are met.

Parameters:

NameTypeDescription
messageIdStringThe ID of the message to display