Android Question Starting service after the process is killed

hookshy

Well-Known Member
Licensed User
Longtime User
If I enter the aplications in my phones and stop the process my services not start anymore ....
My service is scheduled to restart with
StartServiceAt("", DateTime.Now + DateTime.TicksPerSecond*120 ,True)
service_destroy is not called in this case
Service_destroy is called only if I go to running apps , track the service and hit stop .

Another issue is:
If I have boolean values that are defined as process globals in main activity and saved to disk , when my process starts I have to read the variables from disk in service_start sub in order to read the correct state of the variable
I have fixed the problems and in the future I will start developing from Service Starter with b4a v5.20

Q: how can I manage a reliable service module for critical operation like : receiving sms ...if the process is killed (from installed app not from running apps ) then the service may not start at all , or if it if the service is killed then can I start the service right away in service_destroy ?
 

xpectmore

Member
Licensed User
Longtime User
Nobody said that it is your fault. Nothing bad happened. Now you know that next time you should use code tags.
sorry .. i still have problems to understand some sentences.. due i speak for now 3 human languages and more than 12 computer languages/script languages/etc
 
Upvote 0
Top