{"id":4295,"date":"2021-11-15T20:12:10","date_gmt":"2021-11-15T12:12:10","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4295"},"modified":"2025-02-24T13:27:47","modified_gmt":"2025-02-24T05:27:47","slug":"room-information","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/room-information\/","title":{"rendered":"Room Information: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p>The EnxRoom Class provides the following methods to access various <a rel=\"noreferrer noopener\" href=\"..\/enxroom\/\" target=\"_blank\">room-related information.<\/a>  <\/p>\n\n\n\n<h4>Table of Contents<\/h4>\n\n\n\n<ul><li><a href=\"#get-room-id\">Get Room ID<\/a><\/li><li><a href=\"#get-room-meta\">Get Room Meta Data<\/a><\/li><li><a href=\"#get-mode\">Get Room Mode<\/a><\/li><li><a href=\"#get-connected-user-id\">Get Client Id of the connected User<\/a><\/li><li><a href=\"#get-connected-user-name\">Get Name of the connected User<\/a><\/li><li><a href=\"#get-connected-user-role\">Get Role of the connected User<\/a><\/li><li><a href=\"#whoami\">Get Information of the connected User<\/a><\/li><li><a href=\"#get-connected-user-list\">Get list of connected Users<\/a><\/li><li><a href=\"#get-local-stream-id\">Get Local Stream ID<\/a><\/li><li><a href=\"#get-stream-by-stream-id\">Get Stream by Stream ID<\/a><\/li><li><a href=\"#get-remote-streams\">Get list of Remote Streams<\/a><\/li><li><a href=\"#is-publishing\">Get Publish Status of Local Stream<\/a><\/li><\/ul>\n\n\n\n<a name=\"get-room-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Room ID<\/h3>\n\n\n\n<p>The <code>EnxRoom.getRoomId()<\/code> method provides the ID of the Room you are connected to. The Room ID is assigned to each Room during <a href=\"https:\/\/www.enablex.io\/developer\/video-api\/server-api\/rooms-route\/#create-room\" target=\"_blank\" rel=\"noreferrer noopener\">Room Creation.<\/a> <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getRoomId() <\/code>&#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: String Room ID.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">String roomID = room.getRoomId(); <\/pre>\n\n\n\n<a name=\"get-room-meta\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Room Meta Information<\/h3>\n\n\n\n<p>The <code>EnxRoom.getRoomMetaData()<\/code> method provides the Meta Information of the Room to which you are connected. The <a href=\"..\/..\/appendix\/#room-meta\">Room Meta information<\/a> JSON payload contains the complete Room definition along with many run-time parameters with their current values and room-stats of connected users and streams. All the endpoints receive this information through onRoomConnected observer after getting connected to the Room. Some of the run-time parameters are updated internally by the SDK on various events.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public JSONObject getRoomMetaData()<\/code> &#8211; No parameter needed<\/p>\n\n\n\n<p><strong>Returns<\/strong>: <a href=\"..\/..\/appendix\/#room-meta\">Room Meta Information JSON object<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">JSONObject roomMeta = getRoomMetaData();<\/pre>\n\n\n\n<a name=\"get-mode\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Room Mode<\/h3>\n\n\n\n<p>The <code>EnxRoom.getMode()<\/code> method provides the mode in which the Room operates &#8211; group mode or lecture mode. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getMode()<\/code><\/p>\n\n\n\n<p><strong>Returns<\/strong>: Enumerated Values: group, lecture.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">String mode = room.getMode();<\/pre>\n\n\n\n<a name=\"get-connected-user-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Client ID of the connected User<\/h3>\n\n\n\n<p>The <code>EnxRoom.getClientId()<\/code> method provides the Client ID of the connected endpoint. The Client ID is unique for each user connected to the Room for the session.  <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getClientId()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: String Client ID<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">String clientId = room.getClientId(); <\/pre>\n\n\n\n<a name=\"get-connected-user-name\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Name of the connected User<\/h3>\n\n\n\n<p>The <code>EnxRoom.getClientName()<\/code> method provides the name of the user connected through the Client endpoint. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getClientName()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: String Client name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">String clientName = room.getClientName(); <\/pre>\n\n\n\n<a name=\"get-connected-user-role\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Role of the connected User<\/h3>\n\n\n\n<p>The <code>EnxRoom.getRole()<\/code> method provides the role of the user connected to the Room for the session, either <em>Moderator<\/em> or <em>Participant<\/em>. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getRole()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: Enumerated Values: moderator, participant.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">String role = room.getRole();<\/pre>\n\n\n\n<a name=\"whoami\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Information of the connected User <\/h3>\n\n\n\n<p>The <code>EnxRoom.whoami()<\/code> method provides the complete <a href=\"https:\/\/www.enablex.io\/developer\/video-api\/client-api\/appendix\/#user-meta\" target=\"_blank\" rel=\"noreferrer noopener\">User Meta Information<\/a> of the connected user.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public JSONObject whoami() <\/code>&#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: <a href=\"https:\/\/www.enablex.io\/developer\/video-api\/client-api\/appendix\/#user-meta\" target=\"_blank\" rel=\"noreferrer noopener\">User Meta Information JSON object<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">JSONObject myinfo = room.whoami(); <\/pre>\n\n\n\n<p><\/p>\n\n\n\n<a name=\"get-connected-user-list\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get List of connected Users<\/h3>\n\n\n\n<p>The <code>EnxRoom.getUserList()<\/code> method provides a list of users connected to the Room. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public JSONObject getUserList()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: User list JSON object.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">JSONObject Users = room.getUserList()\n\n\/\/ Return JSON Users\n\/*\n[\n      {\n          \"clientId\": \"\",             \/\/ Unique Client ID assigned by the Potal\n          \"name\": \"\",                 \/\/ User's name\n          \"user_ref\": \"\",             \/\/ User's Reference\n          \"role\": \"participant\",      \/\/ Enum: moderator, participant\n          \"permissions\": {            \/\/ In-Session Permission of User\n          \"publish\": Boolean,         \/\/ Whether user can pubish a local stream\n          \"subscribe\": Boolean,       \/\/ Whether user can subscribe to remote streams\n          \"record\": Boolean,          \/\/ Whether user can initiate recording\n          \"stats\": Boolean,           \/\/ Whether user can view stream status\n          \"controlhandlers\": Boolean  \n          }\n      }\n  ] \n*\/<\/pre>\n\n\n\n<a name=\"get-local-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Local Stream ID<\/h3>\n\n\n\n<p>The <code>EnxRoom.getLocalStreamID()<\/code>&nbsp;method provides the ID of your Local Stream published in the Room.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public String getLocalStreamID()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: String Stream ID.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> String localStreamID = room.getLocalStreamId(); <\/pre>\n\n\n\n<a name=\"get-stream-by-stream-id\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Stream by Stream ID<\/h3>\n\n\n\n<p>The <code>EnxRoom.getStreamByStreamId()<\/code> method provides the Stream information for the given Stream ID.<\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public EnxStream getStreamByStreamId( String StreamId)<\/code> <\/p>\n\n\n\n<p><strong>Returns<\/strong>: <a href=\"https:\/\/www.enablex.io\/developer\/video-api\/client-api\/appendix\/#stream-options\" target=\"_blank\" rel=\"noreferrer noopener\">Stream Information JSON object<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">EnxStream stream = room.getStreamByStreamId( StreamID );<\/pre>\n\n\n\n<a name=\"get-remote-streams\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get list of Remote Streams<\/h3>\n\n\n\n<p>The <code>EnxRoom.getRemoteStreams()<\/code> method provides the list of Remote Streams available in the Room. <\/p>\n\n\n\n<p><strong>Class<\/strong>: <code>EnxRoom<\/code><\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public  Map &lt; String, EnxStream &gt; getRemoteStreams() <\/code>&#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Returns<\/strong>: Map Remote Streams.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Map &lt;String, EnxStream&gt; remoteStreams = room.getRemoteStreams();<\/pre>\n\n\n\n<a name=\"is-publishing\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Get Publish Status of Local Stream<\/h3>\n\n\n\n<p>The <code>EnxRoom.isPublishing()<\/code> method is used to check if the Local Stream is currently being published into the Room.  <\/p>\n\n\n\n<p><strong>Class<\/strong>: EnxRoom<\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>public boolean isPublishing()<\/code> &#8211; No parameter required.<\/p>\n\n\n\n<p><strong>Result<\/strong>: Boolean.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if (room.isPublishing()) {\n   \/\/ Local Stream is being published.\n}\nelse {\n   \/\/ Local Stream is not being published.\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=\"..\/stream-information\/\"><\/a><a href=\"..\/stream-information\/\">Know Your Stream<\/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=\"..\/chat\/\">Send Message<\/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 Class provides the following methods to access various room-related information. Table of Contents Get Room ID Get Room Meta Data Get Room Mode Get Client Id of the connected User Get Name of the connected User Get Role of the connected User Get Information of the connected User Get list of connected Users Get Local Stream ID Get Stream by Stream ID Get list of Remote Streams Get&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 Class provides the following methods to access various room-related information. Table of Contents Get Room ID Get Room Meta Data Get Room Mode Get Client Id of the connected User Get Name of the connected User Get Role of the connected User Get Information of the connected User Get list of connected Users&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4295"}],"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=4295"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4295\/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=4295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}