Android Zoom SDK - Sreen share is stuck or non - interactive when started programatically

Hello

Zoom SDK Version: zoom-sdk-android-5.12.2.9109

I am trying to start screen share by clicking a button. I am using zoom UI only by extening my activity from MeetingActivity(). Below is the code I have tried.

shareScreenButton.setOnClickListener{
      startMediaProjectionRequest()
}

private fun startMediaProjectionRequest() {
        if (mScreenInfoData == null) {
            mediaProjectionManager =
                getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager

            startActivityForResult(
                mediaProjectionManager?.createScreenCaptureIntent(), MEDIA_PROJECTION_REQUEST_CODE
            )
        } else {
            startScreenShareService()
        }
    }

    @SuppressLint("NewApi")
    private fun startShareScreen(data: Intent?) {
        Timber.e("Start share screen $data")
        mScreenInfoData = data
        if (data == null) {
            return
        }
        if (Build.VERSION.SDK_INT >= 24 && !Settings.canDrawOverlays(this)) {
            val intent = Intent(
                Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:$packageName")
            )
            startActivityForResult(
                intent, REQUEST_SYSTEM_ALERT_WINDOW
            )
        } else {
            startScreenShareService()
        }
    }

    private fun startScreenShareService() {
        val error = mZoomSDK.inMeetingService.inMeetingShareController.startShareScreenSession(
            mScreenInfoData
        )
        Timber.e("Screen share error $error $mScreenInfoData")
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        Timber.e("onActivity result $resultCode $requestCode")
        if (requestCode == MEDIA_PROJECTION_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                startShareScreen(data)
            } else {
                Timber.e("Screen share permission denied!")
            }
        } else if (requestCode == REQUEST_SYSTEM_ALERT_WINDOW) {
            mZoomSDK.inMeetingService.inMeetingShareController.startShareScreenSession(
                mScreenInfoData
            )
        }
    }

override fun onShareActiveUser(userId: Long) {
        Timber.e("onShareActiveUser $userId ${mInMeetingService.isMyself(userId)}")
        if (mInMeetingService.isMyself(userId)) {
            if (mInMeetingService.inMeetingShareController.isSharingOut) {
                if (mInMeetingService.inMeetingShareController.isSharingScreen) {
                    val shareResult =
                        mInMeetingService.inMeetingShareController.startShareScreenContent()
                    Timber.e("Share result $shareResult")
                }
            }
        }
    }

Once the above code is executed, I can see the screen getting shared. But when I tried clicking / swiping the home screen where all the apps icons are present, it is not responsive. One interesting this is, I can access Notification area and bottom device soft buttons.

Please let me know where I am doing wrong?

The screen is responsive if I don’t allow Overlay permissoin. But Zoom floating controls can’t be seen.