In any case, to get battery usage information for each application per second in the API, adb shell, ...?
Apart from the battery usage screen in the settings, there is no API or command line to get this information.
just try reading 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 information shown on the battery usage screen. the key class is IBatteryStats and BatteryStatsImpl.
Source: https://habr.com/ru/post/1795367/More articles:file not saved on S3 with amazon paperclip configuration - ruby-on-rails-3Access httpRuntime maxRequestLength software - asp.netEntity Framework 4 context? - model-view-controllerHow to use standard C ++ libraries in xcode? - c ++Any tips for writing cross-browser Greasemonkey scripts? - javascriptHTTPS and data integrity - integrityPCRE and spaces - cWhat is the best way to include a Mercurial changeet id (or revision) in a Django template? - djangoremove numbers from the beginning of a line in a line using PHP - splitKeyboard ALT modifier cannot be overridden - javascriptAll Articles