Handling standby on iPad using Javascript -
regarding ipad events, how determine if/when ipad changing awake state standby state? what put mobile-safari web app in locked state whenever ipad becomes inactive/standby , ask pin when becomes awake again. i agree there ought signal can hook on to know when application goes sleep , when wakes up, should able figure out when safari wakes indirectly. when webview goes background, safari puts in sleep. pauses video, defers network request, stops updating ui , pauses setinterval/settimeout operations. js never aware (as far can tell) how these things happened, can tell has happened. simplest way use build regularly invoked method , check see if it's been unexpectedly long time since last update. if expect update every 10 seconds , it's been 5 minutes, can sure device has woken up. here's quick example thought up: var inttime = new date().gettime(); var gettime = function() { var intnow = new date().gettime(); if (intnow - inttime ...