Singa
Singa

Reputation: 371

Battery usage settings, allow app running in background programmatically

In android Settings-> App Management -> App(Selected) -> Battery usage.

We find 3 options : enter image description here

How we can programmatically enable option 1 ( run in background), if we can't, how to redirect user to this page.

Thank you

Upvotes: 0

Views: 1501

Answers (1)

João Paulo Sena
João Paulo Sena

Reputation: 714

There is actually a mega thread on this at google's issue tracker. There is no simple way to change this, every OEM that has these types of fine control has it's own activity you need to point.

This site has a list of OEM's that does this. This old question has a lot of OEM's and intents you may use. And this library is a collection of these auto starters, so you may redirect the user to this screen.

Upvotes: 2

Related Questions