Android Question Error on sim.Initialize

Cassie

Active Member
Licensed User
Longtime User
Hi Guys,

Anyone have encountered issue when setting the android:targetSdkVersion to "30" the sim.initialize crashes but when set to android:targetSdkVersion to "28" seems working fine. Is there any new version for Simcard Libraries.

Thanks in Advance.
 
Hiding the error is a very good way not to get help. No one can help without the error.
Post the full error
 
Upvote 0
1. Post the error as TEXT as it is text!
2. Post the FULL ERROR
B4X:
Logger connected to:  HONOR RMO-NX1
Logger connected to:  HONOR RMO-NX1
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
B4A log: Initialize UploadFile library
Error occurred on line: 595 (General)
java.lang.SecurityException: : The user 10243 does not meet the requirements to access device identifiers.
    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.telephony.IHwTelephony$Stub$Proxy.getUniqueDeviceId(IHwTelephony.java:3424)
    at android.telephony.HwTelephonyManagerInner.getUniqueDeviceId(HwTelephonyManagerInner.java:1534)
    at android.telephony.HwTelephonyManagerInnerUtils.getUniqueDeviceId(HwTelephonyManagerInnerUtils.java:71)
    at android.telephony.HwInnerTelephonyManagerImpl.getUniqueDeviceId(HwInnerTelephonyManagerImpl.java:378)
    at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1999)
    at TelephonyInfo.TelephonyInfo.getInstance(TelephonyInfo.java:72)
    at simcard.SimCard.Initialize(SimCard.java:67)
    at ggc.cms.mobile137.general._loadmobileinformation(general.java:89)
    at ggc.cms.mobile137.main$ResumableSub_Activity_Create.resume(main.java:1254)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:275)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:150)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
    at anywheresoftware.b4a.keywords.Common$15.run(Common.java:1804)
    at android.os.Handler.handleCallback(Handler.java:955)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loopOnce(Looper.java:206)
    at android.os.Looper.loop(Looper.java:296)
    at android.app.ActivityThread.main(ActivityThread.java:8971)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:976)
** Activity (main) Pause, UserClosed = false **
 
Upvote 0
Hi John actually it is working if TargetSDK is 28 but when increase to 30 it crashes on that line of code.
Try requesting permission for READ_PRIVILEGED_PHONE_STATE then use TargetSDK 30. (Just going off a similar error I suffered)

Can you post sample code?
 
Last edited:
Upvote 0
Back
Top