# Need to know when the host leave the meeting on Android SDK

**URL:** <https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161>\
**Category:** Android\
**Created:** [May 6, 2019, 2:47pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161 "2019-05-06T14:47:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 6, 2019, 2:47pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/1 "2019-05-06T14:47:31Z")

</div>

Hi Zoom Team,

There is a requirement on our end that when the host ended the meeting we should get a notification from Android SDK. Currently it is not happening properly. We do get the call back but it does say who. Whether it is user ended or the host ended the meeting. On iOS we do get this perfectly but on Android we could not determine who ended the meeting.

Please guide us to overcome this issue.

Regards  
Tamim

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 6, 2019, 5:02pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/2 "2019-05-06T17:02:25Z")

</div>

Hi Tamim,  
Thanks for the post. Could you provide any code snippets for the parts that are not working properly?

Thanks!

---

<div class="post-metadata">

**Author:** ![balaji.murali](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balaji.murali](https://devforum.zoom.us/u/balaji.murali)\
**Post date:** [May 7, 2019, 1:29pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/3 "2019-05-07T13:29:03Z")

</div>

**Requirement 1** : Only for Android  
Differentiate who has left the meeting (provider or user)  
Differentiate who has ended the meeting (provider or user)

Tried InMeetingService but couldn’t get required information. Achieved the same with “MobileRTCMeetingServiceDelegate” in iOS,

```auto
private void registerMeetingServiceListener() {
        if (zoomSDK.isInitialized()) {
            ZoomSDK zoomSDK = ZoomSDK.getInstance();
            InMeetingService inMeeting = zoomSDK.getInMeetingService();
            inMeeting.addListener(this);
        }
    }   

```

Below are interface implementation,

```auto
@Override
    public void onMeetingReady() {
        LOG.b("onMeetingReady");
    }

    @Override
    public void onMeetingNeedWaitHost() {
        LOG.b("");
    }

    @Override
    public void onMeetingReadyToJoin() {
        LOG.b("");
    }

    @Override
    public void onMeetingNeedPasswordOrDisplayName(boolean b, boolean b1, InMeetingEventHandler inMeetingEventHandler) {
        LOG.b("");
    }

    @Override
    public void onWebinarNeedRegister() {
        LOG.b("");
    }

    @Override
    public void onJoinWebinarNeedUserNameAndEmail(InMeetingEventHandler inMeetingEventHandler) {

    }

    @Override
    public void onMeetingNeedColseOtherMeeting(InMeetingEventHandler inMeetingEventHandler) {

    }

    @Override
    public void onMeetingFail(int i, int i1) {

    }

    @Override
    public void onMeetingLeaveComplete(long l) {

    }

    @Override
    public void onMeetingUserJoin(long l) {

    }

    @Override
    public void onMeetingUserLeave(long l) {

    }

    @Override
    public void onMeetingUserUpdated(long l) {

    }

    @Override
    public void onMeetingHostChanged(long l) {

    }

    @Override
    public void onMeetingCoHostChanged(long l) {

    }

    @Override
    public void onSpotlightVideoChanged(boolean b) {

    }

    @Override
    public void onUserVideoStatusChanged(long l) {

    }

    @Override
    public void onMicrophoneStatusError(InMeetingAudioController.MobileRTCMicrophoneError mobileRTCMicrophoneError) {

    }

    @Override
    public void onUserAudioStatusChanged(long l) {

    }

    @Override
    public void onUserAudioTypeChanged(long l) {

    }

    @Override
    public void onMyAudioSourceTypeChanged(int i) {

    }

    @Override
    public void onLowOrRaiseHandStatusChanged(long l, boolean b) {

    }

    @Override
    public void onMeetingSecureKeyNotification(byte[] bytes) {

    }

    @Override
    public void onChatMessageReceived(InMeetingChatMessage inMeetingChatMessage) {

    }

```

**Requirement 2** : For iOS and Android

Upon ending the meeting, an alert is shown which is auto dismissed after few seconds

- Customize the alert message
- Shouldn’t be auto dismissed. Need callback on clicking “Ok” in Alert.

---

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 7, 2019, 1:53pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/4 "2019-05-07T13:53:47Z")

</div>

Hi @carson.zoom can you please take a look at this code and let us know how to distinguish when the host end the meeting?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 7, 2019, 4:48pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/5 "2019-05-07T16:48:02Z")

</div>

Hi Tamim,

Thanks for the detail. We will take a look and get back to you in shortly.

Thanks!

---

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 7, 2019, 9:23pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/6 "2019-05-07T21:23:46Z")

</div>

Do we have any update on this? Please let us know.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 8, 2019, 2:03am UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/7 "2019-05-08T02:03:24Z")

</div>

Hi Tamim,  
Thanks for the detail. If you would like to know the moment when the host ends the meeting, you can implement the `onMeetingLeaveComplete` method([https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/InMeetingServiceListener.html#onMeetingLeaveComplete-long-](https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/InMeetingServiceListener.html#onMeetingLeaveComplete-long-)). The method has a `long ret` parameter, which belongs to the MeetingEndReason([https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/MeetingEndReason.html](https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/MeetingEndReason.html)) class. The MeetingEndReason class has a `END_BY_HOST` statue, which is the one that you are looking for.

```auto
@Override
public void onMeetingUserJoin(long ret) {

if (ret == MeetingEndReason.END_BY_HOST) {
// Do something
}
}

```

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 8, 2019, 2:12pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/8 "2019-05-08T14:12:11Z")

</div>

Hi @carson.zoom Thanks for your help on the call back.

Can you please let us know how to customize the alert for the “Video ended” message. We want the user to go back to the home screen once they click on “OK” button of the video ended popup message

Would highly appreciate your quick response on this.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 8, 2019, 6:28pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/9 "2019-05-08T18:28:36Z")

</div>

Hi Tamim,  
Do you mean this message?

 ![Screenshot_20190508-111310](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/1X/d56dafcc3afcd2311ec5287db2e0de0b2c30e178.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 8, 2019, 7:35pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/10 "2019-05-08T19:35:44Z")

</div>

Yes @carson.zoom, thats is correct. Please let us know how to customize the alert or let us know how to override the event handler for the OK button.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 8, 2019, 8:43pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/11 "2019-05-08T20:43:21Z")

</div>

Hi,  
If you want to customize the alert message, you can do something like the following, take our demo app as an example

1. Navigate to the `res>values>strings.xml`
2. Inside the `<resources>` tag, add the following line:

```auto
    <string name="zm_msg_meeting_end">Something you want to show</string>

```

This will change the alert message. If you want to get the event handler for this OK button, we don’t have such interface for this.

Thanks!

---

<div class="post-metadata">

**Author:** ![Tamim\_Syed](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tamim_syed/32/810_2.png) [@Tamim\_Syed](https://devforum.zoom.us/u/Tamim_Syed)\
**Post date:** [May 31, 2019, 1:56pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/13 "2019-05-31T13:56:14Z")

</div>

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex016/uploads/zoomdeveloper/original/1X/c8b9827cf8df1da847c2e8fa5362e689dfd13555.png)

Hi @carson.zoom can you please let us know how to remove the timer as shown above? This timer is coming only from Android but absent on iOS.

Please help us to overcome this issue or let us know how to override that timer behavior.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 31, 2019, 8:30pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/14 "2019-05-31T20:30:10Z")

</div>

Hi,  
Thanks for the reply. Unfortunately, we do not an interface to control that.

Thanks!

---

<div class="post-metadata">

**Author:** ![balaji.murali](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balaji.murali](https://devforum.zoom.us/u/balaji.murali)\
**Post date:** [June 4, 2019, 11:56am UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/15 "2019-06-04T11:56:21Z")

</div>

Carson,

Thanks for the response. We need to show different alert message when provider / user ends the meeting. Can you please provide string resource to use when “patient / user ends the meeting”.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 4, 2019, 10:32pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/16 "2019-06-04T22:32:26Z")

</div>

Hi Murali,

Thanks for the reply. Is this string resource the one you are looking for? [Need to know when the host leave the meeting on Android SDK](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/11)

If not, please tell me the exact alert message and I will find the string resource for you.

Thanks!

---

<div class="post-metadata">

**Author:** ![balaji.murali](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balaji.murali](https://devforum.zoom.us/u/balaji.murali)\
**Post date:** [June 5, 2019, 6:13am UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/17 "2019-06-05T06:13:34Z")

</div>

Currently SDK shows same alert message when provider or user ends the meeting. But we need to show different messages.

**zm\_msg\_meeting\_end** — We’re using this to override the alert message that is displayed when provider ends the meeting.

Similarly do you have a different string resource which can be used when “user” ends the meeting?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 5, 2019, 9:28pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/18 "2019-06-05T21:28:47Z")

</div>

Hi,  
Thanks for the reply. I assume you mean the alert message when the participant clicks the “Leave Meeting” button. The resource string is below:

```auto
<string name="zm_alert_leave_conf">Do you want to leave this meeting?</string>

```

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![susankya](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/susankya/32/10935_2.png) [@susankya](https://devforum.zoom.us/u/susankya)\
**Post date:** [June 23, 2020, 7:01pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/19 "2020-06-23T19:01:53Z")

</div>

Hello,

I don’t know why but onMeetingLeaveComplete is not working.  
When the host ends the meeting, a prompt is shown from the SDK in my app, but this method is never called.  
I believe I have properly implemented the InMeetingServiceListener.  
Is there an issue with this?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 26, 2020, 11:31pm UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/20 "2020-06-26T23:31:58Z")

</div>

Hi @susankya,

Thanks for using Zoom SDK. Are you using Zoom UI or custom UI? Could you provide more information, such as code snippets, or how to reproduce the issue you are facing with our demo app?

Thanks!

---

<div class="post-metadata">

**Author:** ![haider.saleem](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@haider.saleem](https://devforum.zoom.us/u/haider.saleem)\
**Post date:** [May 19, 2021, 7:05am UTC](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161/21 "2021-05-19T07:05:03Z")

</div>

Hi @carson.zoom! Can we override this pop up message or “Ok” button action now?

[Next page](https://devforum.zoom.us/t/need-to-know-when-the-host-leave-the-meeting-on-android-sdk/4161.md?page=2)
