PDA

View Full Version : App Running + Receive Phone Call?




Darkroom
Jul 23, 2009, 05:19 PM
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?



Luke Redpath
Jul 24, 2009, 05:44 AM
UIApplicationDelegate:


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

Darkroom
Jul 24, 2009, 12:03 PM
UIApplicationDelegate:


- (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?

Menge
Jul 24, 2009, 12:14 PM
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)