nextcloud / nextcloud/talk-android

Disable proximity sensor during speakerphone/Bluetooth calls

Open
#5,048 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement
Dominant language
Kotlin
Stars
739
Forks
321
Avg merge
14h 59m
Merged PRs (30d)
151

Description

Is your feature request related to a problem? Please describe.

When making a voice call in the Nextcloud Talk Android app, if the audio output is switched to a non-earpiece device such as the speakerphone or a Bluetooth headset, the proximity sensor remains active. This causes the screen to turn off when the sensor is covered (e.g., by a hand or when the phone is placed on a table), which is the standard behavior to prevent accidental touches when holding the phone to the ear. However, this behavior is unnecessary and inconvenient when not using the earpiece, as it blacks out the screen unintentionally, preventing the user from accessing call controls or other apps.

Describe the solution you'd like

I would like the proximity sensor to be automatically disabled during a voice call whenever the audio output is not the earpiece. The sensor should only be active when the call audio is routed through the earpiece to prevent accidental screen touches. When the audio is routed to the speakerphone or a connected Bluetooth device, the screen should remain on, regardless of the proximity sensor's state.

Describe alternatives you've considered

A possible alternative could be a manual toggle button within the call interface to disable the proximity sensor functionality for the current call. However, an automatic deactivation based on the selected audio output would be a much more seamless and intuitive user experience.

Additional context

This behavior is inconsistent with how most native phone dialer apps and other communication apps (like WhatsApp, Telegram) handle audio routing. In those apps, the proximity sensor is typically tied to the earpiece audio path only. Adopting this standard behavior would greatly improve the user experience during hands-free calls on Nextcloud Talk.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Android call audio-routing and proximity-sensor handling in the Talk app; no specific file or test is named in the issue. Trace how earpiece, speakerphone, and Bluetooth outputs are identified, then verify that the sensor is active only for earpiece calls and that call controls remain accessible for other outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
audio-video-rtc, mobile-dev
Issue type
Feature
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.