Important Points of Doze mode

kushaal singla
1 min readNov 28, 2018

--

What is Doze mode?

Doze mode is a feature in Marshmallow, which prevents certain tasks from running if your device is in idle state. Doze in devices reduces power consumption by deferring background CPU and Network activity for applications.

What is Maintenance Window?

Periodically, the system exits Doze for a brief time to let apps complete their deferred activities. This time is called Maintenance Window.

During this maintenance window, the system runs all pending syncs, jobs, and alarms, and lets apps access the network.

At the conclusion of each maintenance window, the system again enters Doze, suspending network access and deferring jobs, syncs, and alarms. Over time, the system schedules maintenance windows less and less frequently, helping to reduce battery consumption in cases of longer-term inactivity when the device is not connected to a charger.

Doze restrictions

How to do network call in Doze mode?

Note: Neither setAndAllowWhileIdle() nor setExactAndAllowWhileIdle() can fire alarms more than once per 9 minutes, per app.

App Standby

If the device is idle for long periods of time, the system allows idle apps network access around once a day.

--

--