Close meeting onBackPressed

Ive been following the zoom docs to make my own personalized app. Ive played around with the Zoom android-example-sdk app and, following the docs, ive integrated zoom sdk into my own app as shown in the docs (importing the commonlib.aar and mobile.aar packages into my personal project). Ive come across a problem now.

I want that onBackPressed instead of just closing the application, it displays a custom alertdialog to close the meeting and on pressing the positive button Yes the meeting closes and it returns to the previous activity (which is MainActivity to be specific).

Ill easily make the custom alertdialog but the rest of it i need your help with. How do i make the meeting activity listen to the backpress and then perform the required actions? My file tree in android studio is as follows:

tree

Hi @abduljav123, thanks for the post.

In order to programmatically leave the meeting, you can call leaveCurrentMeeting.

Overriding the behavior of the back button is outside of the scope of what the SDK is responsible for, so if you are experiencing any issues on that front I would recommend checking out the official Android documentation. :slightly_smiling_face:

Thanks!