I need to get statistics about the battery in milliAmpere. I've already found how to get the battery percentage and voltage but not the current.
There are applications like this that can do it but i wonder how.
Thank you
I need to get statistics about the battery in milliAmpere. I've already found how to get the battery percentage and voltage but not the current.
There are applications like this that can do it but i wonder how.
Thank you
I believe the only way to get the current is via the logcat. The system will occasionally post it to there so you'll need to go back find the last update for it.
There is no way of measuring current drawn from within the system - this or any other app can only estimate it based on timing information and voltage discharge that the system reports. You are not likely to have anything accurate based on just that though - to have more accurate information you need an accurate device power model.
There is a nice article by the Android framework guys about how the power model is built (also applies to the built-in battery power monitor).
TL;DR
This is a lot of hard work (sorry about that :) ), but there isn't another good way - it is actually an active research problem...