Comment history

Versions of a comment on [Android] Incoming voice audio is silent for 1+ minute after joining, then starts on its own, newest first.

Current version | Edited by Charles W (K5CDW)
Changes
Fix, tested on Pixel 6 Pro / Android 17 in a custom build on canary (022f1249): speaker loud right after joining; earbuds on/off mid-call, audio and picker follow; manual speaker/earpiece switching; leave from the notification; swipe-away; mute; chat.- Plugin PR: hiennguyen92/flutter_callkit_incoming#896Removed: - Fluxer side (3 small commits: route via Telecom on all devices, relay device changes to flutter_webrtc, re-apply the route when a headset disconnects): ready to open as a PR against canary if you'd like it. GitHub: sdjrdriverAdded: - Fluxer side (3 small commits: route via Telecom on all devices, relay device changes to flutter_webrtc, re-apply the route when a headset disconnects): https://github.com/fluxerapp/flutter_client/compare/canary...sdjrdriver:flutter_client:fix/android-voice-routing - happy to open it as a PR against canary. GitHub: sdjrdriver
Show
Update with the complete root cause, a fix, and test results. The plugin race (flutter_callkit_incoming#893) was only half of it. Fixing just that on my Pixel 6 Pro did not fix the speaker. The other half is in Fluxer: while the self-managed Telecom call exists, Telecom owns the audio route and ignores the app's AudioManager calls. VoiceSpeakerRoute.kt already routes through the call's Telecom Connection, but only when routesSpeakerWithCommunicationDevice is true (Samsung). That is likely why it doesn't reproduce everywhere. Two more Android issues show up in the same area:
  • Bluetooth earbuds connected mid-call never appear in the output picker: in Telecom mode flutter_webrtc's AudioSwitch isn't running, so onDeviceChange never fires.
  • Earbuds disconnected mid-call: Telecom falls back to the earpiece, not the speaker.
Fix, tested on Pixel 6 Pro / Android 17 in a custom build on canary (022f1249): speaker loud right after joining; earbuds on/off mid-call, audio and picker follow; manual speaker/earpiece switching; leave from the notification; swipe-away; mute; chat.
Original by Charles W (K5CDW)
Show
Update with the complete root cause, a fix, and test results. The plugin race (flutter_callkit_incoming#893) was only half of it. Fixing just that on my Pixel 6 Pro did not fix the speaker. The other half is in Fluxer: while the self-managed Telecom call exists, Telecom owns the audio route and ignores the app's AudioManager calls. VoiceSpeakerRoute.kt already routes through the call's Telecom Connection, but only when routesSpeakerWithCommunicationDevice is true (Samsung). That is likely why it doesn't reproduce everywhere. Two more Android issues show up in the same area:
  • Bluetooth earbuds connected mid-call never appear in the output picker: in Telecom mode flutter_webrtc's AudioSwitch isn't running, so onDeviceChange never fires.
  • Earbuds disconnected mid-call: Telecom falls back to the earpiece, not the speaker.
Fix, tested on Pixel 6 Pro / Android 17 in a custom build on canary (022f1249): speaker loud right after joining; earbuds on/off mid-call, audio and picker follow; manual speaker/earpiece switching; leave from the notification; swipe-away; mute; chat.
  • Plugin PR: hiennguyen92/flutter_callkit_incoming#896
  • Fluxer side (3 small commits: route via Telecom on all devices, relay device changes to flutter_webrtc, re-apply the route when a headset disconnects): ready to open as a PR against canary if you'd like it. GitHub: sdjrdriver