Youngwing
Youngwing

Reputation: 577

How to handle the phone call while running the application in iphone

I am doing with a paint application. while drawing any picture if I got any phone call, the application is getting quit and reopens immediately after end of the call. But my requirement is I should able to draw the picture while I am in incoming call.

Any one can Please help me out

Upvotes: 3

Views: 1762

Answers (3)

Rama Rao
Rama Rao

Reputation: 1033

This is default from apple that any application go inactive if incoming call is in active.We cannot change this.

Upvotes: 2

Nitin
Nitin

Reputation: 7461

Use the below Appdelegate method:

(void)applicationWillResignActive:(UIApplication *)application

This delegate will call when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call )

To Restart any tasks that were paused (or not yet started) while the application was inactive. For this use the below appDelegate

(void)applicationDidBecomeActive:(UIApplication *)application

For more visit app multitaking

Hope, this will help you..

Upvotes: 1

Thomas Müller
Thomas Müller

Reputation: 15625

When a phone call comes in, and the user picks it up, they will always leave the current app and the phone app will start. I don't think you can change this behaviour.

While the user is in the phone call, though, they can change to another app simply by pressing the home button and starting another app from the home screen, or by double-pressing the home button and switching to another app, including yours.

In that case there will be a thin view below the status bar indicating that they're in a call, so you have to make sure your app resizes properly to make space for that.

Upvotes: 3

Related Questions