iDevGames Forums
deactivate stand-by of iphone - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: deactivate stand-by of iphone (/thread-9580.html)



deactivate stand-by of iphone - sefiroths - Nov 28, 2011 06:10 AM

i have an app that doesn't use touch, but only voice.
so, after some times, the iphone goes to stand-by makeing the screen black while the app is running!
how can i solve this problem?
thanks


RE: deactivate stand-by of iphone - sefiroths - Nov 29, 2011 02:33 AM

perhaps i have find it here:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728

idleTimerDisabled
A Boolean value that controls whether the idle timer is disabled for the application.

@property(nonatomic, getter=isIdleTimerDisabled) BOOL idleTimerDisabled
Discussion
The default value of this property is NO. When most applications have no touches as user input for a short period, the system puts the device into a "sleep” state where the screen dims. This is done for the purposes of conserving power. However, applications that don't have user input except for the accelerometer—games, for instance—can, by setting this property to YES, disable the “idle timer” to avert system sleep.

tonight i'll try Smile


RE: deactivate stand-by of iphone - sefiroths - Dec 3, 2011 04:35 AM

i have sett the property to YES, but the iphone goes to standby anyway!
Code:
[UIApplication sharedApplication].idleTimerDisabled = YES;