Accommodating different behavioral changes

Since many apps register to receive this broadcast, a single network switch can cause them all to wake up and process the broadcast at once.

Similarly, in previous versions of Android, apps could register to receive implicit broadcasts from other apps, such as Camera.

accommodating different behavioral changes-87accommodating different behavioral changes-38accommodating different behavioral changes-63

Note that activating the screen on or plugging in the device exits Doze and removes these processing restrictions.

The additional behavior does not affect recommendations and best practices in adapting your app to the prior version of Doze introduced in Android 6.0 (API level 23), as discussed in Optimizing for Doze and App Standby.

Android 7.0 brings further enhancements to Doze by applying a subset of CPU and network restrictions while the device is unplugged with the screen turned off, but not necessarily stationary, for example, when a handset is traveling in a user’s pocket. Illustration of how Doze applies a first level of system activity restrictions to improve battery life.

When a device is on battery power, and the screen has been off for a certain time, the device enters Doze and applies the first subset of restrictions: It shuts off app network access, and defers jobs and syncs.

Mobile devices experience frequent connectivity changes, such as when moving between Wi-Fi and mobile data.

Currently, apps can monitor for changes in connectivity by registering a receiver for the implicit broadcast in their manifest.

These changes can affect your app’s access to system resources, along with the way your app interacts with other apps via certain implicit intents.

Introduced in Android 6.0 (API level 23), Doze improves battery life by deferring CPU and network activities when a user leaves a device unplugged, stationary, and with the screen turned off.

If the device is stationary for a certain time after entering Doze, the system applies the rest of the Doze restrictions to alarms, GPS, and Wi-Fi scans.

Tags: , ,