Agora-Flutter-SDK
Agora-Flutter-SDK copied to clipboard
Android 4.0.7: Bluetooth Headset Mic doesn't work properly. While the audio plays on the headset correctly, the mic used is the Phone's mic, not the Bluetooth headset mic.
First of all, thank you for the updates. Keep 'em coming :)
BUG: Bluetooth Headset Mic doesn't work properly with LiveBroadcasting. While the audio plays on the headset correctly, the mic used is the Phone's mic, not the Bluetooth headset mic.
Happening on Android ONLY on 4.0.7, Version 4.0.5 works fine! I guess the code is correct cause on iOS using 4.0.7 it works perfectly, tried all combinations on Android, doesn't work. Down below what im using:
Android (doesn't work on 4.0.7, works on 4.0.5) AudioProfile.SpeechStandard, AudioScenario.Education); ChannelProfile.LiveBroadcasting); iOS (works on 4.0.7) AudioProfile.SpeechStandard, AudioScenario.Default); ChannelProfile.LiveBroadcasting);
Expected behavior when connects Bluetooth headset, both audio and mic should be from the headset.
Smartphone (please complete the following information): Tested on Android 9/10/11/12 on 8 devices different manufactures (Motorola, Samsung, Xiaomi etc...) iOS is working perfectly.
is it working while using AudioScenario.Default on Android?
No. Tested all scenarios, different bluetooth headsets.
It is a known bug that will be fixed next version.
you can use setParameters('{"che.audio.force.bluetooth.a2dp":0}') first.
Tried and didn't work. I'll wait for next release and hopefully is fixed. Thank you
Any dates on when 4.0.8 with the fix will come out?
It is a known bug that will be fixed next version.
you can use
setParameters('{"che.audio.force.bluetooth.a2dp":0}')first.
Hi, is this going to be fixed on the Flutter level or on the Full SDK level? We are not using Flutter but are also having this issue!!!
I can confirm it happens on Full SDK 3.5.0.3 and 3.5.1.1
@DaniloAlmeida-Dev native layer
@DaniloAlmeida-Dev native layer
Sorry the silly question, I'm still learning all different SDK and wrappers.
By native layer, do you mean the Full SDK? or each of the android wrappers (electron/react/flutter)?
We are developing for Android, but using the Full SDK.
@DaniloAlmeida-Dev full SDK
Thank you.
I'd also like to reiterate Marcus question: Any dates on when the fix will come out?
Maven shows me a new full-sdk released as 3.5.1.2 from yesterday (Nov 11th), but I can't find any release notes to check if this fix is included in 3.5.1.2
fixed on native 3.5.1.
Hi Lich,
After many days away, I checked and native 3.5.1 still had not fixed this yet.
I see there is a new Native 3.6.0.1 now, could you please confirm if this should be fixed in native 3.6.0.1?
Hi Team, any update on this front for Native? 3.6.0.1 stil dows not fix this.
Hello - is there anything we can do to help resolve this? This seems to be an issue on the latest versions as well.
Hi, yes same here - had contacted Agora support but nothing helpful yet, we tried 4.0.7 and also have the same problem. Any ideas here?
In my case the issue was on Android 12 device, needed to add this permission
<!-- Add the following permission on devices running Android 12.0 or later -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
according to https://docs.agora.io/en/Voice/faq/ios_bluetooth?platform=Android
While trying to solve it I was able to use the bluetooth speaker by using FlutterAudioManager package and using it like this (the rest of the code is from suggestions that I've found on github and so, idk might help someone):
_enableBluetooth() async {
await _engine.setAudioProfile(
AudioProfile.SpeechStandard,
AudioScenario.ChatRoomEntertainment,
);
var res = await FlutterAudioManager.changeToBluetooth(); // <- THIS ONE WORKED FOR ME
await _engine.setParameters('{"che.audio.force.bluetooth.a2dp":0}');
// var devicesList = await FlutterAudioManager.getAvailableInputs();
// print('devicesList: $devicesList');
return res;
}
If you still face issues, please try upgrading to the new version to see if it works for you.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.