Custom UI annotations broke in v5.10.1.5184

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

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!

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! :slight_smile:).

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.

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!

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.

Hi @vuzix_greg,

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

Thanks!

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

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!

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

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!

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

I tried SDK v5.11.0.6883. No change.

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