Android Question Can't add Starter Service to existing (old) app

Rusty

Well-Known Member
Licensed User
Longtime User
I was hoping the new V6.80 would resolve my inability to add a Starter service to my main app, but, alas, it doesn't help.
When I add the Starter service to the app and compile it, it compiles, but then blows up. Here is the log of that which mentions my app:

I can't figure out why it won't let me add the service.
Does anyone else have this issue?
Does anyone have any suggestions?
I've tried starting a NEW project (with starter service) and adding my modules from my app; then compiling with the same results...
Any advice is appreciated.
Rusty
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello @Rusty,
It should be something from inside your Starter service because I just tried with a very old project (created with B4A v 4...) and I was able to add the Starter service, compile and run the app without troubles.
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks lemonisdead,
I just deleted the original starter service; created a new project; copied the NEW starter Service (which is completely empty of code) to the OLD app; recompiled and

also the filtered logs say:

I appreciate your help, but still no happiness.
Regards,
Rusty
 
Upvote 0

udg

Expert
Licensed User
Longtime User
I've tried starting a NEW project (with starter service) and adding my modules from my app; then compiling with the same results...
That leads me to believe that something goes wrong in your existing modules or their interaction with an newly added service named "Starter".
Could it be that you already have an object with that name elsewhere in your code?
Anyway, try again the new project approach and add one by one your modules until you find the problematic one

Edit:
in post #1 you have
java.lang.RuntimeException: Unable to create service talkingsurvey.b4a.survey.starter: java.lang.RuntimeException: java.io.EOFException
while in post #3 you have
java.lang.RuntimeException: Unable to create service talkingsurvey.b4a.survey.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed

something changed with the new approach. I am not good at reading those logs but it doesn't sound to me as a problem in your code.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
but then blows up
Did you tried to uninstall the "app without starter service" before you install the new "app with starter-service"?
Uninstall first and then compile and install the new version.

It is worth a try
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
Did you tried to uninstall the "app without starter service" before you install the new "app with starter-service"?
Uninstall first and then compile and install the new version.

It is worth a try

In addition to what is suggested by Don, before compiling've do you tried deleting ?

 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Sorry for the late reply, I've been travelling...
I tried the CLEAN and add a service with another name; renamed to starter, etc.
In DEBUG, it still doesn't work.
In RELEASE mode it does compile. (Thanks for the suggestion Erel )
It's good to work with brilliant people
I'd like it to work in DEBUG, if that is possible, otherwise development will be unreliable...
Thanks!
Rusty
 
Upvote 0

enginetrics

Member
Licensed User
Longtime User
Shooting in the dark here, but.....it appears that your app is trying to read or write to external SD but its not available.
storage. [com.policydm.adapter.XDMTargetAdapter(227/xdmInitExternalStorageState)] bExternalSDStorageAvailable [false]
Is this where the socket error is occurring?
 
Upvote 0

enginetrics

Member
Licensed User
Longtime User
Maybe the app is not letting go of the SD card resource handle before it is reloaded in the IDE under debug mode causing the resource to be unavailable at that time. Like I said previously, I'm shooting in the dark. I had a similar problem with httputils2 trying to run a job too soon before the previous job was done.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…