Doze is a new power saving mode introduced in Android 6.0 Marshmallow that will save your battery when you are not using your phone. It recognizes when the device is idle and does not require a connection or screen on, such as WiFi and Bluetooth, for example.
The Doze feature detects this by looking at how often the phone has been powered on over time and where it was last positioned with sensors to determine if it was moving or stationary.
If the phone has been stationary, then doze will kick in after about 30 minutes of being idle which will limit data syncing from apps like email notifications so that they don’t drain your battery while you sleep, but still allow alarms to go off during this period of time. This also extends to apps that don’t use the internet such as photos.
The Doze mode will not kick in if your device has been powered on but is being used for something other than an idle activity, like listening to music or watching a video, then it won’t take effect until you have been using the phone for about two hours without touching any of its features.
Doze also includes a number of animations within Android which are all designed with battery saving in mind; these animations include sliding down notifications panel, opening quick settings when pulled down from top right corner.