Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,743,029 Members 42,412 Now Online
XDA Developers Android and Mobile Development Forum

[new release] One more taskbar battery meter

Tip us?
 
levenum
Old
(Last edited by levenum; 23rd August 2009 at 09:52 PM.) Reason: Added source code
#1  
levenum's Avatar
Retired Moderator - OP
Thanks Meter 17
Posts: 1,548
Join Date: Jul 2005
Default [new release] One more taskbar battery meter

Hello.

I recently decided that the i-mate tray battery meter was not good enough for my needs and wanted to find a better one. After a few hours of looking and not finding one that was perfect for me I wondered: how hard is it to write one?
Well, apparently its very easy.

I decided to share the result with the community. There are much better ones out there, but perhaps someone will find this one suitable as well.

Whats so special about it?
Its tiny! Only 8.5k. Downside of this - it doesn't have any options, nor do I intend to add any in the future to keep current size. Also it receives notifications on battery as they come in, so its very accurate without having to constantly check the battery and generate unnecessary CPU load.

It takes its behavior from the device driver which is why it will act differently on different devices when battery is charging. (Some devices report battery full, others report accurate percentage, yet others "slide" it in a loop).

Name:  priview.bmp
Views: 21524
Size:  18.3 KB

Also it starts just after MS logo (as you can see from the screen shot I have that space occupied) and doesn't fill the whole screen (14 pixels are left so the units could be evenly sized).

Well here it is, enjoy LvmTopBat.cab

For those who wish to learn how this program works, or to create another using it as a base, here is the entire project:
LVMTopBat.zip
The project compiles under eVC 4 with Windows Mobile 2003 SDK.
This program is now released under GNU/GPL v3.0
(See License.txt for more info)

Hope you will find it useful.
HP iPaq rz1710
ROM 1.00.05 ENG from 22/6/2004

i-mate Jamin (Prophet G3)
WM6 - PDAViet 4.0.0.0.6 Touch


My apps:
LVMTime | LVMTopBat | RegDisplay

The Following User Says Thank You to levenum For This Useful Post: [ Click to Expand ]
 
JNGold
Old
#2  
JNGold's Avatar
Senior Member
Thanks Meter 1
Posts: 455
Join Date: Oct 2005
Levenum,

Great little app. I wonder how it differs from the Sbp meter used in PocketPlus.
 
malatesta
Old
#3  
malatesta's Avatar
Senior Member
Thanks Meter 0
Posts: 204
Join Date: May 2006
Location: NY
I like it!

Yeah, don't add any options to it, I like the idea of an 8.5k program. That was my problem with Batti, it just grew and grew and I don't care about that info.

thanks!
"The past is never quite how you remember, the future's promise may not be fulfilled. Live for the present. The ruins fall around us as we speak."

 
Marx2
Old
#4  
Senior Member
Thanks Meter 5
Posts: 325
Join Date: May 2006
Location: Gliwice
look nice, i will try it
 
Tyr
Old
#5  
Tyr's Avatar
Senior Member
Thanks Meter 1
Posts: 139
Join Date: Aug 2006
Does it change colour? If not could you make a gradiated texture?

1-10% Red
11-30% Yellow
31-100% Green
Current:
1 x HTC Desire | CM007 JB 4.2.2 A2Ext+ | S-OFF | HBoot: Stock | Radio: 32.56.00.32U_5.17.05.23

Retired:
1 x Raphael (Europe) (RETIRED) WM6.5 Energy 3.0 Photon ROM | Manila 2.1 VGA Final
1 x Typhoon (RETIRED) Aleut WM6.5 V1.0 ROM | Titanium
3 x Wizzard 200 (G4) (DEAD) XDA Mobile 6.1 Pro V5 Final ROM
2 x Alpine (RETIRED) Not Upgradable
 
malatesta
Old
#6  
malatesta's Avatar
Senior Member
Thanks Meter 0
Posts: 204
Join Date: May 2006
Location: NY
levenum and others,

FYI, I decided 8.5 kb was just too big :lol: (I'm toally kidding) so just to let you guys know, you can UPX the file down to 6.5kb with no issues. :wink:
"The past is never quite how you remember, the future's promise may not be fulfilled. Live for the present. The ruins fall around us as we speak."

 
levenum
Old
#7  
levenum's Avatar
Retired Moderator - OP
Thanks Meter 17
Posts: 1,548
Join Date: Jul 2005
Quote:
Originally Posted by JNGold
I wonder how it differs from the SPB meter used in PocketPlus.
Never tried SPB PocketPlus so not sure. Maybe just the fact that it's not full screen.

Quote:
Originally Posted by Tyr
Does it change colour?
Actually, it does but only according to what the device reports. I found that on my Jamin for example, it reports 'low' (yellow) at 10% and 'critical' (red) at 5%.
It goes blue when charging, and I would really like to know if anyone got purple. According to MSDN documentation, there can be an 'undetermined' state reported by the system, but I doubt it can be encountered while device actually functions.

malatesta:Nice 8)
HP iPaq rz1710
ROM 1.00.05 ENG from 22/6/2004

i-mate Jamin (Prophet G3)
WM6 - PDAViet 4.0.0.0.6 Touch


My apps:
LVMTime | LVMTopBat | RegDisplay

 
Lurker0
Old
#8  
Senior Member
Thanks Meter 0
Posts: 221
Join Date: Sep 2006
Location: Moscow
When I resume TyTN from the power saving mode, the indicator becomes purple for a second. So I can confirm that it works

It is better than SPB Pocket indicator because SPB is always grey, does not indicate charging, and its segments are of fixed length in both portrait and landscape and therefore have no a real relationship to the charge level.

It is better than IndiLite because it loads from the Startup folder (IndiLite from registry) and does not affect SafeMode of SPB.

Also it does only battery indication and this is good as well - there are too many apps and plug-ins that duplicate each other but not fully. For instance, before I used IndiLite only for the battery indicator, and SPB Pocket for task management.
HTC TyTN Russian
OS: 5.1.195 Build 14955.2.3.0
ROM: 1.18.261.1 07/22/06
Radio: 1.16.00.00
Protocol: 32.40.7010.07H
ExtROM: 1.18.261.102
 
raymonds
Old
#9  
Senior Member
Thanks Meter 1
Posts: 441
Join Date: Jul 2006
is there a way to deactivate the spb pocket plus taskbar battery indicator (without removing spb pp), and have it replaced with this one?
HTC TYTN II
ROM: Bare WM 6.5 Cooked ROMs with unnecessary items removed ~ Witschey (Build 23071)
 
levenum
Old
#10  
levenum's Avatar
Retired Moderator - OP
Thanks Meter 17
Posts: 1,548
Join Date: Jul 2005
Lurker0: Thanks for the test and the compliments.

Quote:
Also it does only battery indication and this is good as well - there are too many apps and plug-ins that duplicate each other but not fully.
This is exactly why I wrote it - small and to the point. No sharing small (yet precious) today space with memory indicators or other stuff.
HP iPaq rz1710
ROM 1.00.05 ENG from 22/6/2004

i-mate Jamin (Prophet G3)
WM6 - PDAViet 4.0.0.0.6 Touch


My apps:
LVMTime | LVMTopBat | RegDisplay


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Slide Dial Replacement Dialer Lets You Make Calls from Anywhere

If you frequently make phone calls, your dialer (aka phone app)is one of the … more

Navigate with Your Samsung Gear 2 Using DMA Navi Watch

Whether you’re travelling to a new destination or exploring some previously … more

Xperia Z1 Stereo Speaker Mod, Cell Phone Unlocking Legal Again! – XDA Developer TV

Cell Phone Unlocking is legal again!! That and much … more