Understanding Power Management with Windows Mobile
I’ve been working with the interns in our Microsoft Innovation Center (Singapore) on some cool Windows Mobile demos. One of the biggies we encounter is how aggressive Windows Mobile manages power. Not a bad thing for end users wanting to use their phone for days w/o charging… bad for proof of concept demos.
Well, turns out writing power efficient code is not hard. You need to first understand how WM PM works.
http://brianpeek.com/blog/archive/2008/07/03/windows-mobile-devices-and-power-states.aspx
A guy named Joel Ivory Johnson even wrote up a few low level tools (exposed as managed code / .NET) to help normal people like us write power efficient code. Check out his articles below:
http://www.codeproject.com/KB/mobile/WiMoPower1.aspx
In the end, the approach we took to best handle power concerns is to schedule our app to do something at certain intervals. When the work is done, the app will shut down completely until the next run. Joel also have something for this via a low level CeRunAppAtTime call. Yes, he even provided a nice .NET managed wrapper.
http://www.codeproject.com/KB/mobile/WiMoAutostart.aspx
I love Windows Mobile as it took us no time what-so-ever to go from concept to proof. Also, the amount of resources (and smart people like Joel) on the web makes proofing concepts super easy.