The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.

Issues with Battery Life

Most Android devices are powered by batteries — Android TV is the biggest class of device that is not. Batteries are wonderful gizmos with one major problem: they are always running out of power.

Hence, users are very sensitive to battery consumption. Their ability to use their phones as actual phones, let alone for Android apps, depends on having enough battery power. The more apps drain the battery, the more frequently the user has to find a way to recharge the phone, and the more frequently the user fails and their phone shuts down.

The catch is that you may not notice the battery issues in your day-to-day development. The Android emulator’s emulated battery does not drain based on you running your app. Your devices are often connected to your development machine via USB for testing and debugging, meaning they are perpetually being charged. Unless you are a regular user of your own app, you might not notice any increased power drain.

This part of the book is focused on helping you understand what is draining power and what you can do to be kinder and gentler on your users’ batteries.


Understanding this chapter requires that you have read the core chapters and understand how Android apps are set up and operate.

You’re Getting Blamed

The preview of this section was fed to a gremlin, after midnight.

Not All Batteries Are Created Equal

The preview of this section was whisked away by a shark-infested tornado.

Stretching Out the Last mWh

The preview of this section was lost due to a rupture in the space-time continuum.