{"id":4317,"date":"2021-11-16T19:57:02","date_gmt":"2021-11-16T11:57:02","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4317"},"modified":"2021-11-16T20:04:18","modified_gmt":"2021-11-16T12:04:18","slug":"moderate-participants-entry","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/android-toolkit\/moderate-participants-entry\/","title":{"rendered":"Moderate Participant&#8217;s entry to a Session: Android SDK &#8211; Video API"},"content":{"rendered":"\n<p>In a <a href=\"\/developer\/video-api\/server-api\/rooms-route\/#create-room\">knock-enabled Room,<\/a> a user needs to wait until the Moderator grants them permission to join the Session.  The <code>EnxRoom.approveAwaitedUser()<\/code> method allows the Moderator to approve a user&#8217;s entry and <code>EnxRoom.denyAwaitedUser()<\/code> method is used to decline a user&#8217;s entry to the Session.<\/p>\n\n\n\n<p><strong>Methods: <\/strong><\/p>\n\n\n\n<ul><li><code>public void approveAwaitedUser(String clientId)<\/code> <\/li><li><code>public void denyAwaitedUser(String clientId)<\/code> <\/li><\/ul>\n\n\n\n<p><strong>Parameters:<\/strong><\/p>\n\n\n\n<ul><li><code>clientId<\/code>:  Client ID of the user awaiting the Moderator&#8217;s approval. <\/li><\/ul>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code>onUserAwaited<\/code> &#8211; Notification to the Moderator when a user awaits their permission to join Room.<\/li><li><code>onRoomAwaited<\/code> &#8211; Notification to the user when they await Moderator&#8217;s permission to join Room with { &#8220;event_type&#8221;: &#8220;knock&#8221; } in the JSON Payload.<\/li><li><code>onAckForApproveAwaitedUser <\/code>&#8211; Acknowledgment to the Moderator when the user is granted permission to join Room.<\/li><li><code>onRoomConnected<\/code> &#8211; Notification to the user when the user is permitted to join Room.<\/li><li> <code>onAckForDenyAwaitedUser <\/code>&#8211; Acknowledgment to the Moderator when the user is denied permission to join Room. <\/li><li><code>onRoomDisconnected<\/code> &#8211; Notification to the user along with a reason for denial when the user is denied access to the Room. <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Moderator is notified about awaited user\npublic void onUserAwaited(JSONObject jsonObject)  {\n\t\/\/ Awaited Client Info in the jsonObject, e.g.\n\t\/\/ {\"id\",\"String\", \"name\": \"String\u201d} \n\t\n\tenxRoom.approveAwaitedUser(jsonObject.id);  \/\/ To allow user to join room\n\n\tenxRoom.denyAwaitedUser(jsonObject.id); \/\/ To deny user \n\t \n};\n\npublic void onAckForApproveAwaitedUser(JSONObject jsonObject) {\n\t\/\/ User has been allowed entry\t\n}\n\npublic void onAckForDenyAwaitedUser(JSONObject jsonObject) {\n\t\/\/ User has been denied entry\t\n}<\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4>To manage awaited users when moderator joins late<\/h4>\n\n\n\n<p>If the Moderator joins after the participant(s) have sent a request to join the Session in a Knock-enabled Room, then the Moderator can get the list of participants awaiting approval using <code>room.awaitedParticipants<\/code>. You can utilize this attribute to build UI for Moderator controls to handle pending approvals. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ e.g. room.awaitedParticipants\n\n[\n\t{\t\"clientId\u201d: \"String\", \n\t\t\"name\": \"String\" \n\t}\n]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a knock-enabled Room, a user needs to wait until the Moderator grants them permission to join the Session. The EnxRoom.approveAwaitedUser() method allows the Moderator to approve a user&#8217;s entry and EnxRoom.denyAwaitedUser() method is used to decline a user&#8217;s entry to the Session. Methods: public void approveAwaitedUser(String clientId) public void denyAwaitedUser(String clientId) Parameters: clientId: Client ID of the user awaiting the Moderator&#8217;s approval. Callbacks: onUserAwaited &#8211; Notification to the Moderator&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":"In a knock-enabled Room, a user needs to wait until the Moderator grants them permission to join the Session. The EnxRoom.approveAwaitedUser() method allows the Moderator to approve a user&#8217;s entry and EnxRoom.denyAwaitedUser() method is used to decline a user&#8217;s entry to the Session. Methods: public void approveAwaitedUser(String clientId) public void denyAwaitedUser(String clientId) Parameters: clientId: Client&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4317"}],"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=4317"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4317\/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=4317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}