cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1273
Views
5
Helpful
1
Replies

Jabber Guest SDK for Android: JabberGuestCall.createInstance method causes java.lang.SecurityException in Android 10 (getUniqueDeviceId: no access to device identifiers)

Marc M
Level 1
Level 1

Hi.

 

In our company we developed an app which uses the Jabber Guest SDK for Android to provide audio/video endpoints between mobile devices of the customers and Cisco endpoint devices. To show the preview screen of the call within the app we create an instance of the JabberGuestCall.

 

This worked fine so far. But when we made changes in our app to meet the Target API Level 29 which is required from Google for app updates starting with November 2020, a java.lang.SecurityException is thrown when calling the method JabberGuestCall.createInstance(Context , Uri) (see stacktrace below). Important: we could reproduce this only on devices with Android 10 installed. We used two devices which are not officially supported (HUAWEI LYA-L09, Samsung SM-T835), but maybe this is a more general problem not related to these special devices. Tests on other (not officially supported) devices with Android 8 and 9 and Target API Level 29 succeeded. We use the Jabber Guest SDK for Android version 11.2.0 which not supports yet the Target API Level 29.

 

Did anyone experience similiar issues? I found some hints that there is a newer version of the SDK (version 11.2.1; released in June 2020?). But there is no link in the download section (https://developer.cisco.com/site/jabber-guestsdk/downloads/android/), and the link for version 11.2.1 (https://developer.cisco.com/site/jabber-guestsdk/documents/release-notes/android/11_2_1/) in the release notes section does not return details to this release. Maybe this release fixes this issue and meets the Target API Level 29?

 

Thanks in advance for any hint/help.

Kind regards, Marc

 

This is the relevant stacktrace mentioned above (example.com used instead of the real package name):

2020-10-09 00:13:30.094 19522-19522/com.example.ourapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ourapp, PID: 19522
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ourapp/com.example.ShowCallActivity}: java.lang.SecurityException: getUniqueDeviceId: The user 10347 does not meet the requirements to access device identifiers.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3895)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4074)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.SecurityException: getUniqueDeviceId: The user 10347 does not meet the requirements to access device identifiers.
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at com.android.internal.telephony.IHwTelephony$Stub$Proxy.getUniqueDeviceId(IHwTelephony.java:3156)
at android.telephony.HwTelephonyManagerInner.getUniqueDeviceId(HwTelephonyManagerInner.java:1251)
at android.telephony.HwInnerTelephonyManagerImpl.getUniqueDeviceId(HwInnerTelephonyManagerImpl.java:358)
at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1653)
at com.cisco.jabber.guest.sdk.jcf.JcfJabberGuestCall.getDeviceId(JcfJabberGuestCall.java:578)
at com.cisco.jabber.guest.sdk.jcf.JcfJabberGuestCall.<init>(JcfJabberGuestCall.java:492)
at com.cisco.jabber.guest.sdk.jcf.JcfJabberGuestCall.createInstance(JcfJabberGuestCall.java:507)
at com.cisco.jabber.guest.sdk.JabberGuestCall.createInstance(JabberGuestCall.java:504)
at com.example.ShowCallActivity.onCreate(ShowCallActivity.java:75)
at android.app.Activity.performCreate(Activity.java:8085)
at android.app.Activity.performCreate(Activity.java:8073)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3868)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4074) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473) 
at android.os.Handler.dispatchMessage(Handler.java:110) 
at android.os.Looper.loop(Looper.java:219) 
at android.app.ActivityThread.main(ActivityThread.java:8347) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055) 

 

1 Accepted Solution

Accepted Solutions

Marc M
Level 1
Level 1

Providing the solution myself:
A new version 11.2.2 of the "Jabber Guest SDK for Android" is available now in the download section ( https://developer.cisco.com/site/jabber-guestsdk/downloads/android/ ). This release fixes the described issue above for me.
Thanks for the support in the DevNet Chat to solve this problem!
Kind regards.

View solution in original post

1 Reply 1

Marc M
Level 1
Level 1

Providing the solution myself:
A new version 11.2.2 of the "Jabber Guest SDK for Android" is available now in the download section ( https://developer.cisco.com/site/jabber-guestsdk/downloads/android/ ). This release fixes the described issue above for me.
Thanks for the support in the DevNet Chat to solve this problem!
Kind regards.