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+"
").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();
}
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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…