1、QQ语音通话,会先调用BluetoothAdapter.java的public int getProfileConnectionState(int profile)检测是否有HFP AG连接
2、QQ语音调用调用BluetoothHeadset.java的函数public boolean startScoUsingVirtualVoiceCall(BluetoothDevice device)建立语音通话
3、SCO连接成功后,需要调用setAudioParameters和setBluetoothScoOn(true)才能让声音从喇叭转到蓝牙。这里有一点需要注意:拿原生举例:
图中mAudioState = BluetoothHeadset.STATE_AUDIO_CONNECTED;一定要在mAudioManager.setBluetoothScoOn(true);前面,因为mAudioManager.setBluetoothScoOn(true);过程中会检测mAudioState的状态
4、SCO断开,需要调用setBluetoothScoOn设置为false