If I use UIWebView to display a phone number and set the data detector type to UIDataDetectorTypePhoneNumber, then when I click on the number its possible to make a phone call.
After the phone call has ended I am returned back to my app.
However if I attempt to programatically invoke the phone app using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:123456789"]];
or
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456789"]];
Then it is not possible to return back to my app after the call has finished.
Is it possible to be able to programmatically launch the phone app and then return back to my app after the call is finished, the same as if the user clicks on a number in a UIWebView?
Instead of:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456789"]];
use:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://123456789"]];
telprompt://
vs. tel://
This will pop up an alert view and the user will have to tap "call" but this returns to the app after the call is done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With