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

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i'm testing on an iPod touch.

i know i read something about this somewhere at some point, but i can't seem to remember the proper course to take for applying code incase a phone call comes in while the application is running.

does the app just freeze it's state and resume after the call? maybe i imagined i read something? is it similar to the low batter alert in which case is there nothing that should be done at all?
 
UIApplicationDelegate:

Code:
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
 
UIApplicationDelegate:

Code:
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application

yes that's it! thanks a lot.

just curious, though. without these methods, will the app simply freeze (paused animations, paused reading/writing, etc.) and then resume after the phone call?
 
The application keeps on running, but should take measures not to interrupt the call or to pause itself (if it's a game, for instance)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.