How to keep the user from touching outside of the dialog or catch the event?

Description

We’re using Android Meeting SDK v6.2.10.25791 with custom ui.
We open webinar and all the user are expected to be joined as a panelist.
When the user joined the webinar. The dialog would be popped up. Based on the ReminderHelper event, it is TYPE_WEBINAR_AS_PANELIST_JOIN reminder.

When the user accept or decline with buttons it works fine as I can check the meeting status change event. But if the user touched the outside of the dialog the user will stuck in MEETING_STATUS_CONNECTING.
How can I disallow touching outside of the dialog or catch the event when the user simply dismissed the dialog?

Here is sample code. The MobileRTCVideoView is being used with AndroidView. The View is added to the tree soon after the SDK is initialized. I found the dialog is only showed up when this view is added to the tree.


// somewhere in our @Composable
    if (isZoomInitialized) {
        AndroidView(
            factory = { context -> MainVideoViewWrapper(context)},
            update = { view ->
                if (meetingStatus == MEETING_STATUS_INMEETING) {
                    view.showVideo()
                } else {
                    view.hideVideo()
                }
            },
            onRelease = { view -> view.clear() }
        )
    }



class MainVideoViewWrapper : LinearLayout {
    // ...
    
    private fun init(context: Context) {
        windowView = LayoutInflater.from(context)
            .inflate(R.layout.main_video_view_wrapper, null) as LinearLayout

        videoView = windowView?.findViewById(R.id.video_view)

        addView(windowView)
    }
    
    // This will be called when the meeting status is MEETING_STATUS_INMEETING
    fun showVideo() {
        val renderInfo = MobileRTCVideoUnitRenderInfo(0, 0, 100, 100)
        videoView?.videoViewManager?.removeAllVideoUnits()
        videoView?.videoViewManager?.addActiveVideoUnit(renderInfo)
    }
}

Additional context

  • Meeting SDK Version: v6.2.10.25791
  • Device: Samsung Galaxy A9+
  • OS: Android 14

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.