Bluetooth headphone usage

Sơn IT

New Member
I am using Flashphoner for my android app and app requires to be used with wireless headphones.
I read the documentation, to use the wireless headset need to call this function Flashphoner.getAudioManager().setUseBluetoothSco(true). Ok it works if I connect BT headphone but How can I determine when wireless headset is available and call Flashphoner.getAudioManager().setUseBluetoothSco(true) and when wireless headset is unavailable and use speaker or headset with wire.. Suport me. Thanks
 

Sơn IT

New Member
Thanks you very much but i have a new problem .
While i live stream i connect bluetooth headset i listen for bluetooth headset connect and disconnect event and call Flashphoner.getAudioManager().setUseBluetoothSco(true or false) the wireless headset does not pick up. I pause for about 2 seconds and then call the above function and the wireless headset works again. Do you know why so? I need the correct way to use wireless headphones while streaming. Thanks
 

Max

Administrator
Staff member
While i live stream i connect bluetooth headset i listen for bluetooth headset connect and disconnect event and call Flashphoner.getAudioManager().setUseBluetoothSco(true or false) the wireless headset does not pick up. I pause for about 2 seconds and then call the above function and the wireless headset works again. Do you know why so?
Under the hoods, we use AudioManager instance to switch to bluetooth headset with startBluetoothSco() method. This method returns before SCO is setup. So yes, you should either pause before SCO is ready or register to receive the corresponding intent, please see details here
 
Top