Android Question About Starter Service

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
I would like to ask you if StartServiceAt is a legal way to keep starter service alive.
I've noticed that sometimes may Android kill the starter service of my app!
Thank you in advance!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You should never start the starter service yourself.
2. The OS will never kill the starter service directly. It will kill the whole process.


Add another service and use Service.StartForeground or a sticky service or StartServiceAt to start it whenever it is needed.
The starter service will be started automatically if the process was killed.
 
Upvote 0
Top