[Q] [brainstorming] bluetooth headset microphone stops working until magic 'call'
I'm developing a VoIP application.
When using bluetooth headset on a Galaxy Tab 4.0.4 i've the following problem:
When there is a voice call in the middle of the VOIP call, or also when I stop application and restart my application it will not use again the bluetooth headset microphone.
When the problem occurs it will keep not using the bluetooth headset microphone even afer stopping and starting bluetooth adapter or the bluetooth device. Only adb reboot seems to fix the problem.
There is a 'dirty' fix which i don't fully understand:
When the problem occurs calling from my application:
will reenable the microphone of the bluetooth headset.
IF this call was working always that would be enough to fix the issue,however there is a problem: sometimes (around 25%) just after calling the snippet I will start listening very annoying intereferences on the bluetooth headset each time SCO is enabled
I guess they are related to the following comment in AudioManager documentation: 'In particular, the MODE_IN_CALL mode should only be used by the telephony application when it places a phone call, as it will cause signals from the radio layer to feed the platform mixer.'
The question is: any ideas on what could cause and how to avoid the explained issue??