In Android 6.0, we can the detailed battery usage for each app as shown below. Is there a way to get these numbers programmatically within this app? I tried to use command "dumpsys batterystats --charged MY_APP" and parse the returned values, but this command can only be run by system app or from adb. Is there way to get similar data from my own app programmatically?
Asked
Active
Viewed 1,311 times
4
-
You've seen: http://developer.android.com/tools/performance/batterystats-battery-historian/index.html and https://github.com/google/battery-historian – Morrison Chang Nov 05 '15 at 21:13
-
did you found any answer – Edgar prabhu Feb 17 '16 at 11:31