sendMessage

open fun sendMessage(message: String): Boolean

Sends the given message to the cast receiver. The receiver can pick up the message on the namespace returned by getMessageNamespace.

Note: Must be called from the main thread!

Return

true if the message could be sent successfully.

Parameters

message

The message to send.


open fun sendMessage(message: String, @Nullable messageNamespace: String): Boolean

Sends the given message to the cast receiver on the provided messageNamespace. If no messageNamespace is provided, the value returned by getMessageNamespace will be used.

Note: Must be called from the main thread!

Return

true if the message could be sent successfully.

Parameters

message

The message to send.

messageNamespace

The namespace the message should be send to.