Description:
BattLineSvc is simple Windows Mobile service that adds a horizontal bar along the top of the screen to show your current battery level.
You've seen these before -- the little green line at the top of the screen that indicates the current battery level. This app is really nothing new or revolutionary. The main difference of BattLineSvc is that it's a true Windows Mobile service, so it does NOT use one of the precious few 32 slots available for processes. You can find more information about services here.
This app has been tested on Windows Mobile 5, 6, 6.1, and 6.5, but NOT 6.5.3. (Can somebody test for me?)
There's no configuration app yet, so I hope you like editing the registry if you don't like the default settings.
Current features:
- Shows a nice bar along the top of your screen to indicate battery status.
- Color changes based on 'warning' and 'critical' battery levels (configurable).
- Immediately correctly resizes when the screen orientiation changes.
- The battery level is updated at 20 second intervals and also when the device is awakes from sleep.
- Can show a bar at the bottom of the battery bar (if you want it).
- Can be offset from the left, if you have a fancy Windows Logo icon.
- Height of the bar can be changed.
- VERY low resources used -- runs as a TRUE service and uses as close as 0% CPU as is possible by an app like this. So it's good for even older snail devices.
- AppToDate support!
Registry:
Look in HKCU\Software\Avian Waves\BattLineSvc.
Colors are best edited as hex, using the following pattern: BBGGRR (seems backwards, but it's due to the endedness of DWORDS in CE). Your registry editor may not show leading zeros either, keep that in mind.
- TaskbarClass = (string) Don't change this unless you are 100% positive the taskbar is not named the standar.
- Height = (int) Number of pixels tall for the battery line.
- LeftOffset = (int) Number of pixels from the left edge that the battery line starts.
- LowPercent = (int 0-100) What percentage of battery charged is considered low (yellow).
- CriticalPercent = (int 0-100) What percentage of battery charged is considered critical (red).
- ShowLeftLine = (bool) Show the vertical line on the left side of the title bar where the BattLine starts.
- ShowRightLine = (bool) Show the vertical line on the left side of the title bar where the BattLine starts.
- ShowBottomLine = (bool) Show a line on the bottom of the battery bar.
- ColorForegroundSolidNormal = (color) For 'normal' (not low) battery charge, this is the foreground color, default is bright green.
- ColorBackgroundSolidNormal = (color) For 'normal' (not low) battery charge, this is the background color, default is dark green.
- ColorForegroundSolidLow = (color) For low battery charge, this is the foreground color, default is bright yellow.
- ColorBackgroundSolidLow = (color) For low battery charge, this is the background color, default is dark yellow / brown.
- ColorForegroundSolidCritical = (color) For critical battery charge, this is the foreground color, default is red.
- ColorBackgroundSolidCritical = (color) For critical battery charge, this is the background color, default is dark red.
- ColorForegroundSolidCharging = (color) For when the device is charging (on AC), this is the foreground color, default is light gray-blue.
- ColorBackgroundSolidCharing = (color) For when the device is charging (on AC), this is the background color, default is dark gray-blue.
- ColorLeftLine = (color) Color of the left line.
- ColorRightLine = (color) Color of the right line.
- ColorBottomLine = (color) Color of the bottom line.
- TimerIntervalSeconds = (int) How often do we look to see if the battery level has changed (in seconds)? NOTE: As of V2, set this value to 0 unless BattLineSvc is not updating on your device. Zero means disabled. This is not necessary as BattLineSvc now waits for battery notification events, instead of updating on a timer.
Notes:
The service will not start until the system has been up for 90 seconds, so you may notice a delay after soft resetting before the bar appears. It does this completely automatically. This is necessary because I ran into a lot of conflicts when subclassing the title bar if I did it too early. Other apps that subclass the title bar don't seem to like not being first. In particular, the HTC Notification Enhancement.
If you like this project, please consider donate to the developer.
Update Description:
v2.1 (08-03-2010):
- Fixed a bug where on system start-up, it would pop up a notification box to let you know the service started. Annoying! And fixed!
- Fixed the styles in the notification boxes for start/stop service.
v2.0 (07-03-2010):
- Fixed bug where sometimes the line would not show up, even with the 90 second boot-up delay. This was due to the window being created too early (not actually delayed0, even though the subclassing was properly delayed. Oops!
- Boot delay was reduced to 30 seconds from system start-up; so far no issues with it starting too early!
- Added a "right side offset" which works as the left side offset, but for the right side.
- Added a "right line" which works the same as the left line.
- Added a new color setting for when the battery is charging. (Default is a light gray-blue.)
- Battery status, by default, no longer refreshes on an interval, but instead by waiting for battery notification events. This makes BattLineSvc even more efficient! The interval timer is still there in case your device does not work with events only.
- Reduced the number of subsequent refreshes by requesting a synchronous status refresh; previously it would wait asynchronously which was less efficient since the update could take anywhere from a few milliseconds to several seconds.
- Removed a redundant battery status checking method which monitored the registry (no longer needed because the new power event-based system works better and is more efficient).
- Removed a few other old segments of code that were inefficient.
- Added user notification for starting/stopping the service with the start/stop apps.
- Added a configuration program (yay). Requires .Net CF 3.5. You can still edit the registry manually.