到目前为止,我已经能够通过从加载我的应用程序的手机(HF 或免提)到目标手机的蓝牙连接,从 Android 手机 AG(音频网关)发起呼叫。我已将此代码用于此过程:
///////////////////////////////////////////////////////////////////////////////
//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) 设备发起呼叫,但我无法听到铃声或听到其他人说话。
到目前为止,看起来我刚刚能够触发调用机制。如何建立音频连接,以便我也可以听到目标电话上的扬声器以及说话?