# How will a host know that , he/she has clicked end meeting for all(android client sdk)

**URL:** <https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663>\
**Category:** Android\
**Created:** [August 12, 2021, 7:35am UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663 "2021-08-12T07:35:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saranyams](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saranyams/32/21588_2.png) [@saranyams](https://devforum.zoom.us/u/saranyams)\
**Post date:** [August 12, 2021, 7:35am UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663/1 "2021-08-12T07:35:33Z")

</div>

**Description**  
I have integrated zoom client sdk into my project and i’m using zoom’s default UI . I have a requirement to call an api from the host device once after hoste clicks on end meeting for all .I tried using InMeetingServiceListener and listened for onMeetingLeaveComplete(endReason: Long). The problem is, for a host , the endReason is always END\_BY\_SELF in case of clicking end meeting for all and leave meeting . I’m unable to distinguish these events . How can i solve this problem?  
’  
**Mobile Client SDK version**  
v5.5.1.1319

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 12, 2021, 8:31pm UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663/2 "2021-08-12T20:31:15Z")

</div>

Hi @saranyams, thanks for using our SDK.

Whenever the current user leaves the meeting in any way, `END_BY_SELF` will be the e end reason. After testing various scenarios, this callback seems to be working as expected in that regard.

One way you could determine whether a host has ended the meeting or not is through another user in the same meeting. If other users are still in the meeting, it is safe to assume that the host has left and assigned host to another user.

There also could potentially be some alternatives available through our webhooks. You can try our #api-and-webhooks category, or check out our [webhook reference](https://marketplace.zoom.us/docs/api-reference/webhook-reference) to get started on that regard.

Thanks!

---

<div class="post-metadata">

**Author:** ![saranyams](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saranyams/32/21588_2.png) [@saranyams](https://devforum.zoom.us/u/saranyams)\
**Post date:** [August 14, 2021, 11:38am UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663/3 "2021-08-14T11:38:34Z")

</div>

As u mentioned, how can we get to know if other users are in meeting or not . InMeetingServiceListener onMeetingUserLeave(list:MutableList) is not getting fired for host, once after host clicked end meeting for all . So we are unable to know the attendee list detail

Is there any way we can know that in android client sdk ?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 17, 2021, 5:50pm UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663/4 "2021-08-17T17:50:26Z")

</div>

Hi @saranyams,

You can determine whether or not there are other users in the meeting by calling [`getInMeetingUserList`](https://marketplacefront.zoom.us/sdk/meeting/android/us/zoom/sdk/InMeetingService.html#getInMeetingUserList--). If the size of that list is \> 1, there are other attendees.

The `onMeetingUserLeave` callback will only occur if you are still in the meeting. If you are leaving the meeting but not ending it, other users in the meeting would receive that callback after you left.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 17, 2021, 3:51am UTC](https://devforum.zoom.us/t/how-will-a-host-know-that-he-she-has-clicked-end-meeting-for-all-android-client-sdk/55663/5 "2021-09-17T03:51:02Z")

</div>

Closed on September 17, 2021, 3:51am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
