简体   繁体   中英

how to make the phone call background through my app in iphone

I am developing an app. One of my app features is making calls. Is there any api's available for making calls.

I am using the following code when this code is executed Apple's default call screen appears and my app goes to the background. I want to launch a call in the background and keep my app running in foreground.

 NSURL* callUrl=[NSURL URLWithString:[NSString stringWithFormat:@"telprompt:%@",dailernum]];
[[UIApplication sharedApplication] openURL:callUrl];

This is not possible, Apple has restricted this with good reason. If it would be possible to start a phone call and which is not visible fro the user your app could be dialing a payed number. This would mean that the user is not aware of this and gets surprise when the phone bill drops in.

Also be aware that the telprompt: scheme is not official. Thus Apple might remove this at any time make your app not longer work.

To answer your other question, you can not make calls without either the tel: or telprompt: .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM