Android Question Can't add Starter service to legacy app

Rusty

Well-Known Member
Licensed User
Longtime User
I have an app written with B4a back in 2010. Back then, there was no Starter service to provide a standard entry point.
I wish to add a Starter service to my app, but when I do, it won't compile (even with B4a 6.5), it dies with:
java.lang.RuntimeException: Unable to create service talkingsurvey.b4a.survey.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2749)
at android.app.ActivityThread.access$1800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1375)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
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:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:165)
at talkingsurvey.b4a.survey.starter.onCreate(starter.java:47)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2739)
... 10 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:77)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:333)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
... 12 more

Any ideas on how to get a starter service to work with an old application?
Rusty
 

DonManfred

Expert
Licensed User
Longtime User
Without seeing your code it is hard to give advices
Try to uninstall The old App
Do a clean project
And install again
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
I sent it to Erel on another matter last week, maybe he can take a look.
I just now created a brand new "clean" app with a starter, using version 6.5; added all my code to it; compiled it and got the same EOF error.
 
Upvote 0
Top