sendGroupMessage

fun sendGroupMessage(message: String, type: String = HMSMessageType.CHAT, hmsRolesTo: List<HMSRole>, hmsMessageResultListener: HMSMessageResultListener)

Sends a message to the roles defined in hmsRolesTo. All peers currently with that role will receive the message.

Parameters

message

content of the message.

type

the type of message can be of HMSMessageType or others as you define them.

hmsRolesTo

the list of roles to whom this message is directed. All peers with an HMSRole in the list will receive the message.

hmsMessageResultListener

informs about whether the message was successfully sent, or the kind of error if not.*