Stats

255 Contributors: 7 Thursday, August 3, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Doze Mode

Remarks

Doze Mode is a set of changes and rules that put your phone to sleep when idle.

On Android 6.0 Marshmallow: Doze mode gets activated after a while the screen is off, the device is stationary and it's running on battery. Doze Mode on Marshmallow As you can see in the diagram above, when Doze Mode gets activated, the device doesn't get any wakelocks, network access, jobs/syncs, Alarms, GPS/Wi-fi scans.

On Android 7.0 Nougat: Imagine if your phone is on your pocket (the screen is off, it's running on battery, but it's not stationary) you might want to get the Doze Mode features as well, right? So that's why Google announced the Extended Doze Mode: It runs when the screen is off, but not stationary. Doze Mode on Nougat As you can see in this diagram, only Network Access and jobs/syncs are disabled. Note that the Extended Doze doesn't replace the first Doze Mode. They work together, depending on the phone state (stationary or not). Here are the distinctions: Doze Mode distinctions Developers should be aware that:

  • Doze might keep temporary wakelock and network access for High-priority GCM (Google Cloud Messaging) messages (for cases wwhere the user needs an immediate notification);
  • Foreground services (such as a music playback) will continue to work.

You can find more information here: https://developer.android.com/training/monitoring-device-state/doze-standby.html

Related Examples