nextcloud / nextcloud/talk-android
Disable proximity sensor during speakerphone/Bluetooth calls
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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