Sunday, 26 June 2011

Dual Battery Widget for Android

This is one of my first projects for Android, and the first one that was released in the wild.

A Battery Widget that displays the status for the internal battery, and the secondary battery in your dock station. It is mostly intended for the Asus Eee Pad Transformer tablet (a device that actually has a second battery).

The widget is resizable, and can be as little as 1 cell on your screen, or fill your whole home screen! Advanced options allow you to change the size and the position of the status text, and hide the second battery gauge when it is disconnected. On devices without the dock the widget will only show the main battery icon.

The widget is mainly distributed on the Android Market, but you can also download the compiled binary from here, at the bottom of this post.

Also, I've opened up a project on GitHub with the full sources for the project.. Hopefully this will be useful to the community. It'll also have download links to the compiled app

Note: On the current release of Honeycomb, it is possible that the widget will not immediately appear in the widget list after installation. To refresh the widget list, you should either restart your device, or restart the launcher app (Settings -> Applications -> Manage applications -> All -> Launcher -> Force stop)

Note: If you use a custom rom, there is a high chance that this widget will not be able to identify the dock status, or even register that your device supports it at all.. This is a restriction of most custom kernels at this moment, not of this application. This is because Asus extended their Android kernel build to send extra information about the dock and the dock battery along with battery status notifications. Unless this change has been merged in the custom kernel, it will not be sending these notifications.

Update: It seems that Asus recently released the sources of their kernel, and since then support for the dock battery notification has appeared in at least a couple of kernels.

If you have a device that has access to a secondary battery, but this widget does not identify it, drop me an e-mail with the device model, so that I can add support for it.