Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 App Screen Sleep/Timeout on iPad

Tags:

html

ios

ipad

We're currently developing an HTML 5 app for the iPad and looking for a method to prevent the screen from going to standby/sleep. I understand this is possible with a native iOS app but what about an HTML5-based web application?

Thank you for any suggestions and answers.

like image 207
crockpotveggies Avatar asked Sep 19 '11 21:09

crockpotveggies


2 Answers

Nope, you can't do this with a plain website/web app.

One option could be to create a native app containing simply a UIWebView. The native app would contain code to load your web app into the webview and disable the idle timer. (It's the idle timer that puts the iPad to sleep.)

like image 89
wpearse Avatar answered Oct 05 '22 23:10

wpearse


Adjusted settings to not let the iPad lock the screen. Fired up a page that uses websockets. In an simple interval I used the socket to send and recieve a message every 60s. Worked for a couple of hours, then I closed it.

I also tried to switch tabs. Worked.

like image 40
Daniel Avatar answered Oct 05 '22 23:10

Daniel