aws / aws/amazon-chime-sdk-android
Audio selection with multiple Bluetooth devices
- Dominant language
- Kotlin
- Stars
- 113
- Forks
- 60
- Avg merge
- 40m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
When there are multiple Bluetooth audio devices connected to the phone, only the last one added is usable. Even if `chooseAudioDevice` is called with the first connected BT device, only the last added/connected is used.
**To Reproduce**
Steps to reproduce the behavior:
0. Connect multiple BT audio devices (headphones, speakers, etc.) - doesn't need to be before the call though.
1. Connect to a meeting
2. Click on select audio devices
3. Select the not-last (first) connected BT device as audio source
4. Get output/input from last connected BT device even though it was not chosen
**Expected behavior**
Expected behavior is that the chosen BT device is used regardless of when it was connected to.
**Test environment Info (please complete the following information):**
- Devices: Samsung S8 [Android 9 API 28], Samsung Note 9 [Android 10, API 29]
- Version amazon-chime-sdk: 0.7.1 and 0.5.3
- Version amazon-chime-sdk-media: 0.6.1 and 0.5.1
**Additional context**
Looking at the source code, it seems the issue lies in the fact that chime SDK is selecting devices only based on type, not on actual device chosen.
Contributor guide
Research direction
Start by tracing `chooseAudioDevice` and the audio-device selection path in the Android SDK, focusing on how Bluetooth devices are distinguished. Reproduce with multiple connected Bluetooth devices and select one other than the most recently connected. Done means input and output use the specifically selected device; verify on the Android versions and SDK versions listed in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- audio-video-rtc, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100