views:

107

answers:

2

How can I get battery level and state (plugged in, discharging, charging, etc)? I researched the developer docs and I found a BatteryManager class. But it doesn't contain any methods, just constants. How do I even use it?

A: 

After some MORE researching, I found BatteryManager.EXTRA_LEVEL.

Mohit Deshpande
+1  A: 

Here is a code sample that explains how to get battery information: http://www.tutorialforandroid.com/2009/01/getting-battery-information-on-android.html

SirDarius