How to keep my application alive in background, even after closing the app and clearing off the ram…
I know this is possible without a ROOT, beacuse Reddit does it for notification purposes…
Thanks in advance…
How are you clearing?
Sorry I meant clearing cache
You will have to use Android’s lifecycle functions like onStop() to save the necessary data that can be used in onRestart().
But I want to make my sensors work in background…