Custom Meeting Activity Override Not Working in Default UI

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:

  1. 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()
    }
}
  1. 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>
  1. 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>
  1. 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

1 Like

Hello, what is this line used for?

Try using these methods: setCustomizedMeetingUIEnabled or setNewMeetingUI.
Personally, I use the second one in my application by executing it in the ZoomSDKInitializeListener callback. I think this is the actual method in this case. It is used after the release of zoom meeting android sdk 5.14.0.

1 Like

Hello Dmitry, thanks for your suggestion. Just to clarify, I’m currently using:

sdk.meetingSettingsHelper.isCustomizedMeetingUIEnabled = false

This line ensures that I’m using Zoom’s default UI rather than a custom one. I understand that methods like setCustomizedMeetingUIEnabled or setNewMeetingUI were introduced in SDK 5.14.0 to facilitate using a custom UI, but I prefer to stick with the default UI at this point.

My main goal is to override the back button behavior in the Zoom meeting activity—specifically, to intercept the back press so that when a user presses the back button, the meeting ends and the app returns to the starting activity (SingleEventActivity) rather than merely minimizing the meeting. This behavior is crucial for our TV app, where simplicity in navigation is essential due to the complexities of using a TV remote.

Could you please advise on how to intercept or override the back button press in the default meeting activity (such as ZmConfActivity) so that it triggers leaving the meeting and returns to the starting activity instead of minimizing the meeting? Any guidance or code examples to achieve this behavior in the default UI (without switching to a custom UI) would be greatly appreciated.

Thank you for your assistance!

Best regards,
Alon Mittelman

1 Like

If I understand correctly, setNewMeetingUI is what you need. It goes something like this:

zoomSDK.getZoomUIService().setNewMeetingUI(MyMeetingActivity.class);

In your MyMeetingActivity itself, you don’t have to override layout. You can use override onBackPressed and onCreate there, as you already did.
P. S. I don’t know if isCustomizedMeetingUIEnabled affects setNewMeetingUI(), but it might.

1 Like

Thank you so much Dmitry ! it works fine now. thanks for your help