I would like to be able to make a call fr开发者_运维技巧om within my application, but have it start in the background using the new features in iOS 4.0. I tried using the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://09650159343"]]]
but this causes a call to be made in the foreground, terminating my application. Is is possible to make a call and have it start in the background?
I'm sorry to tell you that this will never ever work, at least not on a non-jailbroken device. Even on a jailbroke device this won't work the way you approach the problem. opening an url will always opens the associated application to handle it.
before iOS4 this terminated the application, but now with fast app switching this should make the app in the background if you ask me. But it doesn't, this was forgotten on apple's to do list for iOS4?
精彩评论