{"id":4227,"date":"2021-11-12T13:49:59","date_gmt":"2021-11-12T05:49:59","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4227"},"modified":"2022-04-11T15:10:22","modified_gmt":"2022-04-11T07:10:22","slug":"chat","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/chat\/","title":{"rendered":"Chat: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p>The <code>EnxRoom.sendMessage()<\/code> method is used to exchange messages between Session participants. It allows you to exchange the following types of messages: <\/p>\n\n\n\n<ul><li><strong>Public Messaging:&nbsp;<\/strong>To send messages to all connected users.<\/li><li><strong>Private Messaging:&nbsp;<\/strong>To send messages to a specific user.<\/li><li><strong>Group Messaging:<\/strong>&nbsp;To send messages to more than one user.<\/li><\/ul>\n\n\n\n<p>The Messaging feature does not require the sender to publish Local Stream or the receiver to subscribe to Remote Stream.<\/p>\n\n\n\n<p><strong>Class: <\/strong>EnxRoom<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>public void sendMessage(String message, boolean isBroadcast, array recipientIDs)<\/code><\/p>\n\n\n\n<p><strong>Parameters:<\/strong> <\/p>\n\n\n\n<ul><li><code>message<\/code>&nbsp;\u2013 String Message. <\/li><li><code>isBroadcast<\/code>&nbsp;\u2013 Boolean. Set to <em>true&nbsp;<\/em>for Public Messaging, <em>false&nbsp;<\/em>for Private Messaging.<\/li><li><code>recipientIDs&nbsp;<\/code>\u2013 Array of Client IDs to receive messages. Applicable for Group and Private Messaging.<\/li><\/ul>\n\n\n\n<p><strong>Callback<\/strong>: <\/p>\n\n\n\n<ul><li><code>onMessageReceived<\/code> &#8211; Receives message in JSONObject. <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">String message = \"XXX\";\nList&lt;String&gt; Recipient_ClientIds;\n\nroom.sendMessage(message, true, null); \/\/ Public Messaging\n\n\/\/ Message to one or more selected Recipients\nroom.sendMessage(MessageOpt, false, Recipient_ClientIds);\n\n\n\/\/ Users Receive Message through Callback. \n\/\/ Available from v1.5.3.\nPublic void onMessageReceived(JSONObject jsonobject){\n    String textMessage = jsonObject.getString(\"msg\");\n}  <\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/room-information\/\"><\/a><a href=\"..\/room-information\/\">Know Your Room<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/custom-signalling\/\"><\/a><a href=\"..\/custom-signalling\/\">Custom Signalling<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The EnxRoom.sendMessage() method is used to exchange messages between Session participants. It allows you to exchange the following types of messages: Public Messaging:&nbsp;To send messages to all connected users. Private Messaging:&nbsp;To send messages to a specific user. Group Messaging:&nbsp;To send messages to more than one user. The Messaging feature does not require the sender to publish Local Stream or the receiver to subscribe to Remote Stream. Class: EnxRoom Method: public&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3740,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"The EnxRoom.sendMessage() method is used to exchange messages between Session participants. It allows you to exchange the following types of messages: Public Messaging:&nbsp;To send messages to all connected users. Private Messaging:&nbsp;To send messages to a specific user. Group Messaging:&nbsp;To send messages to more than one user. The Messaging feature does not require the sender to&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4227"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4227"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4227\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3740"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}