Skip to content

Conversation

@liviu-timar
Copy link
Contributor

🎯 Goal

Select external audio device when available (Bluetooth Headset, Wired Headset etc)

🛠 Implementation details

Add a new monitoring method. It will respect what AudioSwitch tells us: select external device whenever available.

@liviu-timar liviu-timar requested a review from a team as a code owner April 24, 2025 14:05
@liviu-timar liviu-timar requested a review from Copilot April 24, 2025 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces external audio device monitoring to automatically select a Bluetooth or wired headset when available, while also preserving the previously selected non-headset device.

  • In MediaManager.kt, a new internal variable (selectedDeviceBeforeHeadset) is added to store the previously selected device.
  • In Call.kt, a new monitorHeadset() function is implemented to check available devices and update the microphone selection accordingly.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/MediaManager.kt Adds tracking for the previously selected non-headset device
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt Introduces headset monitoring to auto-select external audio devices

@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 11.21 MB 11.21 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.66 MB 5.66 MB 0.00 MB 🟢
stream-video-android-ui-compose 5.84 MB 5.84 MB 0.00 MB 🟢

Co-authored-by: Copilot <[email protected]>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@rahul-lohra rahul-lohra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…uetooth-headphones-on-android

# Conflicts:
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/MediaManager.kt
@liviu-timar liviu-timar merged commit b6da4d4 into develop Apr 25, 2025
5 of 6 checks passed
@liviu-timar liviu-timar deleted the and-482-blink-audio-routing-issue-with-bluetooth-headphones-on-android branch April 25, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants