This is an advance messaging feature between Session participants. You can do following type of messaging in a session among participants:
- Public Messaging: To send message to all connected users.
- Private Messaging: To send message to a specific user.
- Group Messaging: To send message to more than one specified users.
Messaging feature neither require the sender to publish his Stream, nor receivers to subscribe.
Method: static Future<void> sendMessage(String message, bool isBroadCast, List<dynamic> recipientIDs)essage(String Message, boolean isBroadcast, array RecipientIDs)
Parameters:
@param Strings message
– String type message.@param bool isBroadcast
– Boolean. Use true for Public Broadcast, Use false for private messaging to one or more recipients.@param List clientIds
– Array of ClientIDs whom you wish to send private messages.
Callback:
onAcknowledgeSendData
– It notifies when message is successfully sent to another user or group of usersonMessageReceived
– It notifies at receiver end tat a new message arrived
EnxRtc.sendMessage(”message”,true,[]); // Send Message to all EnxRtc.onAcknowledgeSendData = (Map<dynamic,dynamic> map) { // Message has been sent }; EnxRtc.onMessageReceived = (Map<dynamic,dynamic> map) { // New Message has been received };