The source of the application power consumption is the use of the device (feeling is a nonsense). such as screens, Cpu,gpu,gps,io, etc. However, the user can not stop the CPU operation, and can not stop IO and so on. Unless the computer is shut down. Of course the application if not using Cpu,io and so on is basically impossible. So the proposition of optimizing power consumption is actually how to consume electricity rationally.
First distinguish which is the unreasonable power consumption:
1 The device is occupied for a long time. For example, long time on the screen, long time to read and write data, long-time network access.
2 frequent switching devices. For example, switch the network back and forth, switch the GPS, constantly light screen and so on.
Second, how to detect power consumption anomalies.
Tools needed here (to be continued)
Reduce power consumption overall idea
1 do different tasks at different time. Example: Do some high power consumption while charging, and turn off the screen when it is low.
When the 2 device is turned on, the task is centrally processed. Example: Open the download in the WiFi condition, and access the network during the Doze window period.
3 absolute rejection of large power consumption of the device long-term open. Examples: GPS, camera, LED lights.
Specific practices include the following:
1 scheduling tasks according to battery conditions
2 scheduling tasks by using power management
3 using JobSchedule to schedule a task reasonably
App Power consumption optimization