Hi,
My widget crashes on boot of 4.4.2 but runs fine on earlier Android versions.
Are there permissions to be set in 4.4.2 to allow start on boot services?
Everything works correctly on 4.4.2 if I unload my widget from the home screen and then install it again from the app/widgets screen.
Any help would be much appreciated.
The on-boot error follows:
My widget crashes on boot of 4.4.2 but runs fine on earlier Android versions.
Are there permissions to be set in 4.4.2 to allow start on boot services?
Everything works correctly on 4.4.2 if I unload my widget from the home screen and then install it again from the app/widgets screen.
Any help would be much appreciated.
The on-boot error follows:
B4X:
** Service (widget) Create **
** Service (widget) Start **
java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1
at java.util.ArrayList.remove(ArrayList.java:405)
at anywheresoftware.b4a.debug.Debug.PopSubsStack(Debug.java:155)
at com.bcc.mobibcd.widget._service_start(widget.java:332)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at com.bcc.mobibcd.widget.handleStart(widget.java:68)
at com.bcc.mobibcd.widget.onStartCommand(widget.java:53)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2860)
at android.app.ActivityThread.access$2200(ActivityThread.java:161)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
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:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to start service com.bcc.mobibcd.widget@42976ef8 with Intent { flg=0x10000000 cmp=com.bcc.mobibcd/.widget bnds=[104,423][320,639] (has extras) }: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2877)
at android.app.ActivityThread.access$2200(ActivityThread.java:161)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
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:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:200)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at com.bcc.mobibcd.widget.handleStart(widget.java:68)
at com.bcc.mobibcd.widget.onStartCommand(widget.java:53)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2860)
... 10 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1
at java.util.ArrayList.remove(ArrayList.java:405)
at anywheresoftware.b4a.debug.Debug.PopSubsStack(Debug.java:155)
at com.bcc.mobibcd.widget._service_start(widget.java:332)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
... 14 more