Screen Timing out?

I am currently working with some android builds, when testing on the simulator and device it works great. The only issue I am having is since the app only uses the accelerometer to move, you dont tap the screen, this is causing the screen to time out and get dim and if you dont touch it after that it then shuts off the screen. What is the fix to this?

Is there something I am missing to keep the screen awake?

Thanks
Bryan [import]uid: 15043 topic_id: 9090 reply_id: 309090[/import]

settings option in your phone to not put the phone to sleep

c. [import]uid: 24 topic_id: 9090 reply_id: 33158[/import]

I can’t sell a game that had screen time out issues. Making the user change the settings on their phone to make their device not sleep is not a fix to this issue.
Is there a correct fix for this using code?

Thanks! [import]uid: 15043 topic_id: 9090 reply_id: 33163[/import]

it happens on all apps… the screen goes to sleep. maybe we need an API to keep awake.

c. [import]uid: 24 topic_id: 9090 reply_id: 33165[/import]

Yes an API to keep the screen awake is a must! Is there a work around that could be used until there is a fix? [import]uid: 15043 topic_id: 9090 reply_id: 33167[/import]

You don’t need an API for this simple task. All you need is to add the following line to your delegate’s applicationDidFinishLaunching function:

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

Unfortunately this will require a new binary from ansca.
[import]uid: 10332 topic_id: 9090 reply_id: 33219[/import]

Just found this post -

http://developer.anscamobile.com/forum/2010/09/01/setidletimerdisabled-keep-iphone-screen-dimming
[import]uid: 10332 topic_id: 9090 reply_id: 33220[/import]

This does work I tested it for Android!
system.setIdleTimer( false )

[import]uid: 15043 topic_id: 9090 reply_id: 33328[/import]

Nice find! [import]uid: 29181 topic_id: 9090 reply_id: 33482[/import]

setIdleTimer was fixed for Android in the latest public build: 484. [import]uid: 7559 topic_id: 9090 reply_id: 33513[/import]