Anton Zvonovsky
Anton Zvonovsky

Reputation: 343

Android: get real battery capacity left

I'm wondering, is there any way to find out how much of the aging battery's capacity left compared to its initial capacity? Something like "energy-full" vs "energy-full-design" provided by upower utility from Ubuntu distribution.

Upvotes: 3

Views: 706

Answers (2)

RvdK
RvdK

Reputation: 19800

Short answer: no

But:

The BatteryManager has a EXTRA_HEALTH property, which maybe give you the information you could use.

BATTERY_HEALTH_COLD 
BATTERY_HEALTH_DEAD 
BATTERY_HEALTH_GOOD 
BATTERY_HEALTH_OVERHEAT 
BATTERY_HEALTH_OVER_VOLTAGE 
BATTERY_HEALTH_UNKNOWN

Upvotes: 2

You can retrieve battery changes by using the following code:

http://developer.android.com/training/monitoring-device-state/battery-monitoring.html

There is also a BatteryManager.EXTRA_HEALTH flag to use. I have never used it personally so I can't tell what that is.

Upvotes: 2

Related Questions