Hello everyone,
i am receiving on Play developer console some random errors like this:
I noticed that some users rised this exception 2-3 times in a row and so the OS stopped the app services to start again (and the app became useless!)
As i can see it seems it is raised while starting the service "check".
I suppose that these crashes happen when user removes the app from the recent apps list.
In that case i used the sub Service_TaskRemoved in Starter service like this:
The service Radar starts also the "check" service.
After receiving too many crashes i am wondering which is the best method to keep all the services running even if the user removes the app from recent app list.
And also is there a way to avoid/catch crashes on service start? Should i use Try-Catch?
The service "check" also contains some broadcast receivers. Is it possible that the crashes are rised while the service is called from an event that needs the receiver but the service for some reasons it is not ready/started?
Thanks in advance for your help
i am receiving on Play developer console some random errors like this:
B4X:
java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4080)
at android.app.ActivityThread.access$2400(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1898)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.RuntimeException:
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:216)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
at test.app.check.handleStart(check.java:102)
at test.app.check.onStartCommand(check.java:70)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4063)
I noticed that some users rised this exception 2-3 times in a row and so the OS stopped the app services to start again (and the app became useless!)
As i can see it seems it is raised while starting the service "check".
I suppose that these crashes happen when user removes the app from the recent apps list.
In that case i used the sub Service_TaskRemoved in Starter service like this:
B4X:
Sub Service_TaskRemoved
StartService("")
StartService(Radar)
End Sub
The service Radar starts also the "check" service.
After receiving too many crashes i am wondering which is the best method to keep all the services running even if the user removes the app from recent app list.
And also is there a way to avoid/catch crashes on service start? Should i use Try-Catch?
The service "check" also contains some broadcast receivers. Is it possible that the crashes are rised while the service is called from an event that needs the receiver but the service for some reasons it is not ready/started?
Thanks in advance for your help
Last edited: