How to prevent iphone from going to sleep, while a function is being executed in the app

Hi,
I am trying to set local notification(1000+) that is taking too long to execute(kind of freezes the application) and thus eventually makes the phone go to sleep.

Wanted to ask the community, if there is a way to keep the phone from going to sleep.

thx,
Bejoy [import]uid: 84539 topic_id: 20179 reply_id: 320179[/import]

insert this code into your main.lua file and be happy.

[lua]–> Disable (turn off) the idle timer
system.setIdleTimer( false );[/lua] [import]uid: 89165 topic_id: 20179 reply_id: 78811[/import]

Nice RSCdev! That’s correct!!! [import]uid: 29181 topic_id: 20179 reply_id: 78847[/import]

Thank you @Ninja. [import]uid: 89165 topic_id: 20179 reply_id: 78856[/import]

Very happy to see this already resolved - nicely done Rodrigo :slight_smile: [import]uid: 52491 topic_id: 20179 reply_id: 78877[/import]

Thank you Peach!

Honestly I love to help the community here, I only don`t do this much because am limited into all of this, yet. :\

But let`s keep going. :slight_smile:
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20179 reply_id: 78886[/import]

You are improving quickly, over time you will only get better :slight_smile: [import]uid: 52491 topic_id: 20179 reply_id: 78897[/import]

@RSCdev - Thx. [import]uid: 84539 topic_id: 20179 reply_id: 78935[/import]

Guys and Gals - Love you all! It`s very pleasent for me to be helping when possible here! :slight_smile:
have all a awesome week!

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20179 reply_id: 78951[/import]

<3 [import]uid: 52491 topic_id: 20179 reply_id: 79085[/import]