Android Question How to keep service alive

Scantech

Well-Known Member
Licensed User
Im confused with the tutorial. I have 2 services which gets destroyed when app is in background. how do i prevent this from happening?
 

Scantech

Well-Known Member
Licensed User
I added your example in my service (only one of them). I had a timer running every 5 seconds and updating the notification. It is holding and not getting killed. My question, do i need the example in both services or 1 is sufficient. I am concerned the other service might get destroyed? So far both are holding.
 

Erel

Administrator
Staff member
Licensed User
Top