Message

@Serializable
data class Message

A message exchanged between the native SDK and the Experience bridge running inside the embedded co.monterosa.sdk.launcherkit.ExperienceView.

Messages flow in both directions: the SDK sends commands to the experience and the experience sends events back to the SDK. Each message carries a unique id, an action string that identifies the operation, and an arbitrary payload map.

Consumers receive inbound messages via co.monterosa.sdk.launcherkit.ExperienceViewListener.onMessage.

Types

Link copied to clipboard

The originator of a Message.

Properties

Link copied to clipboard

The action type string that identifies the operation.

Link copied to clipboard

The identifier of the bridge instance this message is bound to.

Link copied to clipboard
val id: String

A UUID that uniquely identifies this message. Defaults to a randomly generated UUID.

Link copied to clipboard
@Serializable(with = MapAnySerializer::class)
val payload: Map<String, Any?>

A map of arbitrary key-value pairs carrying the message data.

Link copied to clipboard

The id of the message this is a response to, or null if this is an originating message.

Link copied to clipboard
@SerialName(value = "sourceName")
var source: Message.MessageSource?

Whether this message originated from the SDK or the consumer. null for messages that do not carry a source.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String