Google: Developers, Stop Draining Android Battery

Google seemingly moved to head off criticism that ads on free apps are draining the batteries on Android devices Monday, with a new guide for developers on how to write battery-friendly code for the mobile operating system.

“This class demonstrates the best practices for scheduling and executing downloads using techniques such as caching, polling, and prefetching,” reads the guide. “You will learn how the power-use profile of the wireless radio can affect your choices on when, what, and how to transfer data in order to minimize impact on battery life.”

The guide includes sections on optimizing downloads for efficient network access, minimizing the effect of regular updates, avoiding redundant downloads, and using connections that are more battery-friendly when they are available.

Researchers at Purdue University and Microsoft released a report (PDF) last week suggesting that up to 75 percent of power use by free apps can be accounted for by advertising content. Google didn’t acknowledge the new class was related to that report, but the timing suggests it may have been written as a response.

The company is pushing the new guide with the Android Developers page on Google+. The guide “explains how the power-use profile of the wireless radio can affect your choices on when, what, and how to transfer data in order to minimize impact on battery life, and demonstrates some best practices to minimize the battery drain associated with downloads and network connections,” they wrote on Monday.

For example, it only takes one app that pings its server every 30 second to keep a handset’s wireless radio on and sucking power all the time.

Commenter Reto Meier pointed out that, if adopted, the guidelines could also have a positive impact for users who aren’t concerned about mobile power consumption.

“It’s worth noting that this isn’t just about battery life,” Meier wrote. “Inefficient use of the wireless radio also uses unnecessary bandwidth on the carrier network, degrading the overall network performance for everyone.”

Google isn’t the only tech company fighting battery controversy this week. After a wave of complaints that Apple’s latest-generation iPad runs too hot, it emerged that the device may suffer from battery problems as well, reporting that it has received a full charge a full hour before it’s topped up.

Image: Universal Pictures
Jon Christian: Jon Christian is a Boston-based reporter and blogger, particularly interested in the intersection of technology, civil rights and culture. At Tech.li, his beat encompasses Google, cloud and ultra-portable computing, haptic/cyberpunk/brain-in-a-tank news, and other cool stuff in the tech world. Tip him off at: Jon.Christian@Tech.li.