Google I/O 2009の初日(5/27)に、「Coding for Life -- Battery Life, That Is」というセッションがありました。
- Coding for Life -- Battery Life, That Is
Jeffrey Sharkey
The three most important considerations for mobile applications are, in order: battery life, battery life, and battery life. After all, if the battery is dead, no one can use your application. In this session, Android engineer Jeffrey Sharkey will reveal the myriad ways -- many unexpected -- that your application can guzzle power and irritate users. You'll learn about how networking affects battery life, the right and wrong ways to use Android-specific features such as wake locks, why you can't assume that it's okay to trade memory for time, and more.
Jeffrey Sharkey先生は、調べてみると、現在は、Googleのエンジニアだそうで、Core Android Applicationの仕事をしているとか。
Googleに入る前は、(第1回目の)Android Developer Challenge(ADC)のトップ10に入ったそうで、
Android、Linux、オープンソースをハッキングして楽しんでいたそうです(うーん、ADC2をきっかけに、後を追いたいですね)。
さて、本第ですが、セッションのレポート記事は、英語ですが、下記にあります。
http://blogs.zdnet.com/Burnette/?p=1131
記事の内容としては、「バッテリーを長持ちさせる行儀のいいアプリ(サービス)」としてふるまうためのTipsが書かれています。
今度購入するHT-03A(HTC Magic)も、現在使っているADP1(HTC Dream)に対して
200mAhしかバッテリー容量が増えていないようなので、今から勉強しておこうと思います。
私自身、バッテリーを長持ちさせるためのオレオレアプリとして、位置情報や簡単操作で、
壁紙を真っ黒にして、明るさも暗くして、各種センサやWi-Fiなど、とにかく停止できるものは停止して・・・と考えていたのですが、
記事によると、LCDバックライトは、最も暗くして70mA、最も明るくして110mA、
出荷時のデフォルトは90mAだそうで、あんまりかわらないとか。。。
最後に、Android1.5では、以下のメソッドが追加されているそうなので、これらのリファレンスもあわせて読んでおきたいです。
- android.netパッケージ-ConnectivityManager.getBackgroundDataSetting()
- android.appパッケージ-AlarmManager.setInexactRepeating()
