2012-05-29 54 views
0

我使用tel:{phone-number}从我的应用程序发起呼叫。电话回拨网址:

我想知道是否可以为我的应用程序设置回调URL,以便一旦通话结束,我的应用程序将再次启动(恢复)。

回答

2

不确定使用回调,但您可以使用UIWebView在不离开您的应用程序的情况下拨打电话。在这种情况下escapedPhoneNumberNSString包含要拨打的号码:这一工程

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]]; 
+0

谢谢你,! –