Thanks for the sample code! I looked into the documentation of BatteryManager but had no idea how to use it.
–
phuneheheApr 29 '11 at 2:15

3

This is a great example, but why you logging it on "error" level?
–
GetUsernameJun 29 '11 at 7:11

@GetUsername There's no particular reason for error-level logging other than personal preference. For logging like this that I remove before publishing my app, I like to log at the error level so it is easy to see the logging in the sea of logcat output.
–
plowmanJun 29 '11 at 17:15

I m doing that in a scheduler,
I get trouble with the unregisterReceiver, I first place it in onDestroy, was not a good idea.
Now the unregisterReceiver is at the end of the BroadcastReceiver , and it works perfectly.
thanks for this code plowman.

I needed to have a monitor on the battery and check the Level and the status. I am developing on MonoForAndroid, so here is what I came up with. I am putting it here in case somebody have a similar requirement. (I have tested this and works nicely).