Android Code Sample: Battery

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.

For more complete information about compiler optimizations, see our Optimization Notice.