开发者

Android: Battery usage of each application

开发者 https://www.devze.com 2023-02-13 20:17 出处:网络
Is there anyway to开发者_如何学C get the battery usage info per application per second in API, adb shell, ...?Other than the battery usage screen in Settings, there is no API or command-line way to ge

Is there anyway to开发者_如何学C get the battery usage info per application per second in API, adb shell, ...?


Other than the battery usage screen in Settings, there is no API or command-line way to get this information.


just try to read http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/1.6_r2/com/android/settings/fuelgauge/PowerUsageSummary.java/ , then you can get the info shown in the battery usage screen. the key class are IBatteryStats and BatteryStatsImpl.

0

精彩评论

暂无评论...
验证码 换一张
取 消