Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jsnuff1

macrumors 6502a
Original poster
Oct 4, 2003
726
333
NY
The app I am currently creating requires that it always remain active in order for it to function properly. Unfortunatly the OS puts the phone to sleep after a few min of no input by the user, this causes some of the core services to stop communicating with my app untill the user wakes the iphone again.

Is there anyway to either keep the core services communicating even after the phone goes to sleep, or to keep the phone from going to sleep altogether untill my app is quit?

Thanks.
 

lyptt

macrumors newbie
Feb 8, 2008
26
0
Not on the official SDK there isn't, if this is an official app you're developing then you'll just have to make it so that if the app does go to sleep it's handled properly.
 

jsnuff1

macrumors 6502a
Original poster
Oct 4, 2003
726
333
NY
the AIM app somehow disables auto-lock as well....if i launch AIM and do nothing it wont go to sleep....so there is an official way to do it...just got to find out how.

Any ideas anyone?
 

rarunach

macrumors newbie
Jul 24, 2008
5
0
Try this

I read somewhere that the following setting will avoid auto-locking.

application.idleTimerDisabled = YES.

Unfortunately, I didn't know about this before submitting the app and I am planning to add it in an update.
 

iphonehere

macrumors newbie
Aug 7, 2008
14
0
The next line, is only prevent it goes into sleep mode.

application.idleTimerDisabled = YES.

So how does app keep running in the sleep mode ? Like aol radio or Pandora does.
 

Nonnus3G

macrumors member
Jul 9, 2008
52
0
no they dont

most of my apps have this

if the user manually locks the device while using them (without pressing home button)
they will keep running
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.