Action

Package: com.salesforce.marketingcloud.pushmodels.data

Module: Push Models Module v1.0.2

1sealed class Action : Parcelable

Description 

Actions define the behavior of user events on push notifications.

Inheritors 

Types 

CloudPage 

1data class CloudPage(val url: String) : Action

Opens cloud page via a URL in the default browser.

Parameters:

  • url: String - The URL to the cloud page

Deeplink 

1data class Deeplink(val url: String) : Action

Opens a deep link via UrlHandler.

Parameters:

  • url: String - The deep link URL

Url 

1data class Url(val url: String) : Action

Opens a URL in the default browser.

Parameters:

  • url: String - The URL to open

OpenApp 

1object OpenApp : Action

Launches the integrating app.


Dismiss 

1object Dismiss : Action

Dismisses the notification.


Type 

1enum Type : Enum<Action.Type>

Enum representing action types.


Companion 

1object Companion

Companion object for the Action class.

Properties 

type 

1val type: Int

The type identifier for the action.

Functions 

toJson 

1fun toJson(): JSONObject

Converts the Action to a JSON representation.

Returns: JSONObject - JSON representation of the action