Adding whiteboard video unit fails with `SDKERR_WRONG_USAGE`

Description

Using Custom UI on the Android Meeting SDK, I’m trying to render the whiteboard
stream in my own MobileRTCVideoView when a participant starts a whiteboard.

I listen for the whiteboard start via
InMeetingWhiteboardCtrlEvent.onWhiteboardStatusChanged(). When the status becomes
SDKWhiteboardStatus_Started, I add a whiteboard video unit to my video view manager:

val error = manager.addWhiteboardVideoUnit()

addWhiteboardVideoUnit() always returns SDKERR_WRONG_USAGE and nothing is
rendered.

I have already:

  • Enabled Custom UI: meetingSettingsHelper.isCustomizedMeetingUIEnabled = true
  • Enabled the whiteboard video view: meetingSettingsHelper.enableWhiteboardVideoView(true)

but the error is still returned. I can render normal participant video and shared
content into the same MobileRTCVideoView without any problem — only the whiteboard
unit fails.

Question: What is the correct sequence / preconditions to successfully call
addWhiteboardVideoUnit() in Custom UI? Is there an additional capability, event, or
timing requirement I’m missing that causes SDKERR_WRONG_USAGE?

Which Android Meeting SDK version?

Zoom Android Meeting SDK 7.0.5.

To Reproduce

Steps to reproduce the behavior:

  1. Initialize the SDK with Custom UI enabled and whiteboard video view enabled:

    zoomSDK.meetingSettingsHelper.isCustomizedMeetingUIEnabled = true
    zoomSDK.meetingSettingsHelper.enableWhiteboardVideoView(true)
    zoomSDK.meetingSettingsHelper.enableCloudWhiteboard(false)
    
  2. Join a meeting and register a whiteboard listener:

    inMeetingService.inMeetingWhiteboardController.setEvent(object : InMeetingWhiteboardCtrlEvent {
        override fun onWhiteboardStatusChanged(status: SDKWhiteboardStatus?) {
            if (status == SDKWhiteboardStatus.SDKWhiteboardStatus_Started) {
                // trigger adding the whiteboard video unit on the video view
            }
        }
    
        override fun onWhiteboardSettingsChanged(
            shareOption: SDKWhiteboardShareOption?,
            createOption: SDKWhiteboardCreateOption?,
            enable: Boolean,
        ) = Unit
    })
    
  3. From another participant, start a whiteboard. onWhiteboardStatusChanged fires with
    SDKWhiteboardStatus_Started.

  4. On the custom MobileRTCVideoView, add the whiteboard unit:

    val manager: MobileRTCVideoViewManager = videoView.videoViewManager
    manager.removeAllVideoUnits()
    val error = manager.addWhiteboardVideoUnit()          // returns SDKERR_WRONG_USAGE
    
  5. See that addWhiteboardVideoUnit() returns SDKERR_WRONG_USAGE and nothing renders.

Note: I tried adding the unit both immediately on SDKWhiteboardStatus_Started and
after a delay (~10s) in case the whiteboard content stream is not ready yet — same
result in both cases.

Screenshots

N/A (only a black video area is rendered; the relevant output is the returned error code).

Troubleshooting Routes

  • Confirmed Custom UI is enabled (isCustomizedMeetingUIEnabled = true) — normal
    active/participant video and screen-share units render correctly in the same
    MobileRTCVideoView.
  • Enabled meetingSettingsHelper.enableWhiteboardVideoView(true) before joining — no
    change.
  • Tried enabling meetingSettingsHelper.enableCloudWhiteboard(true) - no change either
  • Tried calling addWhiteboardVideoUnit() immediately on
    SDKWhiteboardStatus_Started and after a delay — same SDKERR_WRONG_USAGE.
  • Verified the whiteboard listener is registered via
    inMeetingWhiteboardController.setEvent(...) and the callback fires as expected.

Smartphone

  • Device: Pixel Tablet
  • OS: Android 14 (AAOS)

Additional context

  • The whiteboard is started by another participant, not the local user.
  • Could SDKERR_WRONG_USAGE indicate a missing precondition (e.g. the whiteboard must
    be in a specific shared state, an account/feature entitlement, or that
    addWhiteboardVideoUnit() is not supported in Custom UI on 7.0.5)? Guidance on the
    correct call sequence would be appreciated.