我的要求是这样的:假设我在那个时间呼叫一个号码,我想以编程方式呼叫另一个号码。到目前为止,我所做的是:我可以在某个电话正在通话时拨打某个特定的号码。例如,假设我正在呼叫号码123,1分钟后(通过使用Alarm Manger
,我触发了一个事件来呼叫另一个号码456,这就完成了!)
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:456"));
startActivity(intent);
我正在使用这样的意图呼叫,现在我能够看到我的手机上的屏幕上有一个按钮来合并呼叫:
在此图像中,您可以看到合并呼叫按钮。现在,当用户点击合并时,它将合并所有3个呼叫。我想用编程的方式来做,而不是用用户界面。
6条答案
按热度按时间wljmcqd81#
你的问题似乎很有趣,所以我开始在Android源代码中挖掘。以下是我的发现:
您发布的图片中的活动名为InCallUI
当你开始环顾四周,你会发现InCallPresenter在第463行有:
然后在472:
当你检查CallCommandClient中的merge()方法时,你会发现它使用了ICallCommandService接口,我想这就是你要找的:)
该CallCommandClient的初始化在CallHandlerService中第193行附近。
希望这对你有帮助&祝你好运。
我列出的API大多是Android内部的东西。您可能必须使用反射来调用它,或者根本无法调用它-您的应用可能无法访问它,因为它未标记为系统应用。
8yoxcaq72#
Android API不支持调用合并功能,您可以查看此线程。https://groups.google.com/forum/?来自组#!searchin/android-developers/conference$20call/android-developers/6 OXDEe 0 tCks/8 cuKdW 1 J 9 b8 J但你可以做的是使用aidl打开手机的呼叫板屏幕从那里用户可以添加另一个呼叫或合并呼叫。
fruv7luv3#
您无法使用智能电话管理会议。你需要一个中间服务来为你做这些。您可以使用CCXML对会议管理器进行编程。
Voxeo为CCXML实现提供了一个很好的托管平台,您可以查看他们的documentation,了解如何设置会议。在“学习CCXML1.0\CCXML1.0中的多方会议”中有示例。
你可以在Voxeo上免费开发和测试,只有当你将其投入生产时,他们才会开始向你收费。另一个选择是。
这里是how you program a conference call on their platform.的链接
检查链接,你会得到有用的信息。#礼貌- SO
yh2wf1be4#
当然,SDK中没有API可以通过编程方式进行合并调用。
你必须在
RIL (Radio Interface Layer)
上工作的电话会议,其中android用于电话呼叫.Android的无线电接口层(RIL)提供了Android电话服务(android.telephony)和无线电硬件之间的抽象层。RIL是无线电不可知的,并且包括对基于全球移动的通信系统(GSM)的无线电的支持。
标签:http://www.kandroid.org/online-pdk/guide/telephony.html
更新
How does Modem code talk to Android code
http://fabiensanglard.net/cellphoneModem/index2.php
http://www.e-consystems.com/blog/android/?p=498
因此,您必须在套接字中写入AT调制解调器命令,然后
rild
调用供应商库的回调,然后供应商库又委托给无线电固件。ikfrs5lh5#
经过大量的搜索,我得到了成功的合并呼叫,在这里我想与你分享我的发现。作为参考,我使用了link
1.在项目中使用CallList.java
2.从InCallService类调用CallList.java的方法。
我正在编辑我的答案,我忘记放置CallHelper.java类。请访问以下链接获取CallHelper.java文件。
https://gist.github.com/amitsemwal1/4e9ca712adc8daaf070a0cc0e0d58c26
kx1ctssn6#
在android中没有用于获取电话会议的API,你可能想玩一下根系统,完成你的工作。
官方Android不提供任何用于电话会议的API。你可以在这里学习更多关于root访问的内容
http://www.kandroid.org/online-pdk/guide/telephony.html