iPhone 开发人员 - 如何从应用程序内拨打电话号码?另外,如何从应用程序内挂断电话?
这是两个基本问题。首先,我需要知道是否可以在我的应用程序中以编程方式挂断电话(例如,当用户按下按钮时)。另外,是否可以在我的应用程序内拨打电话,而无需离开我的应用程序?例如,用户可以通过电话交谈,但仍然始终看到我的应用程序的正面和中心?
谢谢
Those are the two basic questions. First of all, I need to know if it's even possible to programmatically hang-up the phone from within my app (when the user presses a button, for instance). Also, is it possible to make a call from within my app, without having to leave my app? As in, the user can talk on the phone, but still see my app front and center the whole time?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对这两个问题都说“不”*:这是不可能的,除非你走向黑暗面(越狱)。
要了解开发人员在电话功能方面可以使用哪些选项,请查看 核心电话文档。
[[UIApplication sharedApplication] openURL:url]
来传递电话,但您不能“停留”在应用程序本身中(电话.app 将负责接听电话)。No to both questions*: it's not possible, unless you go to the dark side (jailbreak).
To know what kind of options are available to developers in regard to the phone functionality, take a look at Core Telephony's documentation.
[[UIApplication sharedApplication] openURL:url]
but you can't "stay" in the App itself (phone.app will take care of the phone call).当您以编程方式拨打电话时,您的应用程序会跳转到电话应用程序。
您可以像这样拨打电话:
一旦执行此操作,用户将不会在您的应用程序中,并且他们将使用标准电话界面挂断电话。
When you programmatically make a phone call, your app jumps into the phone app.
You can make a phone call like this:
Once you do this, the user will not be in your app, and they will be hanging up using the standard phone interface.