I have created a service that is returning START_STICKY at the onStartCommand. However, after sometime, I notice that my app has been killed by the OS.
Is there any method/piece of code that I can use to prevent the app from being killed by the OS? I know this may not fall under the best practices. Or is there some other method that we can use like repeatedly check if the app is running, and to start the app if it is not?
Your insight on this is very much appreciated.
Cheers