# Event on closing app

**URL:** <https://devforum.zoom.us/t/event-on-closing-app/86444>\
**Category:** Zoom Apps\
**Created:** [April 11, 2023, 4:55am UTC](https://devforum.zoom.us/t/event-on-closing-app/86444 "2023-04-11T04:55:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![so-young](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/so-young/32/36768_2.png) [@so-young](https://devforum.zoom.us/u/so-young)\
**Post date:** [April 11, 2023, 4:55am UTC](https://devforum.zoom.us/t/event-on-closing-app/86444/1 "2023-04-11T04:55:52Z")

</div>

Hi, wanted to ask if there are events our Zoom app can listen to for when:

1. the host closes the app
2. the host leaves the meeting

Thanks!

---

<div class="post-metadata">

**Author:** ![sathish.k](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sathish.k](https://devforum.zoom.us/u/sathish.k)\
**Post date:** [April 11, 2023, 5:01am UTC](https://devforum.zoom.us/t/event-on-closing-app/86444/2 "2023-04-11T05:01:05Z")

</div>

onMeeting event with event.action == ‘ended’ host close the app

---

<div class="post-metadata">

**Author:** ![biinster](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@biinster](https://devforum.zoom.us/u/biinster)\
**Post date:** [April 12, 2023, 2:13am UTC](https://devforum.zoom.us/t/event-on-closing-app/86444/3 "2023-04-12T02:13:13Z")

</div>

Hi So-Young,

Please be more specific as to what you are trying to accomplish.

If I understood you correctly, you are asking if there are such events that fire in a **participant’s instance** of the app when:

1. the **host** closes **their instance of the app** in the meeting
2. the **host leaves** the meeting without ending it, i.e. by transfering the host to another participant

The answer to (1) is no (AFAIK). For (2), it’s no, too, unless the participant is a co-host, in which case their instance of the app can listen to [`onParticipantChange`](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#onParticipantChange).

If, however, you instead want events that are triggered for the host themselves, rather than another participant, then it’s still no for (1) (again, to the best of my knowledge), but for the case when the user of the app leaves the meeting there is, like @sathish.k said, [`onMeeting`](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#onMeeting) event with `action==='ended'` in the body, which indicates that the meeting is ending. After it fires, there is, apparently, a 10-second delay before the main client stops receiving messages from the meeting instance (or sooner if you issue [`endSyncData`](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#endSyncData) in the meeting).
