Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to keep screen awake in a progressive-web-app?

I plan to make a progressive web app to display the time remaining in a meeting. I need this to keep the display always on. Is there any way for a progressive web app to avoid screen to go to sleep and blank ?

like image 269
malko Avatar asked May 25 '17 20:05

malko


People also ask

Can PWA have widgets?

Unfortunately you cannot create Android Widgets using a PWA today, you'll have to go with pure a Android implementation today.


1 Answers

Update July 2020: Chrome 84 now ships with the Wake Lock API https://www.chromestatus.com/feature/4636879949398016 which can be used to prevent the screen from turning off.


You could use the Standby API however support is still limited.

Then there are hacks such as playing a video infinitely or the nosleep script, however from my experience they don't work consistently either.

like image 51
Kevin Farrugia Avatar answered Sep 28 '22 10:09

Kevin Farrugia