Quick Links

Android 6.0 Marshmallow added a new feature called "Doze" that aims to dramatically improve your battery life. Android phones and tablets will "sleep" when you leave them alone, conserving battery life for later. Doze is designed to get out of your way and just work, but you can tweak it and make it even better.

What Is Doze?

Android normally allows apps to run in the background, checking for new data, receiving notifications, and generally doing whatever they want. This is fine if you're using your phone, but your phone doesn't constantly need to be waking up if you've set it down on a table and walked away for a few hours.

Doze kicks in when you aren't using your device. When haven't touched your phone in a while, it will go into a deeper sleep mode. (In technical terms, Doze prevents wakelocks from waking your device, keeping it in a lower-power sleep state.) In this state, only high priority notifications, like phone calls and chat messages, will wake the phone. Apps won't be allowed to constantly sync in the background. Instead, Android provides "idle maintenance windows" every once in awhile, where apps can do all their work in one big batch. As time passes without you using your phone, those windows come further and further apart.

This is especially useful for a tablet you might leave on your coffee table, too. Rather than waking up all the time, the tablet will be dozing most of the time, which should stretch its battery life much further.

Here's the small catch: Doze only works when your phone is completely still. If you just leave your phone in your pocket for a few hours, it probably won't doze at all. It uses data from your phone's accelerometer to see if it's moving, which means it really has to be sitting on a table, completely motionless, for Doze to kick in.

Doze Won't Block "High Priority" Notifications

"High priority" notifications will still come through, even when your phone is dozing. Notifications from your cellular provider, like SMS messages and incoming phone calls, will cut right through Doze so you won't miss any messages. The phone will wake for alarms, too, so you won't have to worry about missing those.

Other apps--for example, messaging apps like Google Hangouts, Facebook Messenger, WhatsApp, and similar apps--can mark their notifications as "high priority." High priority notifications will still be delivered to you, so you'll get messages without having to wait for them. Most notifications aren't marked as high priority, and won't get through Doze, so Candy Crush notifications won't wake your phone and drain your battery.

So what's to stop an app developer from abusing this system? High priority notifications have to be delivered through Google Cloud Messaging, which means Google has control over them. If they find that an app's developer is abusing these notifications, Google can cut them off.

A few narrow categories of apps are also allowed to whitelist themselves so they aren't affected by Doze if that severely impedes their functionality. For example, this includes automation apps like Tasker. Google's documentation contains more details.

The average app isn't really impacted by Doze, though. Even if it wants to sync in the background, it'll be able to sync and do that work during those narrow maintenance windows. It'll just sync less often, which is fine if you're not actually using the device.

How to Prevent an App From Dozing

An app that's programmed properly shouldn't have issues when dozing. However, if you want notifications from a certain app the minute they come through--like Gmail--you can give it permission to run while dozing. Bear in mind that this will result in more battery drain.

To find Doze's settings, open the Settings app on your Android device, tap "Battery," tap the menu button, and tap "Battery optimization."

You'll see a list of apps that are not optimized. You'll definitely see Google Play Services here. You may also see some manufacturer-provided system apps that need the ability to run in the background.

Tap the "Not optimized" menu and select "All apps" to see a list of all apps installed on your device.

By default, every app will be optimized, and you'll see the phrase "Optimizing battery use" below it in the list. To prevent an app from dozing, tap it in the list and select "Don't optimize." Android will allow that app to run in the background, even while your device is dozing. You should only do this if an app isn't working properly, or if you really need up-to-the-second notifications for the app in question. Most apps will doze properly, and you shouldn't even notice the difference.

How to Make Doze More Aggressive (and Save More Battery)

Related: How to Optimize Your Android Phone's Battery Life with Greenify

Doze is designed to work entirely in the background, without your involvement. But if you want more control, you can configure it with third-party apps.

The latest versions of Greenify have a new "Aggressive Doze" feature that makes Doze kick in more quickly. Greenify can make doze kick in in just a few minutes after you set your phone down instead of after hours, potentially saving you a lot of power depending on your usage patterns. This feature doesn't require root, so anyone can use it.

To use this, install Greenify, launch it, tap the menu button, and select "Settings." Tap the "Aggressive Doze (experimental)" option and enable it. You can also enable a notification that shows more information about dozing durations here, if you're interested in seeing what's going on under the hood.


You can also tweak Doze in other ways, but they're not so easy to use. For example, there's a Doze Settings Editor app that allows you to tweak various parameters and load profiles, making Doze more or less aggressive. This app requires root to use, but if you don't have root, it will show you adb commands you can use to configure Doze.

Image Credit: TechStage on Flickr