Android Question [SOLVED] Problem when try to start a service and the app was closed

Angel Mauro Avellaneda B.

New Member
Licensed User
I have this error when try to start a service:
java.lang.RuntimeException: Unable to create service unad.unagenda.
srvunagendaalarma: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2595)
at android.app.ActivityThread.access$1800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5097)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at unad.unagenda.srvunagendaalarma.onCreate(srvunagendaalarma.java:33)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2585)
... 10 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at unad.unagenda.srvunagendaalarma.onCreate(srvunagendaalarma.java:31)
... 11 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at unad.unagenda.main.initializeProcessGlobals(main.java:603)
... 14 more
Caused by: java.lang.NullPointerException
at anywheresoftware.b4a.BA.<init>(BA.java:106)
at unad.unagenda.clsdbadunad.innerInitialize(clsdbadunad.java:12)
at unad.unagenda.clsdbadunad._initialize(clsdbadunad.java:129)
at unad.unagenda.main._process_globals(main.java:930)
at unad.unagenda.main.initializeProcessGlobals(main.java:590)
... 14 more
 

Angel Mauro Avellaneda B.

New Member
Licensed User
Of course, the app was published... the problem is only when it was closed by user. otherwise it all ok. I tested with other explamples and the problem persist, if i closed an app and it have a service programed when the service try to start show a message the app xxx was stopped.
 
Top