问题
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