Back button behavior when in a meeting

Description
I’d like to get some clarification on the back button behavior when using the Zoom SDK. If I join a meeting via meetingService.joinMeetingWithParams() from my own Activity, Zoom launches it’s own Activity (I believe it’s called ConfActivityNormal internally). If I press the back button at this point, the entire application will be closed as it’s sent to the background. However, the meeting still seems to be active and the user does not leave the meeting.

The other scenario is where I join a meeting via meetingService.joinMeetingWithParams() from my own Activity, but have another custom Activity specified in config.xml via with the following:

<string name="zm_config_conf_activity">com.example.CustomZoomActivity</string>

In CustomZoomActivity, in order to prevent the app from closing when the back button is pressed, I have to override onBackPressed and then call finish(). This will successfully go back to the previous Activity without closing the app, however the onMeetingStatusChanged listener shows the meeting is still active.

Summary of questions:

  1. Why does the entire application close when the back button is pressed when using the default Zoom Activity?
  2. How can the back button behavior be properly handled? Is the way I’ve suggested in the description the correct way?
  3. Why does the user who joined the meeting not leave the meeting when the back button is pressed, and how can that behavior be achieved?

Specific, itemized answers to these questions are appreciated.

Which version?
SDK version v5.0.24433.0616

To Reproduce
See description.

Smartphone (please complete the following information):

  • Device: Pixel Emulator
  • OS: Android
  • Version: API 29

Hi @caleb.c,

Thanks for the post. Regarding your questions:

If you are using the Zoom default UI, when you press the back button, it will bring the app to the background.

The way you are mentioning is the proper way to override the back button action.

Calling finish() is not going to leave the meeting. In order to leave the meeting, you will need to call InMeetingService.leaveCurrentMeeting before calling finish() .

Thanks!

@Carson_Chen

I appreciate the response. Regarding:

My question is why it backgrounds the app. That’s fairly odd behavior, so I’m wondering why the decision was made to have that be the default.

1 Like

Facing the same Problem
I am using default UI and extending
So how i can achive this with default UI and custom OnBackPress

Hi @caleb.c,

Thanks for the reply. I do not know how this design comes from but I have forwarded your feedback to the engineering team for consideration. Thanks for the feedback.

Hi @harmanbeer007,

Thanks for using Zoom SDK. Please refer to the answer here: Onbackpress to go out of application

Thanks!