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
Removed: Found the root cause with adb. It's client-side (Android Telecom), not self-hosting. Audio was never actually silent: it was going to the EARPIECE, which from arm's length sounds like a nearly-silent speaker.Added: Found the root cause with adb. It's client-side, a race in flutter_callkit_incoming's self-managed Telecom call, not self-hosting. The audio was never silent: it was going to the EARPIECE, which sounds like a near-silent speaker from arm's length.Removed: What dumpsys telecom / dumpsys audio show (Pixel 6 Pro, Android 17, Fluxer Beta, 2026-11-01):Added: Pixel 6 Pro, Android 17, Fluxer Beta (dumpsys telecom / dumpsys audio / logcat):Removed: On voice join, the app places a SELF-MANAGED outgoing call via com.hiennv.flutter_callkit_incoming.CallkitConnectionService (call TC@5, 13:41:02.767).Removed: Telecom enters audio route TYPE_EARPIECE and registers a privileged communication-route client (uid 1000, telecom) for the earpiece.Removed: The app then calls setSpeakerphoneOn(true) / setCommunicationDevice(speaker) 20+ times, but Telecom's privileged earpiece client wins every time ("updateCommunicationRoute, preferredCommunicationDevice: earpiece"). That's why the speaker toggle and volume keys do nothing.Removed: The connection is set to DIALING (13:41:03.126) and never set ACTIVE.Removed: Exactly 2 min later, at 13:43:03.135, Telecom fires STATE_TIMEOUT [state=DIALING] (it's also logged in mCallAnomalyWatchdog). It does REQUEST_DISCONNECT then SET_DISCONNECTED (reason state_timeout), then clearCommunicationDevice() for the telecom client. Only after that does the app's speaker request take effect.Removed: Likely fix: call setActive() on the Connection once LiveKit connects (or don't leave it DIALING), and route audio through Telecom (Connection/CallEndpoint APIs) rather than AudioManager while a self-managed call exists. The "1+ minute" delay is that fixed 2-min Telecom timeout. Your Pixel 9a/Android 16 may route or time out differently. Full excerpt attached.Added: On voice join, the app starts a SELF-MANAGED outgoing call through CallkitConnectionService. Telecom routes to TYPE_EARPIECE and holds a privileged communication-route client for it. The app's setSpeakerphoneOn(true) calls (20+) all lose to it, so the speaker toggle and volume keys do nothing.Added: Fluxer sends ACTION_CALL_CONNECTED about 200 ms after ACTION_CALL_START. Telecom only created the Connection about 360 ms after CREATED (SET_DIALING at +0.36 s). CallkitIncomingBroadcastReceiver.driveTelecomConnection() does CallkitConnection.find(id) ?: return, so the early CONNECTED is silently dropped and the call stays DIALING.Added: Exactly 120 s later, Telecom fires STATE_TIMEOUT [state=DIALING] (logged in mCallAnomalyWatchdog), disconnects the call and clears its earpiece route. Only then does the speaker work. That's the "1+ minute" delay.Added: Confirmed: after adb shell telecom unregister-phone-account com.fluxer/com.hiennv.flutter_callkit_incoming.CallkitConnectionService flutter_callkit_incoming_in_app_call_account 0, placeCall is rejected (the plugin handles it gracefully), and on the next join the speaker is loud immediately (active communication device = speaker).Added: Added: Suggested fix: have the plugin remember a pending CONNECTED and apply setActive() in onCreateOutgoingConnection, or have Fluxer call setCallConnected only after the Connection exists. Faster devices probably win the race, which may be why your Pixel 9a didn't reproduce it. [[file:fluxer\_4515\-adb\-evidence.txt]]
Show
Found the root cause with adb. It's client-side, a race in flutter_callkit_incoming's self-managed Telecom call, not self-hosting. The audio was never silent: it was going to the EARPIECE, which sounds like a near-silent speaker from arm's length.
Pixel 6 Pro, Android 17, Fluxer Beta (dumpsys telecom / dumpsys audio / logcat):
On voice join, the app starts a SELF-MANAGED outgoing call through CallkitConnectionService. Telecom routes to TYPE_EARPIECE and holds a privileged communication-route client for it. The app's setSpeakerphoneOn(true) calls (20+) all lose to it, so the speaker toggle and volume keys do nothing.
Fluxer sends ACTION_CALL_CONNECTED about 200 ms after ACTION_CALL_START. Telecom only created the Connection about 360 ms after CREATED (SET_DIALING at +0.36 s). CallkitIncomingBroadcastReceiver.driveTelecomConnection() does CallkitConnection.find(id) ?: return, so the early CONNECTED is silently dropped and the call stays DIALING.
Exactly 120 s later, Telecom fires STATE_TIMEOUT [state=DIALING] (logged in mCallAnomalyWatchdog), disconnects the call and clears its earpiece route. Only then does the speaker work. That's the "1+ minute" delay.
Confirmed: after adb shell telecom unregister-phone-account com.fluxer/com.hiennv.flutter_callkit_incoming.CallkitConnectionService flutter_callkit_incoming_in_app_call_account 0, placeCall is rejected (the plugin handles it gracefully), and on the next join the speaker is loud immediately (active communication device = speaker).
Suggested fix: have the plugin remember a pending CONNECTED and apply setActive() in onCreateOutgoingConnection, or have Fluxer call setCallConnected only after the Connection exists. Faster devices probably win the race, which may be why your Pixel 9a didn't reproduce it. fluxer_4515-adb-evidence.txt
Original by Charles W (K5CDW)
Show
Found the root cause with adb. It's client-side (Android Telecom), not self-hosting. Audio was never actually silent: it was going to the EARPIECE, which from arm's length sounds like a nearly-silent speaker.
What dumpsys telecom / dumpsys audio show (Pixel 6 Pro, Android 17, Fluxer Beta, 2026-11-01):
On voice join, the app places a SELF-MANAGED outgoing call via com.hiennv.flutter_callkit_incoming.CallkitConnectionService (call TC@5, 13:41:02.767).
Telecom enters audio route TYPE_EARPIECE and registers a privileged communication-route client (uid 1000, telecom) for the earpiece.
The app then calls setSpeakerphoneOn(true) / setCommunicationDevice(speaker) 20+ times, but Telecom's privileged earpiece client wins every time ("updateCommunicationRoute, preferredCommunicationDevice: earpiece"). That's why the speaker toggle and volume keys do nothing.
The connection is set to DIALING (13:41:03.126) and never set ACTIVE.
Exactly 2 min later, at 13:43:03.135, Telecom fires STATE_TIMEOUT [state=DIALING] (it's also logged in mCallAnomalyWatchdog). It does REQUEST_DISCONNECT then SET_DISCONNECTED (reason state_timeout), then clearCommunicationDevice() for the telecom client. Only after that does the app's speaker request take effect.
Likely fix: call setActive() on the Connection once LiveKit connects (or don't leave it DIALING), and route audio through Telecom (Connection/CallEndpoint APIs) rather than AudioManager while a self-managed call exists. The "1+ minute" delay is that fixed 2-min Telecom timeout. Your Pixel 9a/Android 16 may route or time out differently. Full excerpt attached.