Re: [wake-lock] Anyone implementing "system" lock? (#232)

Workers might be long lived and page might be frozen/thawed in-between as a page cane be back grounded. I see system wake lock as a way to request to finish some work before going to sleep and believe it should have a limit, like rejected (when in battery save mode) or limited to say 5 min.

I can definitely see people do image manipulation or client side image processing, heck, even our reimbursing app will analyse receipts etc (it can of course do that on cloud, but you don't always have good connectivity - if any - when travelling abroad) and my usage pattern is:

* take pic
* turn off screen by clicking power button

If that means that it will start sleeping before it is done, then I just end up loosing the whole receipt which is bad.

It is definitely possible to let it request a system wake lock for a few minutes and if not done then, show an ambient notification (site is keeping the phone from sleeping, [block], [ignore]). I kind of like that way. Android 10 does that with geolocation in the background and offers the following options:

![image](https://user-images.githubusercontent.com/1101339/66391410-4cf1e700-e9cd-11e9-8dda-21bd15cdce4c.png)
 

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

Received on Tuesday, 8 October 2019 11:12:43 UTC