Media

Package: com.salesforce.marketingcloud.pushmodels.data

Module: Push Models Module v1.0.2

Platform: androidJvm

Overview 

1data class Media(
2    val url: String,
3    val altText: Text? = null,
4    val style: Style? = null,
5    val actions: List<Action>? = listOf()
6) : PushView, Parcelable

A data class representing media content in push notifications. Implements both PushView and Android’s Parcelable interface.

Constructors 

Media 

1constructor(
2    url: String,
3    altText: Text? = null,
4    style: Style? = null,
5    actions: List<Action>? = listOf()
6)

Creates a Media instance with the specified parameters.

Properties 

url 

1val url: String

The URL of the media resource.

altText 

1val altText: Text?

Optional alternative text description for the media.

style 

1open override val style: Style?

Optional styling information for the media display. Overrides PushView.style.

actions 

1open override val actions: List<Action>?

Optional list of actions associated with the media. Overrides PushView.actions.

Functions 

toString 

1open override fun toString(): String

Returns a string representation of the Media object.

Nested Types 

Companion 

1object Companion

Companion object for the Media class.