stop auto lock screen in iphone

Hi all
Can I develop an app that while it’s running prevents the iphone from auto lock. I need the app to keep running until the user close the app himself, but the iphone doesn’t lock the screen at all.
plz help [import]uid: 171734 topic_id: 29933 reply_id: 329933[/import]

add this to your main.lua

system.setIdleTimer( false )   

and the app will keep running until the user quits or the battery is drained.

-finefin [import]uid: 70635 topic_id: 29933 reply_id: 120048[/import]

Thank you for your quick reply,
What if the user put the app in the background, can I still play the sound file of the app.
The idea is to make an mp3 player that keeps playing files even if it’s in the background;
is that possible? [import]uid: 171734 topic_id: 29933 reply_id: 120050[/import]

add this to your main.lua

system.setIdleTimer( false )   

and the app will keep running until the user quits or the battery is drained.

-finefin [import]uid: 70635 topic_id: 29933 reply_id: 120048[/import]

Thank you for your quick reply,
What if the user put the app in the background, can I still play the sound file of the app.
The idea is to make an mp3 player that keeps playing files even if it’s in the background;
is that possible? [import]uid: 171734 topic_id: 29933 reply_id: 120050[/import]