# App Crash : App coming on foreground from background while the ShareVideoUnit is on the view

**URL:** <https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751>\
**Category:** Android\
**Created:** [September 21, 2021, 6:17am UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751 "2021-09-21T06:17:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutosh.singh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ashutosh.singh](https://devforum.zoom.us/u/ashutosh.singh)\
**Post date:** [September 21, 2021, 6:17am UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/1 "2021-09-21T06:17:16Z")

</div>

**Description**  
App crashes when a shareVideoUnit is on the screen (to reproduce : app goes to the background and returns to foreground) i.e on onResume with the following exception:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/4/f450bdd29e1068f943adbcb3aba933d9070df1d8.png)

**Which Android Meeting SDK version?**  
5.7.1.1267

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Make sure a shareVideoUnit is active on the screen
2. Make the app go background, open another app our app being in the background
3. Return to our app
4. See error

**Smartphone (please complete the following information):**

- Device: Pixel 5
- OS: Android 11

---

<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:** [September 21, 2021, 6:11pm UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/2 "2021-09-21T18:11:36Z")

</div>

Hi @ashutosh.singh, thanks for the post.

Sorry to hear you’re running into this crash. Are you able to reproduce this in the SDK sample app? Also, can you please elaborate around what you mean when you say “Make sure a shareVideoUnit is active on the screen”? Does this mean that the share view is being used to share content, or just present and inflated in the layout?

Thanks!

---

<div class="post-metadata">

**Author:** ![ashutosh.singh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ashutosh.singh](https://devforum.zoom.us/u/ashutosh.singh)\
**Post date:** [September 22, 2021, 4:02am UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/3 "2021-09-22T04:02:23Z")

</div>

Thank you for the response @jon.lieblich

I was not able to reproduce it on the SDK sample app.

The share view is present inflated in the layout and is actively rendering a screen share of another user (who are using other zoom clients, the app does not support sharing content here)

---

<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:** [September 22, 2021, 4:34pm UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/4 "2021-09-22T16:34:31Z")

</div>

Hi @ashutosh.singh,

Can you please provide some context around your implementation? How exactly are you displaying the shared content in your app?

Thanks!

---

<div class="post-metadata">

**Author:** ![ashutosh.singh](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@ashutosh.singh](https://devforum.zoom.us/u/ashutosh.singh)\
**Post date:** [September 22, 2021, 4:54pm UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/5 "2021-09-22T16:54:16Z")

</div>

I’m using a frame layout inflating a Custom view whose main view is a `MobileRTCVideoView` inside a parent of `FrameLayout`, in a similar manner as implemented in the sample app.

using renderInfo as `MobileRTCRenderInfo(0, 0, 100, 100)` if that matters.

Can you please explain to me what does that error relates to the implementation and what can be looked into to find a solution fast? As this a production issue and needs urgent resolution.

---

<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:** [September 23, 2021, 4:37pm UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/6 "2021-09-23T16:37:57Z")

</div>

Hi @ashutosh.singh,

Can you please provide more information, including all code snippets related to your implementation of this view? Currently, we do not have enough information to determine why this is happening since it is not reproducible in the sample app.

Thanks!

---

<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:** [October 24, 2021, 2:38am UTC](https://devforum.zoom.us/t/app-crash-app-coming-on-foreground-from-background-while-the-sharevideounit-is-on-the-view/57751/7 "2021-10-24T02:38:13Z")

</div>

Closed on October 24, 2021, 2:38am UTC

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