Services Question

abhishek007p

Active Member
Licensed User
Longtime User
Hi,

i have made a call blocker app. in it i am using a service to check for incoming call.

It works but when i left the phone for few hours, i found that my service stopped, so i started using sticky service. this time my service kept running but sometime (when they is a call and phone comes out of standby) it crashes the whole app. i am unable to reproduce it correctly so dont know if the problem is in the type of service or the way i am blocking calls.

Thanks,
abhishek
 

abhishek007p

Active Member
Licensed User
Longtime User
here is the log. looks like some list is not initialized. i have a few list and global variables stored in a code module under Process_Globals.


B4X:
LogCat connected to: B4A-Bridge: Sony ST23i
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (service1) Create **
** Service (service1) Start **
Connected to B4A-Bridge (Wifi)
** Activity (main) Pause, UserClosed = false **
Log > RINGING
service1_matchnumbers (java line: 126)
java.lang.RuntimeException: Object should first be initialized (List).
   at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:45)
   at anywheresoftware.b4a.objects.collections.List.getSize(List.java:120)
   at com.at.callblocker.service1._matchnumbers(service1.java:126)
   at com.at.callblocker.service1._pe_phonestatechanged(service1.java:174)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
   at anywheresoftware.b4a.phone.PhoneEvents$ActionHandler.send(PhoneEvents.java:320)
   at anywheresoftware.b4a.phone.PhoneEvents$15.handle(PhoneEvents.java:239)
   at anywheresoftware.b4a.phone.PhoneEvents$16.onReceive(PhoneEvents.java:262)
   at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
   at android.os.Handler.handleCallback(Handler.java:605)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4424)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
   at dalvik.system.NativeStart.main(Native Method)
 
Last edited:
Upvote 0
Top