Re: [wake-lock] What do the wakelocks actually do? (#138)

Android:
https://developer.android.com/training/scheduling/wakelock

>If you need to keep the CPU running in order to complete some work before the device goes to sleep, you can use a PowerManager system service feature called wake locks. Wake locks allow your application to control the power state of the host device.

>Creating and holding wake locks can have a dramatic impact on the host device's battery life. Thus you should use wake locks only when strictly necessary and hold them for as short a time as possible.

https://software.intel.com/en-us/android/articles/wakelocks-for-android

> Android and other mobile OSs have achieved longer battery life by implementing an aggressive power manager. Shortly after using a phone, its display turns off and the CPU goes into a deep power state, thus sipping as little power as possible when not in use. This is how phones, when they are not used, are able to last several days on a single charge. With Android’s power manager, the normal assumption is that when the display is off, so is the CPU.

"screen" wake lock windows:
https://blogs.windows.com/buildingapps/2016/05/24/how-to-prevent-screen-locks-in-your-uwp-apps/
https://docs.microsoft.com/en-us/uwp/api/windows.system.display.displayrequest

Windows extended execution:
https://docs.microsoft.com/en-us/windows/uwp/launch-resume/run-minimized-with-extended-execution

> Use ExtendedExecutionReason.Unspecified when you create an ExtendedExecutionSession to request additional time before your app moves into the background for scenarios such as media processing, project compilation, or keeping a network connection alive. On desktop devices running Windows 10 for desktop editions (Home, Pro, Enterprise, and Education), this is the approach to use if an app needs to avoid being suspended while it is minimized.

> On desktop devices, extended execution sessions created with ExtendedExecutionReason.Unspecified have a battery-aware time limit. If the device is connected to wall power, there is no limit to the length of the extended execution time period. If the device is on battery power, the extended execution time period can run up to ten minutes in the background.

> Specify ExtendedExecutionReason.LocationTracking when you create an ExtendedExecutionSession if your app needs to regularly log the location from the GeoLocator. Apps for fitness tracking and navigation that need to regularly monitor the user's location and should use this reason.

> A location tracking extended execution session can run as long as needed, including while the screen is locked on a mobile device. However, there can only be one such session running per device. 

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/138#issuecomment-478537265 using your GitHub account

Received on Monday, 1 April 2019 11:13:01 UTC