 <h2>UPDATE</h2> <p>When the device is stationary again, with screen off and on battery for a period of time, Doze applies the full CPU and network restrictions on <strong>PowerManager.WakeLock, AlarmManager alarms, and GPS/Wi-Fi scans</strong>.</p> <p>Visit <a href="http://developer.android.com/intl/in/training/monitoring-device-state/doze-standby.html#whitelisting-cases" rel="nofollow">Use Cases for Whitelisting</a> for more detail.</p> <blockquote> <p>The table below highlights the acceptable use cases for requesting or being on the Battery Optimizations exceptions whitelist. In general, your app should not be on the whitelist unless Doze or App Standby break the core function of the app or there is a technical reason why your app cannot use GCM high-priority messages.</p> </blockquote> <p><a href="http://developer.android.com/intl/in/preview/api-overview.html#doze_on_the_go" rel="nofollow">android n developer</a> says</p> <p>Doze is particularly likely to affect activities that AlarmManager <strong>alarms</strong> and <strong>timers manage</strong>, because alarms in <strong>Android 5.1 (API level 22) or lower do not fire when the system is in Doze</strong>.</p> <p>Android 6.0 (API level 23) introduces two new AlarmManager methods: <code>setAndAllowWhileIdle()</code> and <code>setExactAndAllowWhileIdle()</code>. With these methods, you can set alarms that will fire even if the device is in Doze.</p> <p><strong>Note</strong>: Neither <code>setAndAllowWhileIdle()</code> nor <code>setExactAndAllowWhileIdle()</code> can fire alarms more than once per 15 minutes per app.</p> <p><a href="http://developer.android.com/intl/in/training/monitoring-device-state/doze-standby.html#testing_doze_and_app_standby" rel="nofollow">Testing with Doze and App Standby</a> </p>