Sunday, October 16, 2011

Badass Battery Monitor - Monitoring Your Android Battery

I've always been intrigued with device monitoring, so when I got my Android phone, I really wanted to know more details as to it's power usage.    There are an amazing amount of battery monitoring apps out there - most of them are pretty terrible, but there are a few really good ones.  Unfortunately, even the good ones don't do everything I really wanted.  With that in mind, and as a way to learn how to write a basic Android application, I decided to create my own.

You can now download Badass Battery Monitor for free in the Android Market. https://market.android.com/details?id=com.gsamlabs.bbm

There are no ads - it uses Internet Access for graphing, but otherwise requires no special permissions.

What makes Badass Battery Monitor different?

  1. Percent and time estimate quick view: A way to always see how much battery is left, and easily see estimates of remaining time.  Other apps have this - but non all in one place.  This was the key item that I always want to see, and I don't want to open an app just to see it.
  2.  Custom power profiles:  All battery utilization is dependent upon your device manufacturer providing appropriate Power Usage values for different types of functions.  For example, an active call will take X amount of power / second.  Unfortunately, my phone manufacturer did a really bad job of this - and so all monitor programs that are based off of this information show bad results.  With this app, you can customize the power profile used - it even has some canned ones from other devices.  Configuring these to find the best settings will require some work - but hopefully your device does a better job than mine (thanks LG).
  3. Find out what is draining your battery:  In Android 2.2 and earlier there was a built in BatteryStats program (it was hidden) from which you could find all sorts of useful information such as who was holding WakeLocks, etc.  They removed this in 2.3 (some Mods still include it - Cyanogenmod for example).  So I built this function into the app.  There is another app out there (Better Battery Stats) that does this as well - and does a good job of it.
  4. Low battery usage:  A number of the more full featured apps tend to consume a lot of battery by doing regular polling - even when the device is in deep sleep.  I made sure this app only consumes resources when the device sends an alert for battery state changes, or when you're actively interacting with it.  Some phones seem to publish a new alert for every % drop in battery, while others will wait to send the alert until the device is woken up for some other reason (the latter seems much better), but in either case, this app should have minimal to no effect on your battery.


Other good battery monitors:
  1. Battery Monitor Widget:  This app includes an ton of detail, and nice history graphs.  It's way way way to busy for my liking though.  It's missing some of the features above (actually all of them), but it does have other features that Badass Battery Monitor doesn't have.
  2. Better Battery Stats:  Great little app intended to replace the Battery History built in app removed in Gingerbread.  There is a great tutorial included as to how to determine what is draining your battery.  Badass Battery Monitor has all of these functions as of this writing, but data is presented in a different way.
  3. ????:  I'm sure there are others...