# MobileRTCShareView has black background in latest SDK

**URL:** <https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800>\
**Category:** Android\
**Created:** [April 12, 2021, 4:42pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800 "2021-04-12T16:42:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 12, 2021, 4:42pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/1 "2021-04-12T16:42:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 15, 2021, 7:15pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/2 "2021-04-15T19:15:30Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 16, 2021, 5:34pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/3 "2021-04-16T17:34:54Z")

</div>

@jon.zoom 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?

> [@Programmatically allow remote participants to annotate my screen](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509):
>
> I’ve searched the forum and can’t seem to find the answer I am looking for. I want a remote user to be able to annotate my entire Android screen. When I use the screen share toolbar, this works great. After sharing my screen via InMeetingShareController, I click on the Annotation option in the screen share toolbar. Then on the remote side of the meeting, users can go under View Options-\>Annotate and then draw on my Android screen, even when I switch to a different app. So far so good, exactly w…

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [April 19, 2021, 10:53pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/4 "2021-04-19T22:53:49Z")

</div>

Hey @vuzix_greg,

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

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 20, 2021, 2:58pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/5 "2021-04-20T14:58:29Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 20, 2021, 4:11pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/6 "2021-04-20T16:11:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![donny.bao](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@donny.bao](https://devforum.zoom.us/u/donny.bao)\
**Post date:** [April 21, 2021, 5:38am UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/7 "2021-04-21T05:38:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 21, 2021, 5:56pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/8 "2021-04-21T17:56:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 21, 2021, 6:22pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/9 "2021-04-21T18:22:45Z")

</div>

Hi @vuzix_greg,

You can send the project over to [developersupport@zoom.us](mailto: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. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 21, 2021, 7:16pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/10 "2021-04-21T19:16:49Z")

</div>

@jon.zoom email on the way!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 21, 2021, 8:15pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/11 "2021-04-21T20:15:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![donny.bao](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@donny.bao](https://devforum.zoom.us/u/donny.bao)\
**Post date:** [April 22, 2021, 7:13am UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/13 "2021-04-22T07:13:34Z")

</div>

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()

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 22, 2021, 2:25pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/14 "2021-04-22T14:25:52Z")

</div>

@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…

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 23, 2021, 4:48pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/15 "2021-04-23T16:48:50Z")

</div>

Hi @vuzix_greg,

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

Thanks!

---

<div class="post-metadata">

**Author:** ![donny.bao](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@donny.bao](https://devforum.zoom.us/u/donny.bao)\
**Post date:** [April 25, 2021, 12:30pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/16 "2021-04-25T12:30:02Z")

</div>

Hi @vuzix_greg What is your need？

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 25, 2021, 7:13pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/17 "2021-04-25T19:13:31Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![donny.bao](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@donny.bao](https://devforum.zoom.us/u/donny.bao)\
**Post date:** [April 26, 2021, 7:17am UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/18 "2021-04-26T07:17:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 27, 2021, 7:35pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/19 "2021-04-27T19:35:14Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![donny.bao](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@donny.bao](https://devforum.zoom.us/u/donny.bao)\
**Post date:** [April 28, 2021, 3:16am UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/20 "2021-04-28T03:16:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vuzix\_greg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vuzix_greg/32/45663_2.png) [@vuzix\_greg](https://devforum.zoom.us/u/vuzix_greg)\
**Post date:** [April 28, 2021, 3:13pm UTC](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800/21 "2021-04-28T15:13:32Z")

</div>

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.

[Next page](https://devforum.zoom.us/t/mobilertcshareview-has-black-background-in-latest-sdk/47800.md?page=2)
