如何在其他呼叫运行时以编程方式合并呼叫(电话会议) [英] How to merge Call programmatically while other call is running (Conference call)

查看:29
本文介绍了如何在其他呼叫运行时以编程方式合并呼叫(电话会议)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是这样的:假设我在那个时间拨打一个号码,我想以编程方式拨打另一个号码.到目前为止,我所做的是:我能够在某些呼叫已经开始时拨打特定号码.例如,假设我正在呼叫号码 123,1 分钟后(通过使用 Alarm Manger 我触发了一个事件以呼叫另一个号码 456,然后就完成了!

My requirement is like this: Say I am calling a number on that time and I want to call another number programmatically. So far what I have done is: I am able to call to a particular number while some call is already going. For example, suppose I am calling on number 123 and after 1 minute (by using Alarm Manger I trigger an event to call on another number 456 and that is done!

Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:456"));
startActivity(intent);

我正在使用这种意图进行通话,现在我可以看到手机屏幕上有一个按钮来合并通话:

I am using such intent to call and now I am able to see the screen on my phone with a button to merge the calls:

在此图像中,您可以看到合并呼叫的按钮.现在,当用户单击合并时,它将合并所有 3 个呼叫.我想以编程方式完成,而不是使用用户界面.

In this image you can see a button of Merging calls. Now when the user clicks on merge, it will merge all 3 Calls. I want to do it programmatically, not with the user interface.

推荐答案

你的问题看起来很有趣,所以我开始挖掘 Android Source.这是我发现的:

Your question seemed interesting so I started digging in Android Source. Here is what I found:

您发布的图片中的活动名为InCallUI

The activity in the picture you posted is called InCallUI

当您开始环顾四周时,您会发现 InCallPresenter 在第 463 行有:

When you start looking around you will find InCallPresenter which at line 463 has:

final boolean canMerge = activeCall.can(Capabilities.MERGE_CALLS);

然后在 472:

CallCommandClient.getInstance().merge();

当您检查 CallCommandClient 你会发现它使用 ICallCommandService 接口,我认为这就是你要找的 :)

when you check that merge() method in CallCommandClient you will find it uses ICallCommandService interface which I think is what you where looking for :)

CallCommandClient 的初始化在 CallHandlerService 大约在第 193 行.

Initialization of that CallCommandClient is in CallHandlerService around line 193.

希望这有助于&祝你好运.

Hope this helps & good luck.

附注.我列出的 API 主要是 Android 内部的东西.您可能必须使用反射来调用它,或者根本不可能 - 您的应用可能无法访问它,因为它没有标记为系统应用.

PS. The APIs I listed are mostly internal Android stuff. You may have to use reflection to call it or it might not be possible at all - it may be inaccesible for your app because it's not marked as system app.

这篇关于如何在其他呼叫运行时以编程方式合并呼叫(电话会议)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆