# Exception only for Samsung Devices

**URL:** <https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589>\
**Category:** Android\
**Created:** [March 28, 2022, 9:41pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589 "2022-03-28T21:41:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![johankovalsikoski](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/johankovalsikoski/32/36396_2.png) [@johankovalsikoski](https://devforum.zoom.us/u/johankovalsikoski)\
**Post date:** [March 28, 2022, 9:41pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/1 "2022-03-28T21:41:49Z")

</div>

I tried to ask READ\_PHONE\_STATE permission but it still crashes for some users on Samsung devices.

Hope Zoom team can find some way to fix it and release a new version.

> **Fatal Exception: java.lang.RuntimeException**
>
> `Unable to resume activity {com.myapp/com.zipow.videobox.JoinByURLActivity}: java.lang.SecurityException: getCallState: Neither user 10299 nor current process has android.permission.READ_PHONE_STATE.`
> 
> ````nohighlight
> at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5223)
> at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5262)
> at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
> at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
> 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:2434)
> at android.os.Handler.dispatchMessage(Handler.java:106)
> at android.os.Looper.loopOnce(Looper.java:226)
> at android.os.Looper.loop(Looper.java:313)
> at android.app.ActivityThread.main(ActivityThread.java:8633)
> at java.lang.reflect.Method.invoke(Method.java)
> at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)```
> 
> ````

> **Caused by java.lang.SecurityException**
>
> `getCallState: Neither user 10299 nor current process has android.permission.READ_PHONE_STATE. - com.zipow.videobox.x.b.b.D`
> 
> ````nohighlight
> at android.os.Parcel.createExceptionOrNull(Parcel.java:2437)
> at android.os.Parcel.createException(Parcel.java:2421)
> at android.os.Parcel.readException(Parcel.java:2404)
> at android.os.Parcel.readException(Parcel.java:2346)
> at com.android.internal.telecom.ITelecomService$Stub$Proxy.getCallStateUsingPackage(ITelecomService.java:2578)
> at android.telecom.TelecomManager.getCallState(TelecomManager.java:1912)
> at android.telephony.TelephonyManager.getCallState(TelephonyManager.java:6456)
> at com.zipow.videobox.x.b.b.D(ZmAudioStatusMgr.java:3)
> at com.zipow.videobox.x.b.b.C(ZmAudioStatusMgr.java:4)
> at com.zipow.videobox.x.b.b.t(ZmAudioStatusMgr.java:1)
> at com.zipow.videobox.conference.jni.ZmConfDefaultCallback.initialize(ZmConfDefaultCallback.java:2)
> at com.zipow.videobox.mainboard.Mainboard.createConfAppForSdk(Mainboard.java:20)
> at com.zipow.videobox.VideoBoxApplication.initConfAppForSDK(VideoBoxApplication.java:23)
> at com.zipow.videobox.VideoBoxApplication.startConfServiceForSDK(VideoBoxApplication.java:8)
> at com.zipow.videobox.ptapp.ConfProcessMgr.createConfProcess(ConfProcessMgr.java:11)
> at com.zipow.videobox.mainboard.Mainboard.notifyUrlActionImpl(Mainboard.java)
> at com.zipow.videobox.mainboard.Mainboard.notifyUrlAction(Mainboard.java:5)
> at com.zipow.videobox.confapp.meeting.premeeting.joinscene.ZMJoinByUrl.joinByUrl(ZMJoinByUrl.java:56)
> at com.zipow.videobox.confapp.meeting.premeeting.joinscene.ZMJoinByUrl.joinByUrl(ZMJoinByUrl.java:41)
> at com.zipow.videobox.confapp.meeting.premeeting.joinscene.ZMJoinByUrl.startConfrence(ZMJoinByUrl.java:3)
> at com.zipow.videobox.JoinByURLActivity.a(JoinByURLActivity.java:13)
> at com.zipow.videobox.JoinByURLActivity.a(JoinByURLActivity.java:41)
> at com.zipow.videobox.JoinByURLActivity.b(JoinByURLActivity.java:44)
> at com.zipow.videobox.JoinByURLActivity.onResume(JoinByURLActivity.java:126)
> at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1476)
> at android.app.Activity.performResume(Activity.java:8433)
> at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5196)
> at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5262)
> at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
> at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
> 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:2434)
> at android.os.Handler.dispatchMessage(Handler.java:106)
> at android.os.Looper.loopOnce(Looper.java:226)
> at android.os.Looper.loop(Looper.java:313)
> at android.app.ActivityThread.main(ActivityThread.java:8633)
> at java.lang.reflect.Method.invoke(Method.java)
> at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)```
> 
> ````

---

<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:** [March 30, 2022, 5:18pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/2 "2022-03-30T17:18:39Z")

</div>

Hi @johankovalsikoski,

This crash indicates that you have not successfully requested the required permission. For more information on how to request permissions on Android, please see the [Android permissions documentation](https://developer.android.com/guide/topics/permissions/overview). 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![haseeb-gsu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/haseeb-gsu/32/36580_2.png) [@haseeb-gsu](https://devforum.zoom.us/u/haseeb-gsu)\
**Post date:** [April 4, 2022, 1:22am UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/3 "2022-04-04T01:22:34Z")

</div>

@jon.zoom I can confirm that this exception is indeed triggering on the following devices only:

- Samsung S20+
- Samsung S20 FE
- Xiaomi Note 10 Pro

Looking at the stacktrace, it’s obvious that the exception is being thrown because the ZoomSDK is using a deprecated call on SDK 31+. This behavior has only manifested after Zoom’s recent release targeting Android 12/SDK 31+.

> **[TelephonyManager  |  Android Developers](https://developer.android.com/reference/android/telephony/TelephonyManager#getCallState())**

Please have a look once again.

---

<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:** [April 4, 2022, 7:24pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/4 "2022-04-04T19:24:22Z")

</div>

Hi @haseeb-gsu, thanks for using the dev forum.

The replacement method for the deprecated method used by the SDK also requires the `READ_PHONE_STATE` permission, so the crash would still happen but with a slightly different stack trace. The SDK needs this permission regardless. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![haseeb-gsu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/haseeb-gsu/32/36580_2.png) [@haseeb-gsu](https://devforum.zoom.us/u/haseeb-gsu)\
**Post date:** [April 5, 2022, 11:06am UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/5 "2022-04-05T11:06:37Z")

</div>

Thanks for responding. Here’s a few things to consider:

- We let users join a meeting with just the meeting id and/or meeting password. This works, is part of the zoom feature set, and is part of the sample app.
- I think that invokes the `JoinByURLActivity` in the Zoom SDK.
- Zoom SDK declares `READ_PHONE_STATE` as a permission in `mobilertc.aar` on line 65.
- Zoom’s manifest is merged with the application, and hence always includes this permission in the output.

I don’t see why the application needs to redeclare the permission? It’s working on 95% of Android devices without the application expliclity declaring it. It’s the Samsung/Xiaomi devices throwing that exception.

---

<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:** [April 5, 2022, 8:20pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/6 "2022-04-05T20:20:10Z")

</div>

Hi @haseeb-gsu,

Declaring the permission in the SDK’s manifest does not mean that the permission is granted to any app in which the SDK is included. Until something changes in the actual Android implementation itself, this permission will be required to use the SDK in order to maintain Android 12 support. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![haseeb-gsu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/haseeb-gsu/32/36580_2.png) [@haseeb-gsu](https://devforum.zoom.us/u/haseeb-gsu)\
**Post date:** [April 7, 2022, 11:57pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/7 "2022-04-07T23:57:39Z")

</div>

I’m sure Zoom SDK handles requesting permissions as well. Essentially:

- Zoom SDK is declaring the permissions in its manifest
- Zoom SDK handles requesting the permissions on runtime as well during meetings. I have tested this, and the permissions are granted.

This is not a problem of requesting them or declaring them in the Manifest. I mentioned that the permission is there becuase you responded to the original question that he hasn’t requested the permission correctly.

The actual problem is somewhere else. I have tested the actual Samsung and Xiaomi devices, and they don’t show this error with the latest Zoom SDK. Perhaps a migration pre 12? Also, can you please provide a solution or point to one, given what’s already said above.

---

<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:** [April 8, 2022, 6:06pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/8 "2022-04-08T18:06:16Z")

</div>

Hi @haseeb-gsu,

This exception is produced by the operating system when `getCallState` is invoked without the `READ_PHONE_STATE` permission. You can resolve this by requesting that permission. This is not a bug with the SDK.

Thanks!

---

<div class="post-metadata">

**Author:** ![haseeb-gsu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/haseeb-gsu/32/36580_2.png) [@haseeb-gsu](https://devforum.zoom.us/u/haseeb-gsu)\
**Post date:** [April 9, 2022, 11:42am UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/9 "2022-04-09T11:42:09Z")

</div>

I can confirm SDK v5.10.1.5184 fixes the issue. Relevant update from SDK changelog could be:

New interfaces for Android 12 Custom UI

- New interface in `InMeetingService` :

```auto
boolean updatePermissions(String[] permissions, int[] grantResults);

```

---

<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:** [April 11, 2022, 6:06pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/10 "2022-04-11T18:06:04Z")

</div>

Glad to hear this is working now!

Please don’t hesitate to reach back out in a new topic with any additional questions. 🙂

---

<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:** [April 11, 2022, 6:06pm UTC](https://devforum.zoom.us/t/exception-only-for-samsung-devices/66589/11 "2022-04-11T18:06:10Z")

</div>

Closed on April 11, 2022, 6:06pm UTC


