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.zoom

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!

The above solution not working for me…I Used the kotlin language .

Hi @akshay.jadhav, thanks for using the dev forum.

Can you provide some additional information about your implementation? It isn’t clear what specific changes you have made or what behavior you are seeing.

Thanks!

  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?

Hi @akshay.jadhav,

  1. This is how the Android platform behaves. If you press back on the last Activity in a stack, the app will exit.
  2. Yes, the previously suggested method in this topic is still the recommended approach.
  3. The meeting connection will remain active unless the app’s process ends or the meeting is left manually. You can achieve that by calling leaveCurrentMeeting to leave the meeting when the back button is pressed.

Thanks!

[quote=“akshay.jadhav, post:9, topic:24216”]

[/quote]’=
Why does the entire application close when the back button is pressed.I need a solution for the onBackPress .How do I handle the back button when user in meeting.

Hi @akshay.jadhav,

This question was answered in my previous reply. If you have any specific follow-up questions or are unclear on my response, please let me know what is missing and I’ll be happy to help. :slightly_smiling_face:

Thanks!