App Running + Receive Phone Call?

Discussion in 'iOS Programming' started by Darkroom, Jul 23, 2009.

  1. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    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?
     
  2. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #2
    UIApplicationDelegate:

    Code:
    - (void)applicationWillResignActive:(UIApplication *)application
    - (void)applicationDidBecomeActive:(UIApplication *)application
    
     
  3. Darkroom thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #3
    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?
     
  4. Menge macrumors 6502a

    Menge

    Joined:
    Dec 22, 2008
    Location:
    Amsterdam
    #4
    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)
     

Share This Page