从我的应用而不是默认的 phone 应用进行 phone 调用
Make phone calls from my app instead of the default phone app
我想实现的功能是:从我自己的应用程序调用 phone 而不是使用系统默认的 phone 应用程序。
我读到这是使用意图完成的。
大多数时候,人们使用意图弹出系统的 phone 应用来处理呼叫。
但是,我想自己做。
通话将仅从我的应用发起。
所以这不适用于来自其他应用程序的调用。
简而言之,用户将从我的应用程序拨打一个号码,我的应用程序本身将拨打电话(蜂窝网络)并处理。
从this blog post开始,好像是可以的
真的吗?怎么样?
在 Android OS 中不可能(在 API 级别 26 以下编辑)
如果您 运行 您的应用在已注册的 Android 设备上,那么您必须遵守他们的条款,该条款不允许您的应用自行处理呼叫。
仅供参考:手机通话更多地依赖于硬件而不是软件。
编辑
在 API 级别 26 (Oreo) 他们推出了新的 API。
ANSWER_PHONE_CALLS permission allows your app to answer incoming phone calls programmatically. To handle an incoming phone call in your app, you can use the acceptRingingCall() 方法。
请注意
'These permission are both classified as dangerous and are both part of the PHONE permission group.'
我想实现的功能是:从我自己的应用程序调用 phone 而不是使用系统默认的 phone 应用程序。
我读到这是使用意图完成的。
大多数时候,人们使用意图弹出系统的 phone 应用来处理呼叫。
但是,我想自己做。
通话将仅从我的应用发起。
所以这不适用于来自其他应用程序的调用。
简而言之,用户将从我的应用程序拨打一个号码,我的应用程序本身将拨打电话(蜂窝网络)并处理。
从this blog post开始,好像是可以的
真的吗?怎么样?
在 Android OS 中不可能(在 API 级别 26 以下编辑)
如果您 运行 您的应用在已注册的 Android 设备上,那么您必须遵守他们的条款,该条款不允许您的应用自行处理呼叫。
仅供参考:手机通话更多地依赖于硬件而不是软件。
编辑
在 API 级别 26 (Oreo) 他们推出了新的 API。 ANSWER_PHONE_CALLS permission allows your app to answer incoming phone calls programmatically. To handle an incoming phone call in your app, you can use the acceptRingingCall() 方法。
请注意
'These permission are both classified as dangerous and are both part of the PHONE permission group.'