ios making call programatically without quitting a

2019-05-23 09:59发布

Is there any way to make a call programmatically without exiting from current app? I did a research , but all answers are with

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];

This is not what i want, i need also to access the voice stream.

3条回答
劳资没心,怎么记你
2楼-- · 2019-05-23 10:42

What I understand from your question is to call and after you finish, go back to the app. Is it?

Your scheme need look like this:

NSURL *url= [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", phoneNumber]];
[[UIApplication sharedApplication] openURL:url];

Use telprompt instead tel.

查看更多
劳资没心,怎么记你
3楼-- · 2019-05-23 10:43

What you want can be done using below statement.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", telNumber]]];

What till will do is when you press call button, it will ask you for confirmation to dial or cancel. When you say call, the call goes and once call ends, you will see the app open with last visited page.

Using telprompt, you get return to app when call ends.

查看更多
聊天终结者
4楼-- · 2019-05-23 10:50

If you're trying to make some kind of dialer - than NO. It's impossible in ios

查看更多
登录 后发表回答