# It crashes when the app moves from the background to the foreground

**URL:** <https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673>\
**Category:** Android\
**Created:** [December 20, 2021, 12:01pm UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673 "2021-12-20T12:01:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![t.yamamoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/t.yamamoto/32/39167_2.png) [@t.yamamoto](https://devforum.zoom.us/u/t.yamamoto)\
**Post date:** [December 20, 2021, 12:01pm UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/1 "2021-12-20T12:01:29Z")

</div>

**Description**  
It crashes when the app moves from the background to the foreground.

**Which Android Meeting SDK version?**  
zoom-sdk-android-5.7.6.1922

**To Reproduce(If applicable)**  
Select Settings app → System → Developer options.  
Check “Don’t keep activities”.

Select Zoom Sdk Sample app → Settings.  
Check “Customized UI”.

1. Tap “Join this Meeting” in the Zoom Sdk Sample app to join the meeting.
2. Make Zoom Sdk Sample app go background
3. Return to Zoom Sdk Sample app
4. See error

**Screenshots**

2021-12-20 20:44:06.758 7244-7244/us.zoom.sdkexample E/AndroidRuntime: FATAL EXCEPTION: main  
Process: us.zoom.sdkexample, PID: 7244  
java.lang.RuntimeException: Unable to resume activity {us.zoom.sdkexample/us.zoom.sdksample.ui.LoginUserStartJoinMeetingActivity}: java.lang.NullPointerException: Attempt to invoke interface method ‘void us.zoom.sdk.ZoomUIService.setZoomUIDelegate(us.zoom.sdk.ZoomUIDelegate)’ on a null object reference  
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4444)  
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476)  
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)  
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)  
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)  
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)  
at android.os.Handler.dispatchMessage(Handler.java:106)  
at android.os.Looper.loop(Looper.java:223)  
at android.app.ActivityThread.main(ActivityThread.java:7656)  
at java.lang.reflect.Method.invoke(Native Method)  
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)  
Caused by: java.lang.NullPointerException: Attempt to invoke interface method ‘void us.zoom.sdk.ZoomUIService.setZoomUIDelegate(us.zoom.sdk.ZoomUIDelegate)’ on a null object reference  
at us.zoom.sdksample.ui.LoginUserStartJoinMeetingActivity.onResume(LoginUserStartJoinMeetingActivity.java:89)  
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)  
at android.app.Activity.performResume(Activity.java:8129)  
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4434)  
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476)  
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)  
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)  
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)  
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)  
at android.os.Handler.dispatchMessage(Handler.java:106)  
at android.os.Looper.loop(Looper.java:223)  
at android.app.ActivityThread.main(ActivityThread.java:7656)  
at java.lang.reflect.Method.invoke(Native Method)  
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)  
2021-12-20 20:44:08.295 7244-7260/us.zoom.sdkexample W/System: A resource failed to call close.

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

- Device: Android Emulator
- 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:** [December 20, 2021, 10:13pm UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/2 "2021-12-20T22:13:03Z")

</div>

Hi @t.yamamoto, thanks for the post.

Are you able to reproduce this crash on a physical device, or is it only present when using an emulator?

Thanks!

---

<div class="post-metadata">

**Author:** ![t.yamamoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/t.yamamoto/32/39167_2.png) [@t.yamamoto](https://devforum.zoom.us/u/t.yamamoto)\
**Post date:** [December 21, 2021, 1:15am UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/3 "2021-12-21T01:15:03Z")

</div>

The following physical device also crashed

- Pixel6(Android12)
- Nexus5X(Android8)

---

<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:** [December 21, 2021, 11:10pm UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/4 "2021-12-21T23:10:15Z")

</div>

Hi @t.yamamoto,

Thanks for confirming that this is not specific to the emulator. I was able to reproduce the crash, so no further information will be required on your end. I will keep you updated as soon as we have any new information.

Thanks!

---

<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:** [December 22, 2021, 7:40pm UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/5 "2021-12-22T19:40:58Z")

</div>

Hi @t.yamamoto,

We have identified a fix for this issue and will include it in the next release. If you didn’t already know, the best places to stay up-to-date with SDK releases are the #new-releases category and the [changelog page](https://marketplace.zoom.us/docs/changelog). 🙂

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:** [January 22, 2022, 5:41am UTC](https://devforum.zoom.us/t/it-crashes-when-the-app-moves-from-the-background-to-the-foreground/61673/6 "2022-01-22T05:41:32Z")

</div>

Closed on January 22, 2022, 5:41am UTC

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