Reputation: 127
I want the service to keep running even when the app is killed by the phone(When it needs RAM for other apps).
Is there a way to do this?
Upvotes: 0
Views: 471
Reputation: 74066
The best you can do is use startForeground which make it less likely for your service to get killed but it is still possible for it to get killed.
There is no way to guarantee you service stays alive forever
Upvotes: 0
Reputation: 21
No, you can only make your service persistent if you are developing system apps. These services will be basically un-killable.
Upvotes: 1