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 ?
Unfortunately you cannot create Android Widgets using a PWA today, you'll have to go with pure a Android implementation today.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With