# Custom UI annotations broke in v5.10.1.5184

**URL:** <https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073>\
**Category:** Android\
**Created:** [May 16, 2022, 9:22pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073 "2022-05-16T21:22:25Z")\
**Posts on this page:** 13\
**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:** [May 16, 2022, 9:22pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/1 "2022-05-16T21:22:25Z")

</div>

I’m using a custom UI and I hide the annotation toolbar with:

```
hideAnnotationInScreenShareToolbar(true);

```

Then when I want to enable annotations programmatically during a screen share, I use WindowManager to add a system overlay containing a MobileRTCShareView. Then I call:

```
InMeetingShareController.startShareViewContent(MobileRTCShareView);

```

passing in the MobileRTCShareView from the system overlay. This was working up through SDK v5.9.6.4777. However starting with v5.10.1.5184, remote users cannot annotate the SDK app’s screen. The remote user can draw, but the drawings disappear after a few seconds and no other users can see the drawings.

If I enable the SDK annotation toolbar, annotations do work from there. So this only appears to be a problem with my custom programmatic annotation solution.

I do see these errors in my log:

```
2022-05-16 17:24:58.627 9175-9175 E/Annotate_Log_Jni: AnnoWindow_nativeUninit
2022-05-16 17:24:58.629 9175-9175 E/Annotate_Log_Jni: AnnoContentRender_nativeUninit
2022-05-16 17:24:58.629 9175-9175 E/Annotate_Log_Jni: AnnoContentRender_nativeUninit
2022-05-16 17:24:58.642 9175-9175 E/Annotate_Log_Jni: AnnoWindow_nativeInit
2022-05-16 17:24:58.643 9175-9175 E/Annotate_Log_Jni: AnnoContentRender_nativeInit
2022-05-16 17:24:58.643 9175-9175 E/Annotate_Log_Jni: AnnoContentRender_nativeInit
```

---

<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:** [May 17, 2022, 7:11pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/2 "2022-05-17T19:11:38Z")

</div>

Hi @vuzix_greg,

Can you please confirm whether you made any changes in your implementation when updating the SDK? Also, there were some changes to annotation in v5.10.3. They may not fix the behavior you’re seeing, but just to be sure can you please try updating and confirming whether the issue exists on that version as well?

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:** [May 17, 2022, 8:00pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/3 "2022-05-17T20:00:58Z")

</div>

Hi @jon.zoom,

I discovered this in v5.10.3.5614 (as I was giving a demo to a group of Zoom sales reps, I was like awww this used to work! 🙂).

To find the exact version this broke, I reverted the SDK upgrades step by step back to 5.9 and it started working again. I have not gone near my annotation implementation in a while.

---

<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:** [May 19, 2022, 7:18pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/4 "2022-05-19T19:18:28Z")

</div>

Hi @vuzix_greg,

Thanks for confirming. Can you please provide a code snippet showing how you are starting annotations programmatically so that we can look into what may have changed?

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:** [May 19, 2022, 10:25pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/5 "2022-05-19T22:25:59Z")

</div>

Hi @jon.zoom,

Basically something like this. annotationOverlayWrapper is just a FrameLayout containing a MobileRTCShareView called annotationView.

```
    int type = TYPE_SYSTEM_OVERLAY;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        type = TYPE_APPLICATION_OVERLAY;
    }

    try {
        WindowManager.LayoutParams params = new WindowManager.LayoutParams(type, FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT);
        getWindowManager().addView(annotationOverlayWrapper, params);

        InMeetingShareController controller = sdk.getInMeetingService().getInMeetingShareController();
        MobileRTCSDKError error = controller.startShareViewContent(annotationOverlayWrapper.annotationView);
        if (error == MobileRTCSDKError.SDKERR_SUCCESS) {
            return true;
        } else {
            removeOverlay();
            return false;
        }
    } catch (Throwable t) {
        return false;
    }

```

Note that when I call startShareViewContent(MobileRTCShareView), it returns SDKERR\_SUCCESS.

---

<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:** [May 20, 2022, 9:29pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/6 "2022-05-20T21:29:04Z")

</div>

Hi @vuzix_greg,

Thanks for the additional context. And just to be explicitly clear, are you not using anything from the `InMeetingAnnotationController` interface?

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:** [May 20, 2022, 10:09pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/7 "2022-05-20T22:09:18Z")

</div>

@jon.zoom

Actually I do. I make calls to InMeetingAnnotationController.disableViewerAnnotation(boolean) when I want to enable and disable remote desktop users’ annotation toolbar from displaying. Once I have everything setup and ready to go, I pass in false to cause the annotation toolbar to become visible on the desktop user side. Once done with annotations, I pass in true to remove the desktop users’ toolbar.

I also used to make calls to InMeetingAnnotationController.startAnnotation() and stopAnnotation(), but I found these calls were unnecessary at the time.

---

<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:** [May 23, 2022, 8:29pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/8 "2022-05-23T20:29:37Z")

</div>

Hi @vuzix_greg,

Thanks for confirming. Can you please provide some specifics around exactly when you are calling `disableViewerAnnotation`? I suspect that the timing of this will be the key that enables us to reproduce the issue on our end.

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:** [May 24, 2022, 11:37pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/9 "2022-05-24T23:37:44Z")

</div>

@jon.zoom

If the code snippet I shared above returns true, the very next thing I do is call disableViewerAnnotation(false). Once the user chooses to pause annotations or stops sharing completely, I call disableViewerAnnotation(true).

---

<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:** [May 26, 2022, 7:51pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/10 "2022-05-26T19:51:09Z")

</div>

Hi @vuzix_greg,

I’m wondering if it’s possible that a race condition was introduced. Are you able to try waiting a few seconds before calling `disableViewerAnnotation`? If that makes any difference, it should narrow down the cause of the issue quite a bit. Otherwise if it still is not working as expected, I think we’ll need to take a look at the SDK logs.

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:** [May 31, 2022, 5:01pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/11 "2022-05-31T17:01:23Z")

</div>

@jon.zoom

For a quick test, I removed all calls to InMeetingAnnotationController. No change. Then I added a call to InMeetingAnnotationController.startAnnotation(), which I used to do a long time ago. Also no change.

I’ll email you SDK logs.

---

<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:** [June 28, 2022, 8:03pm UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/12 "2022-06-28T20:03:25Z")

</div>

I tried SDK v5.11.0.6883. No change.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 29, 2022, 6:03am UTC](https://devforum.zoom.us/t/custom-ui-annotations-broke-in-v5-10-1-5184/69073/13 "2022-07-29T06:03:35Z")

</div>

Closed on July 29, 2022, 6:03am UTC

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