Here I am trying to connect two android devices using Bluetooth classic and transfer calls through HFP profile.
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.
I have made changes from source side in Bluetooth configs to enable A2DP sink and HF role (disabled AG role) for HFP profile in Device B.
I am confused about How AT commands works. I have to pass AT commands through output stream (Bluetooth classic connection).
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.
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?
Android framework provide good support for HFP.
As how to act as an HF role:
Android provide high level APIs, and you don't need to send a AT comand to accept the call.