Introduction
Before Doze, your Android phone was never really asleep. Even with the screen off, apps were syncing, waking the CPU, pinging servers, updating location. An Android phone left idle overnight might lose 8–15% of its battery — to nothing. Background processes were burning through your battery while you slept, and there was nothing you could do about it.
Doze changed that. Introduced in Android 6.0 Marshmallow (2015), Doze was Android’s aggressive standby battery optimization. Google claimed it doubled standby battery life. Independent testing broadly confirmed it. And the way Doze works — by restricting network access, deferring jobs, and consolidating wake windows — became the model for every mobile OS’s power management.
How Doze Works
Doze activates when three conditions are met simultaneously:
- Device is unplugged (not charging)
- Screen is off
- Device is stationary (not moving, as detected by the accelerometer)
Once activated, Doze enters a cycle:
Idle state (~1 hour): The device enters deep sleep. Network access is disabled. Wakelocks are ignored. Jobs, syncs, and alarms are deferred. The only things that can wake the device are high-priority Firebase Cloud Messaging (FCM) pushes and alarms set with setAndAllowWhileIdle().
Maintenance window (~1–2 minutes): The device briefly wakes up. Deferred jobs run. Pending syncs execute. Network access is restored. Apps get a brief window to do background work.
Then it’s back to idle. The cycle repeats, with idle periods getting longer each time the device remains stationary. After several hours, maintenance windows might be hours apart.
Doze on the Go (Android 7.0 Nougat, 2016)
The original Doze only activated when the device was completely stationary — sitting on a table or nightstand. In a pocket or bag, the accelerometer detected movement and Doze never engaged.
Android 7.0 Nougat introduced “light Doze” — a less restrictive mode that activated even when the device was moving. Light Doze:
- Activated after a shorter idle period (minutes, not hours)
- Didn’t restrict network access as aggressively
- Allowed more frequent maintenance windows
This meant Doze improved battery life during the day — in your pocket, on your commute, at your desk — not just overnight.
App Standby
Alongside Doze, Marshmallow introduced App Standby — a per-app idle state. If the user hadn’t interacted with an app in days, and the app hadn’t generated any notifications, it entered App Standby. Network access and background processing were restricted.
App Standby was separate from Doze but complementary. Doze managed device-wide idle state. App Standby managed per-app idle state. Together, they covered both dimensions of battery optimization.
The Developer Impact
Doze was controversial among developers. Apps that relied on background processing — messaging apps, VoIP, fitness trackers, sync services — could experience delayed notifications and missed updates.
Google provided escape hatches:
- FCM high-priority messages: Messages marked high-priority bypassed Doze restrictions.
setAndAllowWhileIdle(): Alarms that fired even during Doze (with strict limits).- Battery optimization whitelist: Users could exempt specific apps from Doze. Apps could request exemption.
Most developers adapted. The ones that didn’t — apps using polling or non-standard push mechanisms — saw their background functionality break.
The Results
Google claimed Doze doubled standby battery life. Testing supported this:
- Nexus 5 (Marshmallow): 3–5% overnight drain vs. 8–12% on Lollipop
- Nexus 6P (Marshmallow): 2–4% overnight drain
The improvement was real and noticeable. For the first time, Android’s standby battery was competitive with iOS.
Doze’s Evolution
Doze has been refined through every Android release since Marshmallow:
- Nougat (7.0): Light Doze for moving devices
- Oreo (8.0): Background execution limits — apps can’t start services in the background, further reducing Doze-bypassing behavior
- Pie (9.0): Adaptive Battery — ML-driven prediction of which apps will be used, restricting background access for rarely-used apps
- Android 10–15: Continued refinements to power management, background restrictions, and ML-driven optimization
Doze set the direction: aggressive background restriction as the primary battery optimization strategy. Every mobile OS now follows this pattern.
References
- “Android 6.0 Marshmallow: Doze and App Standby” (Android Developers Blog, 2015)
- “Android 7.0 Nougat: Doze on the Go” (Android Developers Blog, 2016)
- Doze and App Standby technical documentation (developer.android.com)
- Google internal battery life testing methodology