How to merge Call programmatically while other call is running (Conference call)
android, merge
Solution
Your question seemed interesting so I started digging in Android Source. Here is what I found:
The activity in the picture you posted is called InCallUI
When you start looking around you will find InCallPresenter which at line 463 has:
final boolean canMerge = activeCall.can(Capabilities.MERGE_CALLS);
and then at 472:
CallCommandClient.getInstance().merge();
when you check that merge() method in CallCommandClient you will find it uses ICallCommandService interface which I think is what you where looking for :)
Initialization of that CallCommandClient is in CallHandlerService around line 193.
Hope this helps & good luck.
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.
Problem
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: 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.