How to activate the battery saving?

0

How do I turn on battery power?

I will develop an application that monitors the battery, and that, when it reaches a certain percentage of the battery, the battery saving is activated automatically.

    
asked by anonymous 02.02.2017 / 16:14

1 answer

1

You can not activate the economia de bateria feature programmatically. This is because the android itself does not have a native function that does this and / or does not allow it. You can only do this if the device is rooteado . And even then, you do not have a function that does this, you would have to change a device configuration pattern, you would have to enter a value in the configuration file of it.

  

Alternatives

As you want to make an application that will manage the power usage of the device, your only way out is to create your own battery saving system .

To do this, you'll have to list all the device processes or all running applications, so you'll manage these applications, close them when you need them, run them again when you no longer need to close them, and etc.

I'll leave a link below that will help you do what I said above.

Source: ActivityManager

    
02.02.2017 / 16:38