As of IPhone OS 3.0, MotionX GPS is able to keep recording a GPS track while in sleep mode. After you push the sleep button on top of the phone, the app continues receiving GPS coordinates and recording them. Does anyone know how they're able to do this? I'm only aware of the method to keep running audio while in sleep mode.
+1
A:
[UIApplication sharedApplication].idleTimerDisabled=YES should do it
watcherFR
2009-10-11 20:43:33
THis works to prevent sleep from idleness, but doesn't work if they hit the lock button. MotionX is able to work after hitting the lock button, and it turns the screen off.
smokey_the_bear
2009-10-11 21:08:02
cool, I hadn't noticed. Thanks for the link above !
watcherFR
2009-10-21 13:31:21
+9
A:
I found a great webpage that explains how to do it - http://marcopeluso.com/2009/08/23/how-to-prevent-iphone-from-deep-sleeping/
You have to start a timer that plays a sound every 10 seconds. But the sound can be silent.
smokey_the_bear
2009-10-11 23:11:52
this is an cool trick, it solves a real problem, and it seems to work for me as well. i'm a little surprised that and app that used this technique would get approved for the app store though, this seems like the kind of thing that might get an app rejected.
beno
2009-11-04 16:10:42
A:
I heard that the [UIApplication sharedApplication].idleTimerDisabled=YES
will leave the screen's background light on, (after the user pressed the sleep button,) which will drain the battery.
But I have not tried this myself, so anybody with experiences correct this if it is wrong.
lionfly
2010-09-18 21:51:42