Braze In App Message Manager
This class is used to display in-app messages that are either sent from Braze or are created natively in the host app. It will only show one in-app message at a time and will place all other in-app messages onto a stack. The BrazeInAppMessageManager will also keep track of in-app impressions and clicks, which can be viewed on the dashboard.
If there is already an in-app message being displayed, the new in-app message will be put onto the top of the stack and can be displayed at a later time. If there is no in-app message being displayed, then the beforeInAppMessageDisplayed will be called. The InAppMessageOperation return value can be used to control when the in-app message should be displayed. A suggested usage of this method would be to delay in-app message messages in certain parts of the app by returning DISPLAY_LATER when in-app message would be distracting to the users app experience. If the method returns DISPLAY_NOW then the in-app message will be displayed immediately. The onInAppMessageClicked and onInAppMessageDismissed methods can be used to override the default click and dismiss behavior. By default, in-app messages fade in and out from view. The slideup type of in-app message slides in and out of view can be dismissed by swiping the view horizontally. If the in-app message's DismissType is set to AUTO_DISMISS, then the in-app message will animate out of view once the set duration time has elapsed. In order to use a custom view, you must create a custom view factory using the setCustomInAppMessageViewFactory method. A new in-app message android.view.View object is created when a in-app message is displayed and also when the user navigates away to another android.app.Activity. This happens so that the Activity can be garbage collected and does not create a memory leak. For that reason, the registerInAppMessageManager and unregisterInAppMessageManager must be called in the Activity.onResume() and Activity.onPause() methods of every Activity.Functions
addInAppMessage
Link copied to clipboard
displayInAppMessage
Link copied to clipboard
open fun displayInAppMessage(inAppMessage: IInAppMessage, isCarryOver: Boolean)
Content copied to clipboard
ensureSubscribedToInAppMessageEvents
Link copied to clipboard
getActivity
Link copied to clipboard
getApplicationContext
Link copied to clipboard
getCarryoverInAppMessage
Link copied to clipboard
An In-App Message being carried over during the unregisterInAppMessageManagerregisterInAppMessageManager transition.
getControlInAppMessageManagerListener
Link copied to clipboard
open fun getControlInAppMessageManagerListener(): IInAppMessageManagerListener
Content copied to clipboard
A IInAppMessageManagerListener to be used only for control in-app messages.
getDefaultInAppMessageViewFactory
Link copied to clipboard
open fun getDefaultInAppMessageViewFactory(inAppMessage: IInAppMessage): IInAppMessageViewFactory
Content copied to clipboard
Gets the default IInAppMessageViewFactory as returned by the BrazeInAppMessageManager for the given IInAppMessage.
getDoesBackButtonDismissInAppMessageView
Link copied to clipboard
getDoesClickOutsideModalViewDismissInAppMessageView
Link copied to clipboard
getHtmlInAppMessageActionListener
Link copied to clipboard
open fun getHtmlInAppMessageActionListener(): IHtmlInAppMessageActionListener
Content copied to clipboard
getInAppMessageAnimationFactory
Link copied to clipboard
open fun getInAppMessageAnimationFactory(): IInAppMessageAnimationFactory
Content copied to clipboard
getInAppMessageManagerListener
Link copied to clipboard
getInAppMessageStack
Link copied to clipboard
getInAppMessageViewFactory
Link copied to clipboard
open fun getInAppMessageViewFactory(inAppMessage: IInAppMessage): IInAppMessageViewFactory
Content copied to clipboard
getInAppMessageViewWrapperFactory
Link copied to clipboard
open fun getInAppMessageViewWrapperFactory(): IInAppMessageViewWrapperFactory
Content copied to clipboard
getInstance
Link copied to clipboard
getIsCurrentlyDisplayingInAppMessage
Link copied to clipboard
getUnregisteredInAppMessage
Link copied to clipboard
An In-App Message that could not display after a call to requestDisplayInAppMessage due to no Activity being registered via registerInAppMessageManager
hideCurrentlyDisplayingInAppMessage
Link copied to clipboard
isActivitySet
Link copied to clipboard
registerInAppMessageManager
Link copied to clipboard
requestDisplayInAppMessage
Link copied to clipboard
resetAfterInAppMessageClose
Link copied to clipboard
open fun resetAfterInAppMessageClose()
Content copied to clipboard
Resets the BrazeInAppMessageManager to its original state before the last in-app message was displayed.
setBackButtonDismissesInAppMessageView
Link copied to clipboard
open fun setBackButtonDismissesInAppMessageView(backButtonDismissesInAppMessageView: Boolean)
Content copied to clipboard
setClickOutsideModalViewDismissInAppMessageView
Link copied to clipboard
open fun setClickOutsideModalViewDismissInAppMessageView(doesDismiss: Boolean)
Content copied to clipboard
setCustomControlInAppMessageManagerListener
Link copied to clipboard
open fun setCustomControlInAppMessageManagerListener(inAppMessageManagerListener: IInAppMessageManagerListener)
Content copied to clipboard
Assigns a custom IInAppMessageManagerListener that will be used when displaying control in-app messages.
setCustomHtmlInAppMessageActionListener
Link copied to clipboard
open fun setCustomHtmlInAppMessageActionListener(htmlInAppMessageActionListener: IHtmlInAppMessageActionListener)
Content copied to clipboard
setCustomInAppMessageAnimationFactory
Link copied to clipboard
open fun setCustomInAppMessageAnimationFactory(inAppMessageAnimationFactory: IInAppMessageAnimationFactory)
Content copied to clipboard
setCustomInAppMessageManagerListener
Link copied to clipboard
open fun setCustomInAppMessageManagerListener(inAppMessageManagerListener: IInAppMessageManagerListener)
Content copied to clipboard
Assigns a custom IInAppMessageManagerListener that will be used when displaying in-app messages.
setCustomInAppMessageViewFactory
Link copied to clipboard
open fun setCustomInAppMessageViewFactory(inAppMessageViewFactory: IInAppMessageViewFactory)
Content copied to clipboard
setCustomInAppMessageViewWrapperFactory
Link copied to clipboard
open fun setCustomInAppMessageViewWrapperFactory(@Nullable() inAppMessageViewWrapperFactory: IInAppMessageViewWrapperFactory)
Content copied to clipboard
Sets a custom IInAppMessageViewWrapperFactory that will be used to display an IInAppMessage to the user.
unregisterInAppMessageManager
Link copied to clipboard