Is there a way to see the power consumption of an Android process? I have a rooted HTC Hero, and I have developed some native programs in C language. I want to see the power consumptions of these programs. So, I want a way to measure the power consumption in process level and not in application level as e.g. PowerTutor application does..
Is there an API that can help me develop an application that can do this thing? Can I use /proc/ stats etc.?
any ideas on this?
Open the Settings app. From the list, tap Battery or Battery Usage. It will display the list of apps and the battery life they consume.
1. Facebook and Messenger According to a report by Avast, Facebook and Messenger are on the top ten list of the apps that consume the most significant amount of resources.
Stay organized with collections Save and categorize content based on your preferences. Battery use information is derived from battery use statistics and power profile values.
As said here: Android Battery usage profiling
There is a private API, PowerProfile, for retrieving battery consumption on a subsystem level (see http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/com/android/internal/os/PowerProfile.java). Also take a look at the code for the fuel gauge you find in Android's settings on how they calculate power consumption: http://google.com/codesearch/p?hl=en#ohAXAHj6Njg/src/com/android/settings/fuelgauge/PowerUsageSummary.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With