title: How to use bluetooth HFP profile in android programmatically?
body: <p>Here I am trying to connect two android devices using Bluetooth classic and transfer calls through HFP profile.</p>
  <p>If Device A has an incoming call, I need to notify Device B and accept/decline from the device B side and even need to talk from device B side.</p>
  <p>I have made changes from source side in <a href="https://android.googlesource.com/platform/packages/apps/Bluetooth/+/refs/heads/master/res/values/config.xml" rel="nofollow noreferrer">Bluetooth configs</a> to enable A2DP sink and HF role (disabled AG role) for HFP profile in Device B.</p>
  <p>I am confused about How AT commands works. I have to pass AT commands through output stream (Bluetooth classic connection).</p>
  <p>Is it enough just pass AT commands(as per HFP document) to accept the call or Do I have to handle calls in the Device B side based on received AT command? I am creating an app for this work.</p>
  <p>And also calls automatically will stream through the connection if the call accepted through AT command or Do i have to manually do something for this from the app level?</p>