[Windows Mobile Development and Hacking General] thx1200:
FAQ

Question: My battery life seems to be draining faster after installing BattLineSvc. Is BattLineSvc causing this?

Answer: Probably not. The current version of BattLineSvc has no active polling. This means that when there is no battery status change happening, BattLineSvc is 100% idle. In Windows Mobile, applications and services are event based. You can set up a "loop" type of system (loop over and over, constantly checking for something), but that's inefficient. Even in older versions of BattLineSvc that made use of TimerIntervalSeconds to update the battery status, the updates were done a timer. So, you see, when BattLineSvc starts, it sets itself up to listen to system events, then it explicitly goes to sleep and waits until it receives a message. This is all handled in the OS and it's the way efficient apps are written in WM.

Okay, so you are wondering, well maybe a lot of events are firing and it's causing more CPU and therefore more battery drain. BattLineSvc listens for battery events and also power change events (on to idle or idle to on). None of these fire very often, unless there is something wrong with your device or your ROM. :-) Even if they did, it wouldn't matter unless they continued to fire when the device was asleep/idle. In WM, an app must request to stay awake when the device goes idle (users presses power button). BattLineSvc is set up to use unattended mode, which is the mode where WM goes into after you press power-off to turn off the screen, but before it's fully asleep. WM gives all apps requesting unattended mode 15 seconds to complete their task. If they need more time, the app must explicitly ask WM by reseting the idle counter timer. BattLineSvc never resets the idle timer! So unless another app is doing this, the device will fully sleep 15 seconds after you press the power button, which is normal WM operation.

Okay, so that's the long winded explanation. But you want answers! Well, I always would encourage you to A/B the situation by running BattLineSvc for a few days, then uninstall it and try it a few days without. I think this will persuade you in 99% of cases. Please don't post on this thread if you have done less than a week's worth of power testing. There are so many thousands of things that can cause battery drain, you can't tell with only a few hours worth of testing.

One thing that causes power drain, which is the TRUE reason most people think a new app did it, is your cellular radio. Sometimes, for random reasons (atmospheric interference, dead zones, cell tower glitchy/busy), your radio has to work harder to get a signal. In fact, sometimes you may notice your phone is warm while its idle and you know you aren't downloading or anything. That's the radio! I've had a fully charged phone go down while it was in my pocket doing nothing in half a day due to this. The next day, all is well. Zero changes on my part. It just happens. It sucks, but, well, there's nothing you can do short of turning off your cellular radio. :-) Luckily its rare unless you know you are driving out of coverage area or something. Which is why apps are blamed sometimes. You install an app, then the power drains and you logically conclude it was that app. You uninstall it the next day, and all seems well. This is why you need several days of testing - to rule out these random things!

Finally, you must test from a full charge. You can't install BattLineSvc when your device is half full, then see the last half of the battery drain faster than your first half and come to any conclusions. Battery drain is not linear! It's subject to the nuances of the battery. Usually the last half of your battery will drain faster than the first half, but it all depends on the detection algorithm and the battery itself. The only true test is from full charge with exactly the same operating conditions (all other apps the same, usage the same, no background tasks like downloads/refreshes happening any different from the previous charge).

Good luck in finding your power drain and I do want to know if it is BattLineSvc, so please report it if you are having an issue, but don't post anything until you've done a full week of testing with BattLineSvc installed and BattLineSvc uninstalled.