iPhone – Handle the Application Termination When the Phone Rings

When iPhone rings, the running application will quit until the phone call ends. So in code level, how could we handle this situation.

I found a post by Norman McEntire and he talked about the application behavior when the phone rings. Here is what he found.

 


Question: Does the sample app that we wrote run in the background when the phone rings?
 

Answer: I installed the app on my iPhone, then had my brother call the iPhone while I was watching the messages in the console. The moment the phone rang, the message received was this:

applicationWillResignActive:

As the phone continued to ring, the background counter continued to count. However, the moment I answered the phone, the message received was this:

applicationWillTerminate:

In summary, the application does not terminate when the phone rings, but it did terminate the moment I answered the phone. Also, when I hung up the phone, the application started back up.


 

Done =)

Reference:

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.