如何启动从HF通过AG通过免提音频网关在Android的电话吗? [英] How to initiate a call from HF through AG via Handfree Audio Gateway in Android?

查看:597
本文介绍了如何启动从HF通过AG通过免提音频网关在Android的电话吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我已经能够启动从AG(音频网关),这是一款Android手机,通过从该我的应用程序被加载(高频或免提),目标手机在手机蓝牙连接的呼叫。我已经使用这个code此过程:

So far I have been able to initiate a call from the AG (Audio Gateway) which is an Android phone through bluetooth connection from the phone in which my app is loaded (the HF or Hands-free), to the target phone. I have used this code for this procedure:

   ///////////////////////////////////////////////////////////////////////////////         
           //Here, how to establish voice connectivity from AG to my phone(HF)?
    //////////////////////////////////////////////////////////////////////////////        

        // Calling the target phone from the AG via the HF using bluetooth Handfree Audio Gateway
            try {
                mmOutStream.write(("ATD"+phone_number+"\r").getBytes());
            } catch (IOException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

现在,我能够开始从我手中免费(HF)设备的电话,但我无法听到铃声或听到其他人说话。

Right now, I am able to initiate the call from my hands free(HF) device, but I am unable to hear the ringtone or hear the other person speak.

看起来像我刚才已经能够触发调用机制至今。如何建立音频连接,这样我也能听到目标手机扬声器以及说话?

Looks like I have just been able to trigger the call mechanism so far. How to establish audio connectivity so that I can also hear the speaker at the target phone as well as speak?

推荐答案

看来,你试图实现对手机免提装置的作用。
这样做的一个方法是,如果你有2个电话,电话A(表现为AG),电话B(免提单元),那么

It appears that you are trying to implement the Handsfree unit role on the Phone. One way of doing this is if you have 2 Phones, Phone A (behaves as AG), Phone B (HandsFree Unit) then


  1. 手机B需要发送相应的AT命令手机上,使自己表现为一个蓝牙耳机。如果这样做的权利,那么我不认为需要在手机上的任何更改将音频传送到蓝牙SCO链路。要查看AT命令由免提单元发送,或许可以从手机上(AG)登录连接到标准蓝牙耳机会有所帮助。或免提规范。

  1. Phone B needs to send appropriate AT commands to Phone A, to make itself appear as a Bluetooth headset. If this is done right, then i dont think any changes are required on Phone A to route the audio to Bluetooth SCO link. To see what AT commands are sent by a Handsfree unit, perhaps logs from Phone A (AG) connected to a standard Bluetooth headset will help. Or the Handsfree Specification.

在电话B,假设所有的AT命令已发送到手机上,使自己表现为一个高频单元,然后呼叫建立(手机A到对方)通过话机B发送ATD ,手机上可设立上海合作组织,因为它会与标准蓝牙耳机做的。
如果没有,那么电话B可以具有调用AudioManager.startBluetoothSco()成立上海合作组织。
在正在建立除了SCO,电话B.将不得不音频路由到SCO。我认为API是AudioManager.SetMode()和AudioManager.setBluetoothScoOn()。

On Phone B, assuming that all the AT commands have been sent to Phone A to make itself appear as a HF unit and then a call is set up ( Phone A to remote party) by sending ATD from Phone B, Phone A may set up SCO as it would do with a standard Bluetooth headset. If not, then Phone B may have to invoke AudioManager.startBluetoothSco() to set up SCO. In addition to SCO being set up, Phone B would have to route audio to SCO. I think the APIs are AudioManager.SetMode() and AudioManager.setBluetoothScoOn().

这篇关于如何启动从HF通过AG通过免提音频网关在Android的电话吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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