Hello Zoom Developer Support,
I’m reaching out regarding an issue with our Android TV app that uses the Zoom Android SDK. We need to override the default back button behavior during meetings so that the meeting ends (i.e., the user leaves the meeting) instead of minimizing the UI (entering Picture-in-Picture mode).
According to previous documentation and forum posts (circa March 2020), it should be possible to override the back button by creating a custom meeting activity (for example, MyMeetingActivity) and then configuring the SDK to use this activity via the zm_config_conf_activity key.
Here’s what we have done so far:
- Custom Activity Implementation:
We created a custom meeting activity, MyMeetingActivity, that extends a default UI class (currently using NewMeetingActivity since MeetingActivity is deprecated, also tried ZmConfActivity) and overrides onBackPressed. For example:
import android.os.Bundle
import us.zoom.sdk.ZoomSDK
class MyMeetingActivity : NewMeetingActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AVLogger.s("MyMeetingActivity onCreate called")
// Optionally set a custom layout if needed.
}
override fun onBackPressed() {
AVLogger.s("MyMeetingActivity - onBackPressed called")
// Force leave the meeting instead of minimizing.
ZoomSDK.getInstance().inMeetingService.leaveCurrentMeeting(true)
finish()
}
}
- Configuration in config.xml:
We added the following to our res/values/config.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="zm_config_conf_activity">com.my.package.MyMeetingActivity</string>
</resources>
- Manifest Declarations:
We also added a meta-data element and declared the activity in our AndroidManifest.xml:
<application
... >
<meta-data
android:name="zm_config_conf_activity"
android:value="com.my.package.MyMeetingActivity" />
...
<activity
android:name="com.my.package.MyMeetingActivity"
android:exported="false" />
</application>
- Starting meeting using JoinMeetingWithParams:
private fun joinMeeting(context: Context, zoomUrl: String) {
sdk.meetingSettingsHelper.isCustomizedMeetingUIEnabled = false
val meetingService = sdk.meetingService
val meetingOptions = JoinMeetingOptions()
meetingOptions.no_meeting_end_message = true
meetingOptions.no_dial_in_via_phone = true
meetingOptions.no_driving_mode = true
meetingOptions.no_invite = true
meetingOptions.no_video = true
val userName = singleEventViewModel.getUserName()
val params = JoinMeetingParams().apply {
displayName = userName
meetingNo = meetingNumber
password = psw
}
try {
meetingService.joinMeetingWithParams(context, params, meetingOptions)
mInMeetingService = sdk.inMeetingService
mInMeetingService?.addListener(this@SingleEventActivity)
isInMeeting = true
} catch (e: Exception) {
AVLogger.s("Failed to joinMeetingWithParams: ${e.message}")
}
}
Despite these changes, when a meeting starts the SDK still uses its default meeting UI (ZmConfActivity) and our MyMeetingActivity’s onCreate and onBackPressed logs never appear.
This indicates that the SDK is not launching our custom meeting activity at all.
Could you please advise if:
- There are additional configuration steps required to ensure that the SDK picks up our custom meeting activity?
- The mechanism to override the back button in the default UI has changed in the current SDK version?
- Any known issues or workarounds for this scenario?
Thank you very much for your assistance. I look forward to your guidance on resolving this issue.
We are using the lastes SDK version.
Best regards,
Alon Mittelman