English | 中文 | Русский | Français
2,856 Posts served
8,606 Conversations started
Bad advice on extending battery life? Via jkOnTheRun
I learned about Friedbeef's tips on extending battery life (for laptops, UMPC and other devices). I think a change of perspective needs to take place—applications need to be more introspective, not users.
My Mac has an "Energy Saver" that allows me to determine when the computer should sleep, when the display should dim/sleep, and when the hard disks should spin down. That's great, but it's rather crude. This information doesn't seep down into the programs running on my computer. It kinda makes sense doesn't it?
For example, tip 3 is "Cut down on programs running in the background". Well, fine, but how about instead of doing this have my programs behave differently whether I have battery power or not? For example, iTunes can tell me "I'm not going to continue displaying this music visualization because it's sucking all the power that you have." Right now, I'm exporting a screencast via Quicktime. It's going to take 10 minutes of heavy CPU. Wouldn't it be nice if, as soon as I unplug the power cord, Quicktime suspends that export, or lowers the process priority?
Or how about Quake 3 automatically lowering the resolution as soon as I unplug? (See Bonus Tip #2). Or better yet, your virus scan (don't have one of those on my Mac ;-)) postponing its daily run until you have battery power?
So what am I advocating? Having a service layer that exposes mobile contextual information (power, connectivity, bandwidth etc.) to all programs, and having them set up as observers to changes in this information. Joe has all the details on how to write such programs using the recently open sourced Mobile Platform SDK.
Why do people continue to write programs that don't make use of this information? Why does my Mail client still try and fetch mail even when I'm disconnected? As more and more of us move away from desktops to mobile devices, this context-awareness makes more and more sense.....

Mike Smith-Lonergan
There is a network connectivity notification that applications can (and do) subscribe (look up SENS); many MS apps are aware and will take conditional action only when network is available.
There is also notification of battery status for which apps can register for status changes, or which they can query at any time. Apps such as Windows Desktop Search take serious advantage of this, and the Task Scheduler subsystem exposes this for any scheduled application (look for the settings "Don't start the task if the computer is running on batteries" and "Stop the task if battery mode begins" on XP, and similar labels in Vista).