Is there a better way to handle (things that I want to handle when app is killed - by swipe up) in android apart from a not so better solution - using Services (As they always run on the main thread).
Just got this, https://stackoverflow.com/questions/26842675/continue-service-even-if-application-is-cleared-from-recent-app Still wanted to know is there any other alternative.
Basically what I want to achieve is, I need to do certain action(saving items to DB etc), only when the user initiates and kills the app from the recent list(swipe up and kill the app/clear all from Recent list) - how can i achieve this- best way to achive this