Android Question How to change service start at boot to true or false programmatically

Rick Harris

Well-Known Member
Licensed User
I want to make it possible for a user of my app to decide whether the app should startup automatically at boot. For this purpose I am using a servive. How can I change start at boot to true or false programmatically in a service?
 

JordiCP

Well-Known Member
Licensed User
Just guessing, don't know if it is very "neat". The service will always start but it will kill itself if user has chosen "NO-STARTUP-AT_BOOT" (the service will retrieve this info from somewhere)
 

Rick Harris

Well-Known Member
Licensed User
Thank you all. I think I will add two identical (kiosk) services to my project: One that has StartAtBoot set to true and the other to false. The user will be able to set an autoboot integer to 0 or 1 that will determine which of the two services will be activated by my app. Pity that there is no simpler way (unless Erel has some ideas).
 
Top