# Does zoom sdk has any callback method which should execute when meeting is minimised

**URL:** <https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704>\
**Category:** Meeting SDK\
**Created:** [March 26, 2021, 6:25pm UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704 "2021-03-26T18:25:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkateswara.ponugot](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@venkateswara.ponugot](https://devforum.zoom.us/u/venkateswara.ponugot)\
**Post date:** [March 26, 2021, 6:25pm UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/1 "2021-03-26T18:25:25Z")

</div>

**Which Mobile Client SDK version?**  
v5.4.3.613

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Initiate zoom call from user1 to user2 and call connected
2. Tap on `more` button at bottom bar and tap on Minimize Meeting option
3. Meeting is minimised and showing picture in picture window
4. So want to do some stuff once meeting minimised, is there any callback method to do this

Already I tried with below approach

```
ZoomSDK.getInstance().zoomUIService.setZoomUIDelegate(object : ZoomUIDelegate {
        override fun onClickInviteButton(
            p0: Context?,
            p1: MutableList<MeetingInviteMenuItem>?
        ): Boolean = true

        override fun afterMeetingMinimized(p0: Activity?) {
            Timber.e("zoom afterMeetingMinimized called")
          
        }
    })

```

but, not worked

Thanks.

---

<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:** [March 26, 2021, 9:00pm UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/2 "2021-03-26T21:00:55Z")

</div>

Hi @venkateswara.ponugot, thanks for the post.

After minimizing the meeting I am able to see the `afterMeetingMinimized` callback invoked. Can you please confirm that you are using the default meeting UI? Also, what device make/model/Android version are you running?

Thanks!

---

<div class="post-metadata">

**Author:** ![venkateswara.ponugot](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@venkateswara.ponugot](https://devforum.zoom.us/u/venkateswara.ponugot)\
**Post date:** [March 29, 2021, 6:15am UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/3 "2021-03-29T06:15:04Z")

</div>

Hi Jon,  
Thanks for the update, I am using Zoom default UI only and also using Custom activity by extending Zoom’s MeetingActivity class.

In my custom activity’s onCreate() method I have used the above mentioned code.

Also, I am using my own invite screen hence the method onClickInviteButton() will returning true in the above code block.

Used device model: OnePlus7  
OS version: 10.0

Thanks!

---

<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:** [March 29, 2021, 5:36pm UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/4 "2021-03-29T17:36:52Z")

</div>

Hi @venkateswara.ponugot,

Thanks for the additional information. I am also subscribing the `ZoomUIDelegate` in the `onCreate` method of my Activity which extends `MeetingActivity`. Are you certain that the SDK is using your Activity and not its own instance? You could check this by adding a log statement in the `onCreate` method before or after your `setZoomUIDelegate` call.

Thanks!

---

<div class="post-metadata">

**Author:** ![venkateswara.ponugot](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@venkateswara.ponugot](https://devforum.zoom.us/u/venkateswara.ponugot)\
**Post date:** [March 31, 2021, 11:23am UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/5 "2021-03-31T11:23:58Z")

</div>

Hi @jon.zoom,

Thanks for the suggestion. I have added logs before and after the **setZoomUIDelegate()** method in my **ZoomCustomUIActivity’s** onCreate() method and logs are showing correctly i.e. My activity onCreate() method is called when zoom call start/join.

```
2021-03-31 16:17:14.783 16774-16774/com.pulsara.dev.debug E/ZoomCustomUIActivity: ZoomCustomUIActivity oncreate before setZoomUIDelegate()

2021-03-31 16:17:14.783 16774-16774/com.pulsara.dev.debug E/ZoomCustomUIActivity: ZoomCustomUIActivity oncreate after setZoomUIDelegate()

```

But when I tap on Minimize Meeting option then **afterMeetingMinimized()** callback not called.

**I have tried another approach:**

Override the **onMeetingConnected()** method in My activity and moved **setZoomUIDelegate()** to **onMeetingConnected()**. Now when I tap on minimize meeting option from more menu then the **afterMeetingMinimized()** callback called but zoom call is not minimized and picture-in-picture window is showing on top of Zoom call UI, is this is the expected behavior?

See the below image.

 ![Screenshot_20210331-162721__01](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/3/436e25823245e9f34aa6b3e85c6fbe90fafe68aa.jpeg)

Thanks!

---

<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:** [March 31, 2021, 4:35pm UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/6 "2021-03-31T16:35:12Z")

</div>

Hi @venkateswara.ponugot,

That’s great to hear that the callback is being correctly invoked now! Yes, this is expected behavior. You can navigate through your app after receiving that callback (e.g. starting a new Activity, calling `finish()` on the `MeetingActivity`, etc.) and click on the minimized meeting to return to the full-sized meeting.

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:** [May 1, 2021, 2:35am UTC](https://devforum.zoom.us/t/does-zoom-sdk-has-any-callback-method-which-should-execute-when-meeting-is-minimised/46704/7 "2021-05-01T02:35:41Z")

</div>

Closed on May 1, 2021, 2:35am UTC

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