InAppMessageCloseAction
Package: com.salesforce.marketingcloud.inappmessagingfeature
Module: In App Messaging Feature Module v1.0.0
A data class that represents how an in-app message was closed, including the dismiss reason and an optional identifier.
This class is used in the didCloseMessage callback to inform the host application about the manner in which a message was dismissed—whether through auto-dismiss, a close control, or a button tap.
| Parameter | Type | Description |
|---|---|---|
actionType | InAppMessageDismissReason | The reason why the message was closed |
id | String? | Optional identifier (e.g., button ID when dismissed via BUTTON); null otherwise |
Creates an instance of InAppMessageCloseAction with the specified dismiss reason and optional ID.
The reason the in-app message was dismissed.
Optional identifier associated with the close action. Contains a button ID when the message is closed via the BUTTON dismiss reason; null for other dismiss reasons.
Companion object for InAppMessageCloseAction.
An enumeration representing the possible reasons an in-app message was dismissed.
Enum Values:
BUTTON- Message was dismissed by tapping a button- Additional values may exist. See the enum documentation for complete list.
This class is typically received in the InAppMessageManager.EventListener.didCloseMessage callback: