title: Get battery level and state in Android
body: <p>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?</p>