I'm writing an app that displays useful location-based information to the user continuously.
At the moment, after a certain interval, the iOS device goes to sleep.
I'd like the iOS device to remain awake while my app is running.
What is the best approach?
The only suggestion I've read so far is to play a sound every few minutes. Perhaps the sound file could contain silence. (As I write this, I'm thinking about the case where a user is playing music in the background. I wouldn't want to impact the music playback. I'll have to test this a bit.)
Are there any other approaches I should consider?
Keeping iOS from going to sleep
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Keeping iOS from going to sleep
Hi Eep,
have a look at
iphoneLockIdleTimer
iphoneUnlockIdleTimer
in the iOS Release Notes (p. 40 in version 5.0.2).
Kind regards
Bernd
have a look at
iphoneLockIdleTimer
iphoneUnlockIdleTimer
in the iOS Release Notes (p. 40 in version 5.0.2).
Kind regards
Bernd
Re: Keeping iOS from going to sleep
I've been working on a similar app that records a GPS path at a user-specified interval. I've had settings/auto-lock set to never, which I assume has the same effect as iPhoneLockIdleTimer. The problem with this is that the battery drains rapidly. A 4S lost 25% of its charge in 1 hour of recording yesterday. Is there a way to dim the screen to conserve power while the app still runs?
27" iMac, OS X 10.13
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9