Remove All Ads from XDA
Honor 9 Lite

[APP] Dual Battery Widget v1.1 (2012-06-30) (with source on GitHub)

211 posts
Thanks Meter: 90
By Flexer, Senior Member on 14th June 2011, 11:07 AM
Post Reply Email Thread
Yeah, I know that there are a couple of these apps out there already, but I made this one for a couple reasons:
1) I wanted a resizable widget, that showed the status of both batteries in graphical form
2) I wanted it to be light and non battery-hungry
3) I wanted the widget to be available on the market (vs storing the apk on the sd card, etc)
4) I just wanted to try write a useful widget :P

So here is the Dual Battery Widget!
It'll show two batteries, for the standard and the dock battery. If the device doesn't have the secondary battery (i.e. it's not the transformer) it will just hide the second battery

You can install it from the market here:

I'll try to monitor this thread as much as possible, but if there are any problems with it, you'd best send me an e-mail about it (e-mail is in the market account)

Feedback is always welcome

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)

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 apk file (for those without android market... who knows.. )
Check it out here:

Still working on new proper icons, so for now just made a basic charging "bolt"... Working on some proper, unified design

Check out the latest download on GitHub

2012-06-30: v1.1
  • [+] New and revamped interface for tablets and phones! Proper support for Ice Cream Sandwich
  • [+] Ability to swap the battery icons around
  • [+] Horizontal mode! Display the batteries on top of each other
  • [+] Notification area icon showing the dock battery level (can be turned off in the settings)
  • [+] Google in-app billing for donations
  • [!] Lots of different bugfixes

2011-10-26: v0.8.3
  • [+] Added Chinese Traditional and Simplified, Italian translations
  • [+] Dock status descriptions in feedback message
  • Fix for the recent Aces firmware update. 0% battery dock support
  • Battery chart grid uses much better values
  • [!] Temporary fix for the disappearing battery chart issue
  • [!] Various other bug fixes

2011-10-12: v0.8
  • [!] Sometimes the dock wasn't identified after a long sleep cycle
  • [!] Battery chart will only load the last 7 days of history by default
  • [!] Battery voltage reported incorrectly
  • [+] Added Chinese and German translations
  • [+] Added multiple widget sizes for non HC devices

2011-07-04: v0.7.7
  • [!] Fixed the rare bug with crashing service on early widget update
  • [-] Removed the kernel alert dialog
  • [+] French, Spanish and Japanese translations!
  • [+] Settings window now shows current values in the summary field (atm only for HC devices)
  • [+] Battery info tab now has buttons for battery info and battery summary
  • [+] Added battery status logging, and chart for honeycomb devices

2011-06-26: v0.7.5
  • [!] Fixed the About dialog
  • [+] Saving the last charged timestamp
  • [+] Saving the last known dock battery level
  • [+] Adding margin option for the widget
  • [+] Dock label text can be black
  • [+] Last known dock battery level images (black and white)

2011-06-20: v0.7
  • [!] Battery saving mode was too aggressive... Android killing widget.. Battery status monitor service added
  • [+] Monitoring the last time that the dock was connected (shown in the batt info screen)
  • [+] Displaying an alert if your device doesn't seem to support the dock notifications

2011-06-20: v0.6.6
  • [+] New 10-step icons for the batteries
  • [!] Battery saving mode was too aggressive... now updating batt status after standby

2011-06-19: v0.6
  • [+] Showing battery info / widget properties / other info on widget click
  • [+] Option to select which battery to display (so you can have two widgets, one for each battery)
  • [+] Stack trace catcher (for the error reports)
  • [+] Feedback link (will open the e-mail app, and will contain some details useful for me helping you)
  • [+] About dialog (because I found a bunch of places on the net posting download links to the app, without any credit, or links to the market) grrrr....
  • [!] not recognizing dock on first boot

2011-06-15: v0.5
  • [+] Widget options dialog with text position and text size options
  • [+] Ability to hide secondary battery when it's not connected
  • [+] Battery charging indicator
Attached Thumbnails
Click image for larger version

Name:	device.jpg
Views:	3063
Size:	21.6 KB
ID:	625599   Click image for larger version

Name:	device2.jpg
Views:	2763
Size:	22.9 KB
ID:	625600   Click image for larger version

Name:	device3.jpg
Views:	2932
Size:	24.4 KB
ID:	625601  
The Following 54 Users Say Thank You to Flexer For This Useful Post: [ View ] Gift Flexer Ad-Free
14th June 2011, 11:14 AM |#2  
Thanks Meter: 4
Looks very cool, thanks

One thing: does the widget let you know when the batteries are charging?
14th June 2011, 11:19 AM |#3  
Flexer's Avatar
OP Senior Member
Flag London
Thanks Meter: 90
Donate to Me
Not at the moment, as I just wrote the whole thing yesterday night
I'll come back to it today after work, and will improve the battery icons + add charging status display
The Following User Says Thank You to Flexer For This Useful Post: [ View ] Gift Flexer Ad-Free
14th June 2011, 12:32 PM |#4  
frosty5689's Avatar
Senior Member
Thanks Meter: 128
Looking good. It'd look better if you add a 0.1 black shadow with transparency to both the battery % text and outline of the widget. Oh and the dock battery doesn't hide itself is it not implemented yet? Or is it a bug?

Sent from my Transformer TF101
14th June 2011, 12:36 PM |#5  
Flexer's Avatar
OP Senior Member
Flag London
Thanks Meter: 90
Donate to Me
Thanks for the suggestion about the shadow.. I'll look into it tonight too.
Currently, if you're running the widget on the transformer, it will still show the dock battery, but it will state it as "n/a" (will change that to "Undocked" later). It will hide it completely if you're running it on any other device.
I'll be working on a settings dialog tonight, and you'll be able to choose whether you want to see the "undocked" battery
The Following User Says Thank You to Flexer For This Useful Post: [ View ] Gift Flexer Ad-Free
14th June 2011, 12:51 PM |#6  
skippy68220's Avatar
Senior Member
Thanks Meter: 27
thanks for this widget . Looks good. Resize work , tested on rooted stock 3. 1 Without dock
Great idea to put it on market .

At this time i haven't suggest , fine for me !

Good work for the next .
14th June 2011, 02:04 PM |#7  
Senior Member
Flag Tours
Thanks Meter: 24
I'll try this tonight ! Thanks !
15th June 2011, 02:12 AM |#8  
Flexer's Avatar
OP Senior Member
Flag London
Thanks Meter: 90
Donate to Me
As promised, I just updated the widget with some new functionality and an options dialog.. Check the first post for new features and new screens
The Following 4 Users Say Thank You to Flexer For This Useful Post: [ View ] Gift Flexer Ad-Free
15th June 2011, 02:53 AM |#9  
Thanks Meter: 4
looking good!

The only wee little thing id suggest is making the single battery icon (when no dock is connected) a tiny bit smaller, so its not so near the edge of its area, but thats just me being pedantic!

Either way, its my fav battery widget so far!
15th June 2011, 03:07 AM |#10  
Thanks Meter: 4
Very nice work! Thank you for your efforts. I am looking forward to what you do next...
15th June 2011, 04:15 AM |#11  
Thanks Meter: 15
That's 2 dual battery widgets I've tried now, neither one shows the status of the dock battery This one actually says Not Docked when I am (typing this post from the dock). Not sure if there is something wrong with my dock, or something else. Anything I can try ?
Post Reply Subscribe to Thread

battery, dock, transformer, widget

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes