MobileRTCShareView has black background in latest SDK

Using SDK v5.2.42043.1112 I had implemented annotation support with a custom UI. It uses a system overlay to place a MobileRTCShareView on top of the whole OS and this is where the drawings are rendered. Everything was working great.

Then I attempted to upgrade to SDK v5.5.1.1317 and I noticed that the system overlay had become solid black, blocking your view from the entire OS. The annotation drawings were still rendering however, you just can’t see the underlying Zoom app or OS.

I tried explicitly setting the background color on the MobileRTCShareView to be Color.TRANSPARENT, but that did not help. There’s no other views or view groups involved, I add the MobileRTCShareView directly to the window manager.

This is also a problem in SDK v5.4.3.613. Last known version it was working correctly was v5.2.42043.1112.

Hi @vuzix_greg, thanks for the post.

Are you able to reproduce this in our sample app’s custom UI? If so, please provide the device make/model and the version of Android you are running.

Thanks!

@jon.lieblich No, can’t reproduce with the the sample app, the annotations appear without blacking out the rest of the screen. However, the sample app is using the screen share toolbar overlay from the SDK. In my case, I’m hiding the screen share toolbar and programmatically enabling annotations with my own overlay and a MobileRTCShareView as discussed in a previous post. That approach worked back in SDK v5.2.42043.1112. Should I not be using this technique? Is there a better way?

Hey @vuzix_greg,

Does this happen in the latest version of the SDK as well?

Thanks!
Michael

@Michael_Condon the latest version I see available is v5.5.1.1317 and yes, it happens with that version. The last known version where it does not happen is v5.2.42043.1112.

Hi @vuzix_greg,

Thanks for providing the additional information. We will investigate this and let you know as soon as we have any updates.

Thanks!

Hi @vuzix_greg Can you provide a demo code for this issue?

@donny.bao I have modified the Android SDK sample app to demonstrate this issue. How can I get it to you?

Hi @vuzix_greg,

You can send the project over to developersupport@zoom.us if you’d like to send the whole thing. Alternatively, since you were able to modify the sample app, you could also simply post the git diff text as a reply here. Please feel free to do whichever option is more convenient for you. :slightly_smiling_face:

Thanks!

@jon.lieblich email on the way!

Hi @vuzix_greg,

Confirming that we have received your email. Thanks for sending that over! We will let you know as soon as we have any updates on this.

Thanks!

1 Like

Hi @vuzix_greg I read the code you provided, the annotationView in AnnotationOverlayManager did not set the shared content for it, so what you see is a black background, for example, you can call annotationView.setShareWhiteboard()

@donny.bao I’m calling:

ZoomSDK.getInstance().getInMeetingService()
    .getInMeetingShareController().startShareViewContent(annotationView);

If I call setShareWhiteboard(), now the overlay is completely white. So the behavior does change, it’s just not the transparent background that was working before in v5.2.42043.1112.

Is there another view I should be using for the overlay? The screen share toolbar can render the annotations with a transparent background, so I know it’s still possible…

Hi @vuzix_greg,

Thanks for confirming. We’ll continue looking into this and let you know as soon as we have any updates.

Thanks!

Hi @vuzix_greg What is your need?

@donny.bao I have devices without touchscreens. Users want to allow remote users to annotate their screen on these non-touchscreen devices. I can’t use the screen share toolbar to control annotations because that toolbar can only be controlled with touch input. So I hide the screen share toolbar and then use InMeetingAnnotationController to programmatically turn annotations on/off. I use a MobileRTCShareView, added as a screen overlay by the window manager, to display the annotations drawn by remote users on top of the Android OS.

As of SDK v5.2.42043.1112, this worked. But beginning with SDK v5.4.3.613, MobileRTCShareView has a solid black background and I can no longer use it as an overlay on top of Android. Calling setShareWhiteboard() turns the solid black background to solid white.

So, my need is for MobileRTCShareView to not have a solid background and go back to being transparent. Or I need another way to draw remote user annotations on top of Android as a system overlay.

There’s a class internal to MobileRTCShareView called AnnoTextureView. I tried to add one of those as a system overlay to see what would happen. AnnoTextureView also seems to have a solid black background. So perhaps MobileRTCShareView is not the problem and AnnoTextureView is to blame?

Hi @vuzix_greg I know you want to use annotation, right? I want to know whether you are currently sharing content or watching other’s sharing. What kind of use annotation scenario do you belong to?

@donny.bao The Zoom SDK app that I am building will have Android users sharing their screen. But other meeting participants, most likely desktop users, will annotate the Android screen. This includes being able to leave the Zoom app on the Android device an still allow remote users to annotate the rest of the Android OS. I hope that makes sense.

And again, this was all working before SDK v5.4.3.613.

I created this method:

private static AnnoTextureView getAnnoTextureView(SDKShareView sdkShareView) {
    try {
        Field mAnnotateView = SDKShareView.class.getDeclaredField("mAnnotateView");
        mAnnotateView.setAccessible(true);
        return (AnnoTextureView)mAnnotateView.get(sdkShareView);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}

In the hopes that if I could get access to the AnnoTextureView that is a member of the MobileRTCShareView, I might be able to call setBackgroundColor(int) on it. I can’t because TextureView throws an exception if you attempt to set a background color. I also tried calling setOpaque(false) on the AnnoTextureView, that has no effect either. It still displays as solid black.

Hi @vuzix_greg you should not put MobileRTCShareView into WindowManager(Because the reason of TextureView). You can put MobileRTCShareView into content view(android.R.id.content) of Activity to solve this issue.

I found a solution. The fact that annotations are drawn with a TextureView now, instead of a SurfaceView with the old SDK, when adding the MobileRTCShareView as a system overlay with the WindowManager, you have to specify PixelFormat.TRANSLUCENT in your LayoutParams. The default is OPAQUE, which does not play nicely with TextureViews.

Thanks @donny.bao for pointing out that a TextureView is being used now.