# Preview video render stops working after switchToNextCamera

**URL:** <https://devforum.zoom.us/t/preview-video-render-stops-working-after-switchtonextcamera/23994>\
**Category:** Android\
**Created:** [July 13, 2020, 3:09pm UTC](https://devforum.zoom.us/t/preview-video-render-stops-working-after-switchtonextcamera/23994 "2020-07-13T15:09:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![criva](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@criva](https://devforum.zoom.us/u/criva)\
**Post date:** [July 13, 2020, 3:09pm UTC](https://devforum.zoom.us/t/preview-video-render-stops-working-after-switchtonextcamera/23994/1 "2020-07-13T15:09:25Z")

</div>

I am working on an app with full customized UI following the Android Sample app in SDK  
Everything is working fine except the preview video render. It stops working after calling switchToNextCamera.

I does not happen in Sample app but I do not see any evident differences between Zoom sdk usage of my application and Sample app with Customized UI. The only difference is that my custom meeting activity is not hosting directly the MobileRTCVideoView component but it contains an androidx.viewpager2.widget.ViewPager2 that loads specific fragments hosting the MobileRTCVideoView components.

I checked the return value of switchToNextCamera and it is “true”

The issue looks similar to

> [@Calling .switchToNextCamera() freezes participants video preview window](https://devforum.zoom.us/t/calling-switchtonextcamera-freezes-participants-video-preview-window/14506):
>
> Description Whenever I call .switchToNextCamera() in our custom UI code the participants video window freezes and no longer shows whats happening on the feed unless I tap on the video preview to expand it to full view, then it refreshes and resumes the feed. Is there a command I’m missing that I need to call afterwards? switchCameraBtn = findViewById(R.id.zoom\_switch\_camera\_btn); switchCameraBtn?.apply { // set onClick this.setOnClickListener { videoController.s…

How can I investigate this kind of issue?  
Can I provide you some logs that could be useful for understand what is happening?

I am using SDK version v5.0.24433.0616  
The issue does not look related to a specific device or a specific version of the Android OS.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 17, 2020, 11:30pm UTC](https://devforum.zoom.us/t/preview-video-render-stops-working-after-switchtonextcamera/23994/2 "2020-07-17T23:30:40Z")

</div>

Hi @criva,

Thank you for the post. Please try not to switch the camera while in the preview stage. We will enhance this case in future releases.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:45pm UTC](https://devforum.zoom.us/t/preview-video-render-stops-working-after-switchtonextcamera/23994/3 "2020-08-21T22:45:13Z")

</div>

Closed on August 21, 2020, 10:45pm UTC


