Message Class

Package Information 

Package: com.salesforce.marketingcloud.pushmodels
Module: Push Models Module v1.0.2
Platform: androidJvm

Class Description 

1data class Message : Parcelable

The Message class is a data class representing a push notification message in the Salesforce Marketing Cloud Unified SDK. It implements Parcelable for efficient data passing between Android components.

Nested Types 

Companion Object 

1object Companion

A companion object for the Message class.

Media Class 

1class Media : Parcelable

Represents media content associated with the message. Implements Parcelable.

Properties 

All properties are annotated with @JvmField for Java interoperability.

Message Content Properties 

  • alert: String - The alert text of the push notification
  • title: String? - Optional title for the notification
  • sound: String? - Optional sound identifier for the notification

Message Identification 

  • id: String - Unique identifier for the message

Message Configuration 

  • contentType: Int - Type of content in the message
  • messageType: Int - Type classification of the message
  • messageLimit: Int - Limit on message delivery
  • proximity: Int - Proximity setting for the message

Custom Data 

  • custom: String? - Optional custom data string
  • customKeys: Map<String, String>? - Optional map of custom key-value pairs

Action Properties 

  • openDirect: String? - Optional direct open action
  • url: String? - Optional URL associated with the message

Date and Time Properties 

  • startDateUtc: Date? - Optional start date in UTC
  • endDateUtc: Date? - Optional end date in UTC

Period Configuration 

  • isRollingPeriod: Boolean - Indicates if the period is rolling
  • periodType: Int - Type of period
  • numberOfPeriods: Int - Number of periods
  • messagesPerPeriod: Int - Number of messages allowed per period

Media Content 

  • media: Message.Media? - Optional media content associated with the message

Inheritance 

  • Implements: android.os.Parcelable