Skip to content

Android 14/15 (targetSdk 35): one-way audio after answering incoming call — TVConnectionService starts a microphone Foreground Service from background, triggering SecurityException and muting uplink #297

@DucHM

Description

@DucHM

Issue Summary

When receiving an incoming call (Web → Android), the callee can hear the caller, but the caller cannot hear the callee (one-way audio). On Android 14/15 with targetSdkVersion 35, TVConnectionService attempts to start a foreground service with FOREGROUND_SERVICE_TYPE_MICROPHONE while the app is backgrounded. Android denies microphone-type FGS in this state, which leads to a SecurityException. As a result, uplink capture is blocked and the caller hears silence.

The service should use FOREGROUND_SERVICE_TYPE_PHONE_CALL (Telecom call) instead of MICROPHONE. Using MICROPHONE is both unnecessary (Telecom manages audio for the call) and disallowed from background on modern Android.

###Environment

Library: twilio_voice 0.3.2

Platform: Android (Flutter app)

targetSdkVersion: 35 (Android 15 / also reproducible on Android 14)

Call path: Caller (Web) → Callee (Android)

Callee accepts via the Telecom incoming call UI

Steps to Reproduce

  1. Caller places a call from Web.
  2. Callee receives incoming call on Android (Flutter, twilio_voice 0.3.2) and taps Accept.
  3. Media connects: Callee hears Caller; Caller hears nothing.

Actual: One-way audio — callee hears caller; caller does not hear callee.

Expected: Two-way audio after call acceptance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions