Azure / Azure/communication-ui-library-android

[1.14.2 & older version] Incoming calls use speaker as default output instead of phone mic/earpiece

Open
#1,177 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
31
Forks
40
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When an incoming call is answered using the Azure Communication Services Call Composite UI, the default audio output is set to **speaker** instead of the **earpiece/microphone** (default device). This causes unexpected loud audio in situations where the user expects a private call through the phone earpiece.

**To Reproduce**
Steps to reproduce the behavior:
1. Receive an incoming call using the Azure Communication Services Call Composite UI.
2. Answer the call.
3. Observe that the call audio is automatically routed to the speaker.
4. There is no option to default to the earpiece/mic without manually switching the audio route.
5. This bug is **always** reproducible.
6. Code snippet
I used to initialized callComposite:
callComposite = CallCompositeBuilder()
.applicationContext(context)
.credential(credential)
.displayName("")
.callScreenOrientation(CallCompositeSupportedScreenOrientation.PORTRAIT)
.telecomManagerOptions(
CallCompositeTelecomManagerOptions(
CallCompositeTelecomManagerIntegrationMode.SDK_PROVIDED_TELECOM_MANAGER,
PHONE_ACCOUNT_ID
)).build()

For accept incoming call :

callComposite?.accept(context, incomingCallId, getLocalOption())

**Expected behavior**
When the user answers an incoming call, the audio output should default to the phone’s earpiece/mic (default in-call device), not the loudspeaker. The user should have to explicitly switch to speaker mode if desired.
Same behavior can compare with Teams.

**Screenshots**
After accepting incoming call, default audio is speaker

![Image](https://github.com/user-attachments/assets/b4d4b49a-e830-4b88-978d-5ff5737d3bca)

**AzureCommunicationUILibrary**
- Version: [v1.14.2] & all version

**Smartphone (please complete the following information):**
- Device: Samsung Galaxy M35
- API: 35

**Additional context**
This issue affects the expected user experience for normal phone calls. By default, users expect to hold the phone to their ear, not have the speaker enabled automatically for incoming calls.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Android Call Composite setup using CallCompositeBuilder and the accept(context, incomingCallId, getLocalOption()) path. Reproduce on the reported Samsung Galaxy M35 with API 35 and inspect how the incoming-call audio route is selected. Done means answered incoming calls default to the earpiece rather than the speaker, without removing explicit speaker switching.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.