-
08-08-2008, 02:34 PM #1
Preventing Auto-Lock without user interaction?
I'm looking for a way to prevent the phone from auto-locking. As is, it requires user interaction to avoid auto-locking. Instead, I'd like the phone/screen to just stay on without user interaction.
I notice that playing movies will prevent auto-lock and thought about hacking something in, but I'd like to avoid ugly hacks.
(Copied from below)
For example: can I throw simulated touch events to the system to make the phone think someone touched the screen? Or disable the auto-locking through a system preference API?
Any ideas?
Thanks!Last edited by sinr; 08-08-2008 at 03:38 PM.
-
08-08-2008, 02:37 PM #2Livin the iPhone Life
- Join Date
- Oct 2007
- Location
- Scotchland
- Posts
- 2,145
- Thanks
- 8
- Thanked 204 Times in 184 Posts
Uhhh, set auto-lock to 'never'?
To live, you have to lie
-
08-08-2008, 02:49 PM #3Livin the iPhone Life
- Join Date
- Aug 2007
- Location
- Toronto, Canada
- Posts
- 3,308
- Thanks
- 12
- Thanked 562 Times in 483 Posts
What he said
Get "iPod & iTunes for Dummies", it'll change your life.
-
08-08-2008, 02:55 PM #4
yeah, what they said
-
08-08-2008, 03:15 PM #5Moderator Admin
- Join Date
- Sep 2007
- Location
- Outside Chicago IL
- Posts
- 16,762
- Thanks
- 480
- Thanked 1,599 Times in 1,117 Posts
Thread moved

-
08-08-2008, 03:18 PM #6
Crap, I wasn't specific enough :-( Sorry everyone.
I meant how to prevent the phone from auto-locking programmatically (via the toolchain or SDK). For example: can I throw simulated touch events to the system to make the phone think someone touched the screen? Or disable the auto-locking through a system preference API?
Can this be moved back to the iPhone/iPod Development forum?
Thanks!
-
08-08-2008, 03:32 PM #7Moderator Admin
- Join Date
- Sep 2007
- Location
- Outside Chicago IL
- Posts
- 16,762
- Thanks
- 480
- Thanked 1,599 Times in 1,117 Posts
Moved back

-
08-14-2008, 08:39 PM #8Green Apple
- Join Date
- Jun 2008
- Location
- Depends on the day
- Posts
- 56
- Thanks
- 3
- Thanked 3 Times in 3 Posts
You should just have to set the auto lock to never. If that doesn't work, go into the Prefrences.app bundle and you have to edit on of the plists. On the plist you set all times related to auto lock to -1. You can also add different times to set the auto lock to and different choices in Settings>General>Auto-Lock i.e. 30 seconds, 20 min, an hour... This is the best plist file I have ever messed with because you dont have to change the code to accomplish your goal.



LinkBack URL
About LinkBacks
Reply With Quote


