Android Code Sample: Battery

Battery.zip
BSD2.0.txt

Developers many be interested in getting information about the state of the battery on a device. The Battery Manager in *Android provides information that may tell an application whether the device is plugged in to power or not. It can also report the battery's charge level.
This sample application shows an application developer some of the battery information that is exposed through the *Android OS.