Hi Guys I am developing a local search app in iPhone...after dialing a phone number from a set of phone number searches i am able to make a call to the selected number..Now what i need is a code or a way to check if the call has ended and the app should return to the page from where i selected the number rather than exiting the app which is happening at present?please help..only this issue is left and then the app is done..so please help..
views:
356answers:
5Save your current position before exit app (use NSUserDefaults or DataBase) And check it when app is starting.
To extend what the others say;
You can't do this on the iPhone. It allows only one process to run, so you can not make your app run in the background. What Oxigen says is probably your best bet; save the apps. position (navigation wise) and restore the app. to that position once the user starts your app. again.
However, this does require your users to start your app. There is no way of doing this automatically.
Maybe, some day, when the iPhone OS 4.0 comes out, we can actually run background applications.. Lets pray to the Apple gods!
P.S: +1 for the title!
This is a common problem on iPhone because of the single process model. UIKit will relaunch your app after a call ends but, you need to save the state before your app is terminated and then reload your state when you are relaunched.
You should review this SO question about saving state and relaunching and specifically the Apple sample code for achieving this in the DrillDownSave sample on the iPhone developer site (login required).