RichFeatures

Overview 

A data class representing rich notification features in the Salesforce Marketing Cloud Push Models Module. This class implements Parcelable for Android serialization.

Package: com.salesforce.marketingcloud.pushmodels.rich

Module: Push Models Module v1.0.2

Version: 11.0.0

Platform: androidJvm

Class Declaration 

1data class RichFeatures(
2    val largeIcon: String? = null,
3    val smallIcon: String? = null,
4    val viewTemplate: Template? = null,
5    val buttons: RichButtonTemplate? = null
6) : Parcelable

Constructors 

Primary Constructor 

1constructor(
2    largeIcon: String? = null,
3    smallIcon: String? = null,
4    viewTemplate: Template? = null,
5    buttons: RichButtonTemplate? = null
6)

Creates an instance of RichFeatures with optional parameters for customizing rich push notification features.

Properties 

largeIcon 

1val largeIcon: String?

Optional URL or identifier for the large icon to be displayed in the notification.

smallIcon 

1val smallIcon: String?

Optional URL or identifier for the small icon to be displayed in the notification.

viewTemplate 

1val viewTemplate: Template?

Optional template configuration for the notification view layout. References com.salesforce.marketingcloud.pushmodels.data.Template.

buttons 

1val buttons: RichButtonTemplate?

Optional configuration for interactive buttons in the notification. References com.salesforce.marketingcloud.pushmodels.rich.buttons.RichButtonTemplate.

Methods 

toJson 

1fun toJson(): String?

Serializes the RichFeatures instance to a JSON string representation.

Returns: A JSON string representation of the object, or null if serialization fails.

Types 

Companion 

1object Companion

Companion object for the RichFeatures class, likely containing factory methods or constants for creating instances.


Source: https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/SFMCSdk/11.0/pushmodelsmodule/com.salesforce.marketingcloud.pushmodels.rich/-rich-features/index.html