Is there a way to choose what apps are allowed or denied to run background services in Android 9? I know that I can kill them in Settings > Apps & notifications > xe2x8cxa9 app xe2x8cxaa > Force stop
, but I need that
- the service is never started until I open the app;
- it is run when I open the app;
- it is killed when I close the app.
Let me make an example with WhatsApp (which is not an app I'm having problems with but makes it easier to explain what I need):
- when I boot the phone it shouldn't check for new messages
- when I open WhatsApp it should download them
- once I closed the app new messages shouldn't check for new messages until I open it again
If possible I would prefer a non-root solution.
Update
That's not a duplicate of Disable autostart on boot: I need not only to prevent autostart at boot, but also to kill all the background processes of the app when I close it.