# Programmatically allow remote participants to annotate my screen

**URL:** <https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509>\
**Category:** Android\
**Created:** [March 24, 2021, 7:57pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509 "2021-03-24T19:57:10Z")\
**Posts on this page:** 7\
**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:** [March 24, 2021, 7:57pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/1 "2021-03-24T19:57:10Z")

</div>

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 what I want.

The problem is, my app has a custom UI and I have hidden the screen share toolbar with:

```
    MeetingSettingsHelper.hideAnnotationInScreenShareToolbar(true);
    MeetingSettingsHelper.hideStopShareInScreenShareToolbar(true);

```

When the Android user shares their screen, I want to programmatically do whatever the Annotation button is doing in the screen share toolbar. I was hoping it was as simple as calling:

```
    InMeetingAnnotationController.startAnnotation();

```

However this doesn’t do anything. SDKERR\_OTHER\_ERROR is being returned. The remote user can draw on my shared screen, but after a few seconds the drawing disappears on their end and it never shows up on the Android side. Even if I allow the screen share toolbar to remain on the screen, startAnnotation() returns an error.

I’m assuming I need to do more setup before calling startAnnotation(). Perhaps configure some kind of screen overlay that can display the drawings? I’ve attempted to add a MobileRTCShareView as a shared whiteboard to the screen overlay, but that only results in covering my entire Android screen in white and even then the remote user can’t draw to it. So I don’t think that is the correct path.

I must be missing something simple. If I knew what the Annotation button in the screen share toolbar was doing internally this would be a lot easier! Any suggestions or documentation on how to programmatically enable annotations for remote participants?

Using SDK v5.4.3.613

---

<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:** [March 24, 2021, 9:23pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/2 "2021-03-24T21:23:55Z")

</div>

Hi @vuzix_greg, thanks for the detailed description.

Before calling `startAnnotation` can you please try checking the following values within the `InMeetingAnnotationController` class?

- `canDoAnnotation`
- `isPresenter`
- `isViewerAnnotationDisabled`

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:** [March 24, 2021, 9:54pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/3 "2021-03-24T21:54:14Z")

</div>

@jon.zoom you got it. Here is what I’m seeing:

canDoAnnotation(): true  
isPresenter(): false  
isViewerAnnotationDisabled(): false  
startAnnotation(): SDKERR\_OTHER\_ERROR

These are the values returned when I am the active participant who is sharing. Not sure why isPresenter() is false or how to make it true. This is the first time I’ve seen the term “presenter” in the API.

---

<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:** [March 25, 2021, 1:28am UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/4 "2021-03-25T01:28:24Z")

</div>

Hi, @vuzix_greg Did you call InMeetingShareController.startShareViewContent(MobileRTCShareView shareView) method？

---

<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:** [March 25, 2021, 2:53pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/5 "2021-03-25T14:53:19Z")

</div>

@donny.bao Thanks for the tip! I was only calling startShareScreenSession(Intent) and passing in the data returned from MediaProjectionManager. So I added an empty MobileRTCShareView to my layout and called startShareViewContent() right before calling startAnnotation() and the behavior has changed:

canDoAnnotation(): true  
isPresenter(): true  
isViewerAnnotationDisabled(): false  
startAnnotation(): SDKERR\_SUCCESS

I can finally see the remote desktop annotations show up in my app! Now I just need to move the MobileRTCShareView out of my layout and into a system overlay and I should have annotations working system wide on the Android side!

Thank you for the prompt help, it is very much appreciated!

---

<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:** [March 25, 2021, 10:02pm UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/6 "2021-03-25T22:02:07Z")

</div>

Glad to hear it’s working!

Please let us know if you need any additional help.

---

<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:** [April 25, 2021, 8:02am UTC](https://devforum.zoom.us/t/programmatically-allow-remote-participants-to-annotate-my-screen/46509/7 "2021-04-25T08:02:34Z")

</div>

Closed on April 25, 2021, 8:02am UTC

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