Keep activity on when screen is off
android, android-activity
Solution
No. You don't have control over the Activity lifecycle. Any processes that you need to run while the screen is off must be executed in a `Service`. You must rebuild the application state whenever the screen is turned back on. Always assume the `Activity` can be wiped from memory at any time.
Problem
I got a service that start a new activity, while screen is off. I want the activity to stay on paused mode, and not get to the stopped mode. Is there a way to achieve this?