Android N pair Doze (NAP) mode optimization

Source: Internet
Author: User

To extend the battery life of the device, reduce memory usage, and improve application performance, Android N has made some changes to the system behavior. These changes may affect the availability of system resources and system notifications to the app. You should review these changes carefully and assess what adjustments your app may need to make to accommodate these changes.


nap

        android 6.0 (API level 23) introduced snooze mode, When a user device is unplugged, in a stationary state, and the screen is turned off, the mode delays CPU and network activity, thereby prolonging battery life. Android N further enhances snooze mode by applying part of the CPU and network restrictions when the device is unplugged and the screen is off, but not necessarily at rest (for example, when a user is out of the hand-held device in his pocket).


Figure 1.   snooze mode how to apply the first-level system activity limit to extend the battery life of the illustration.

         when the device is charging and the screen is off for a certain amount of time, The device goes into snooze mode and applies the first part of the limit: Turn off app network access, postpone jobs, and sync. If the device is stationary for a certain amount of time after entering snooze mode, the system will apply the rest of the snooze restrictions to  powermanager.wakelock, alarmmanager  alarms, GPS, and Wi-Fi scanning. The system wakes up the device to provide a short maintenance window, whether the app part or the full snooze limit, during which the application can access the network and perform any deferred jobs/synchronizations.


Figure 2.   How nap mode applies a diagram of the second-level system activity limit after the device has reached a standstill for a certain amount of time.

Note that when you activate the screen or plug-in the device, the system exits NAP mode and cancels these processing restrictions.


You are welcome to pay attention to us.

Although we are now "cat", but we are in the heart of "become Tiger" goal of the cute meow! is also to the word of mouth of the Meow star!

How to follow:

(1) Open the Mobile client, through the "add friends → find the public number → search ' yards of farmers to move bricks."

(2) discover → sweep sweep → scan qr code, can follow " yard farmer Move Brick " Party Public accounts.

Android N pair Doze (NAP) mode optimization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.