Android Question How to keep service alive

Scantech

Well-Known Member
Licensed User
Longtime 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
Longtime 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.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top