Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

How Doze and App Standby finally fixed Android battery life in Marshmallow

Ryan Whitwam | Feb. 4, 2016
Google followed through on its promise to address battery life in Android 6.0.

Every time Google has announced a new version of Android, we’d get the same old song and dance—this is the time they took battery life seriously. Having been let down so many times, you could be forgiven for some skepticism when Marshmallow was announced, and again, Google said battery life would be improved.

This time they were right. Android 6.0 introduced two features called Doze and App Standby, but the names are sometimes used interchangeably online, and it can be tough to keep the specifics straight. Here’s how Doze and App Standby finally fixed Android’s battery life woes.

Doze

As soon as you upgrade to Marshmallow or get a new device running it, you’ll immediately notice the impact of Doze mode. This feature is active by default, and Google does not allow OEMs to modify the way it works. When you leave your device sitting unplugged with the screen off for about 30 minutes, it shifts into Doze mode to prevent the battery from being drained.

While Doze is active, the apps on your phone will have no network access, the system will ignore “wakelocks” when apps try to keep the device from going to sleep, and no background tasks will be allowed to run. That certainly makes it sound like your phone won’t do you much good, but there are a few ways Doze preserves functionality. While apps can’t wake the device up to run sync jobs and other background tasks, high-priority push messages will still show up. So for example, a Hangouts message will appear on a device that’s in Doze mode.

doze
Sync activity is limited when a device is in Doze mode.

Apps that have been designed well should not suffer any ill effects from Doze mode. The device will periodically wake up from Doze mode for a short time, which allows apps to run tasks they’ve been queueing up with the Android job scheduler. These are called maintenance windows, and they become less frequent the longer a device sits untouched.

That last point is important—Doze only works when your device remains stationary. If you pick it up or wake the screen, Doze mode is deactivated and the timer resets. It won’t ever turn on when the phone is sitting in your pocket, unless you’re sitting remarkably still. Doze simply keeps your phone from burning through the battery while it’s asleep on a desk or table or something.

App Standby

Unlike Doze, you might not notice the impact of App Standby immediately, but over time it can make an even greater impact on your battery life. Whereas Doze is concerned with all the apps on your phone, App Standby only affects the ones you don’t use very often. An app on Android 6.0 defaults to Standby unless one of three things has happened in the last several days—the app has a foreground process active, you explicitly launch the app, or the app produces a notification.

 

1  2  Next Page 

Sign up for CIO Asia eNewsletters.