tags:

views:

394

answers:

2

Consider a scenario where I'm displaying a restaurant menu in my app. I want to allow the user to dial the restaurant so they can call for takeout while they are still looking at the menu. In other words, I'd like the iPhone to dial and connect -- in speakerphone mode if possible -- without leaving my app and entering the phone application. I don't mind the "cancel / call" alert; I just want to stay in my app.

As Adam Davis pointed out in this answer,

The tel URL scheme is used to launch the Phone application and initiate dialing of the specified phone number.

So tel: is not the answer. All the apps I have on my phone that make calls do so by launching into the phone app. Any ideas? Thanks.

+2  A: 

You can't do this on the current iPhone. You need to be able to execute multiple applications simultaneously.

Robert Greiner
+1  A: 

I am almost positive that you can never initiate any processes from your app and keep the app alive. It doesn't work for web, ipod, or phone. The other side of the coin is that Apple can have processes running while your app is running, like ipod, or phone (which takes control with that alert). I would save the application state before the call starts and somehow remind the user that they need to reopen it when they're done.

TahoeWolverine
At least when you receive an incoming call, after you hang up it takes you straight back to the previously open app. Maybe it works the same way if you initiate a call from the your app?
Daniel Dickison
@Daniel Dickison - Yes, I can get it to return to my app once the call is over.
Alan
Hmm awesome...I had no idea.
TahoeWolverine