How to keep a mobile device from switching off its display when showing a HTML page

╄→гoц情女王★ 提交于 2019-12-11 08:28:51

问题


is it possible to tell a mobile browser, that as long as a certain HTML page is displayed, the device should not turn off its screen?

I want to build something like Project Blinkenlights, but every participant brings his/her own pixel. To set each display to a certain color at a given point in time is managable, just let each one open a website that shows a blank page and changes the background to color the screen. I'd use JavaScript to link the devices and have them log into a control server. But having the pixels wink out because the devices go to sleep would somehow break the concept.

A dedicated app would be overkill, and not every passing onlooker would install an app anyway (at least I wouldn't).

Thanks in advance!


回答1:


I'm pretty sure you can't do that without bundle your webview inside an app. And whatever is the OS. It's all about protecting the user (and his device battery)



来源:https://stackoverflow.com/questions/12108175/how-to-keep-a-mobile-device-from-switching-off-its-display-when-showing-a-html-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!