Reputation: 971
I am using tel:{phone-number}
to initiate call from my application.
I want to know if I can set a callback url for my application, so that once the call ends My Application starts (resumes) again.
Upvotes: 0
Views: 166
Reputation: 2879
Not sure about using a callback, but you can use a UIWebView to make a call without leaving your app. In this case escapedPhoneNumber
is an NSString
containing the number you want to call:
NSURL *telURL =
[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",
escapedPhoneNumber]];
// using a UIWebView here allows us to make a call without leaving the App
UIWebView * callWebview = [[UIWebView alloc] init];
[self.view addSubview:callWebview];
[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
Upvotes: 2