InAppMessageModal

Constructors

Link copied to clipboard
Link copied to clipboard
fun InAppMessageModal(jsonObject: JSONObject, brazeManager: IBrazeManager)

Functions

Link copied to clipboard
open override fun enableDarkTheme()

Instructs the IInAppMessage to apply any dark theme settings and override any existing values present on the IInAppMessage.

Link copied to clipboard
open override fun forJsonPut(): JSONObject

Storing in-app messages serialized with this method is primarily for storage as triggered actions. This allows in-app messages to be stored to disk and retrieved later for display when an in-app message triggered action is triggered.

Link copied to clipboard

Gets where to find the pre-fetched remote assets specified in setLocalPrefetchedAssetPaths.

Link copied to clipboard
Link copied to clipboard
open override fun logButtonClick(messageButton: MessageButton): Boolean

Logs a click on this message button.

Link copied to clipboard
open override fun logClick(): Boolean

Logs a click on this in-app message. Clicks may only be logged once per in-app message instance.

Link copied to clipboard
open override fun logDisplayFailure(failureType: InAppMessageFailureType): Boolean

Logs a display failure on this in-app message. Failures can only be logged once per in-app message instance and should be logged as early as possible in the display process.

Link copied to clipboard
open override fun logImpression(): Boolean

Logs an impression on this in-app message. Impressions may only be logged once per in-app message instance.

Link copied to clipboard
open override fun onAfterClosed()

Should be called on the in-app message once it is no longer being displayed, to allow it to perform any cleanup or trigger further actions.

Link copied to clipboard
open override fun setClickBehavior(clickAction: ClickAction)

Convenience method that calls setClickBehavior(clickAction, null).

open override fun setClickBehavior(clickAction: ClickAction, uri: Uri?)

Sets the click action and/or Uri of this in-app message.

Link copied to clipboard
open override fun setLocalPrefetchedAssetPaths(remotePathToLocalAssetMap: Map<String, String>)

The base In-App Message class does not have assets of its own. Subclasses provide and manage assets.

Properties

Link copied to clipboard
open override var animateIn: Boolean = true

Whether this in-app message will animate in or appear suddenly. The recommended default is true.

Link copied to clipboard
open override var animateOut: Boolean = true

Whether this in-app message will animate out or disappear suddenly.

Link copied to clipboard
open override var backgroundColor: Int

The android.graphics.Color background color on this in-app message.

Link copied to clipboard
open override var bitmap: Bitmap? = null

The bitmap on this in-app message.

Link copied to clipboard
var brazeManager: IBrazeManager? = null
Link copied to clipboard
open override val clickAction: ClickAction

The click action of this in-app message.

Link copied to clipboard
open override var closeButtonColor: Int

The close button color on this in-app message.

Link copied to clipboard
open override var cropType: CropType

The crop type for this in-app message's image.

Link copied to clipboard
open override var dismissType: DismissType

The dismiss type of this in-app message.

Link copied to clipboard
open override var durationInMilliseconds: Int

Gets the duration of this in-app message. Only valid for DismissType.AUTO_DISMISS.

Link copied to clipboard
open override var expirationTimestamp: Long

Expiration timestamp is not stored locally since it changes dynamically depending on trigger time.

Link copied to clipboard
open override var extras: Map<String, String>

The extras on this in-app message as a map of key value pairs.

Link copied to clipboard
open override var frameColor: Int? = null

The frame color for this in-app message. The frame refers to the area surrounding a modal in-app message.

Link copied to clipboard
open override var header: String? = null

The header text on this in-app message.

Link copied to clipboard
open override var headerTextAlign: TextAlign

The text alignment for the header text.

Link copied to clipboard
open override var headerTextColor: Int

The header text color on this in-app message.

Link copied to clipboard
open override var icon: String? = null

The Font Awesome icon on this in-app message.

Link copied to clipboard
open override var iconBackgroundColor: Int

The icon background color on this in-app message. This will set the color of the icon background itself (not the icon itself).

Link copied to clipboard
open override var iconColor: Int

The icon color (android.graphics.Color) of this in-app message. This is the color of the icon itself (not the background).

Link copied to clipboard
open override var imageDownloadSuccessful: Boolean = false

The status of the image download on this in-app message. If the image specified by remoteImageUrl could not be downloaded successfully then this should return false. Returns false by default.

Link copied to clipboard
open override var imageStyle: ImageStyle

The image style on this in-app message.

Link copied to clipboard
open override val imageUrl: String?

Gets the image url on this in-app message.

Link copied to clipboard
var inAppMessageDarkThemeWrapper: InAppMessageTheme? = null
Link copied to clipboard
open override val isControl: Boolean

Whether this in-app message is a control for multivariate testing. Control in-app messages should not be displayed to users.

Link copied to clipboard
var jsonObject: JSONObject? = null
Link copied to clipboard
open override var localImageUrl: String? = null

The local uri of this in-app message image.

Link copied to clipboard
open override var message: String? = null

The message text on this in-app message.

Link copied to clipboard
open override var messageButtons: List<MessageButton>

The message buttons for this in-app message.

Link copied to clipboard
open override var messageTextAlign: TextAlign

The text alignment for the message text.

Link copied to clipboard
open override var messageTextColor: Int

The message text color on this in-app message.

Link copied to clipboard
open override val messageType: MessageType

The MessageType of this in-app message.

Link copied to clipboard
open override var openUriInWebView: Boolean = false

Sets whether to use BrazeWebViewActivity to open deep links from this in-app message.

Link copied to clipboard
open override var orientation: Orientation

The preferred screen orientation for this in-app message.

Link copied to clipboard
open override var remoteImageUrl: String? = null

The remote uri of this in-app message image.

Link copied to clipboard
Link copied to clipboard
open override val uri: Uri?

The URI on this in-app message.