views:

28

answers:

2

Friends,
currently I dont have iphone to test and using Simulator for testing purposes. I am Just curious to know whether an application continues to run even after a phone call.. here i have no option to test this from simulator. If it terminates then how can i pause things.. and continue after a phone call. Is NSUserDefaults can be used for my case. As far I understood NSuserDefaults are used to store data that is required when the App is next time loaded. But here I dont want my App to terminate instead pause until Call ends and continue as uninterrupted later. Please clear me about this. Sorry I am still a beginner so I request for no harsh replies if my question looks stupid.

Thanks in Advance

+1  A: 

When the user chooses to answer a call, your application is terminated. There is nothing you can do to prevent this. Your application is not terminated if the user receives a phone call but declines to answer it.

Your application will have an opportunity to save any state information using the UIApplicationDelegate method applicationWillTerminate:. The operating system gives you a very short amount of time to save your data before the application is completely terminated.

This behavior changes somewhat with multitasking on iOS 4.0, but that is still under NDA and can't be discussed here.

Alex
Thanks Alex, hope iphone have this facility soon
Anil Kumar
+1  A: 

I am afraid that it is not possible to simulate a phone call in the iPhone simulator. You must have a real iPhone to test the call interruption.

Laurent Etiemble
Thanks Etiemble, i need to wait for few more days for real testing
Anil Kumar