Android Question Android 10 error

walmo

Active Member
Licensed User
Longtime User
Hi
Getting a error from device with android 10 on playstore.
Manifest sdk is to sdk28. Was on sdk29 with more errors.
Crash report..
Samsung Galaxy Note10+ (d2s), Android 10
Report 1

java.lang.NullPointerException
:
at anywheresoftware.b4a.BA.addLogPrefix (BA.java:587)
at anywheresoftware.b4a.keywords.Common.LogImpl (Common.java:191)
at com.XXX.XXX.main$ResumableSub_permision.resume (main.java:1413)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent (BA.java:250)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:190)
at anywheresoftware.b4a.BA$2.run (BA.java:370)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:7770)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1047)

I dont have a android 10device to test on , any idees..
THX
 

DonManfred

Expert
Licensed User
Longtime User
1. Where is the FULL Stacktrace?
2. Where is the example project upload?
 
Upvote 0

walmo

Active Member
Licensed User
Longtime User
There is not a error in code it runs from android4 to 9.
But on 10 this runtime permision must be diffrent or maybe it is not allowed.

B4X:
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
sim1.Initialize
sip = sim1.GetNetworkOperator   
serial = (sim1.GetSubscriberId)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
See my answer in your other thread. The same apply here i guess.

 
Upvote 0

walmo

Active Member
Licensed User
Longtime User
Yes Thx, so i think my app will end with android9 , As it is installed from playstore , Kiosk will not work.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
As it is installed from playstore , Kiosk will not work.
That´s true.

You should try NOT TO USE these values. Find an alternative way to use another serial. AdvertisingID for example.
 
Upvote 0

walmo

Active Member
Licensed User
Longtime User
Please if you can think of a way, Here is my setup.
I send data to a specific sim card in a clients phone , so i must detect if the sim is still in that exact device as my software is tracking data usage.
if sim is in another device i need to stop sending data as i can not measure data usage on the sim then.
Is there another way to detect sim in device.
Thanks
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Maybe monitoring a SIM change.
Have a look here or similar threads for some kind of epiphany.
 
Upvote 0
Top