jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
21.81k stars 6.52k forks source link

fix(android) Keep microphone enabled when app is in background #14694

Closed clvs7-gh closed 2 weeks ago

clvs7-gh commented 2 weeks ago

Description

Android app currently mutes when it's in the background or loses focus, which wasn't an issue in previous versions. This PR fixes the issue and restoring the ability to use the microphone in the background. (Maybe) Fixes https://github.com/jitsi/jitsi-meet/issues/14615

Cause

Since Android 14, it appears to require more explicit permissions for foreground services. ( Reference : https://medium.com/@domen.lanisnik/guide-to-foreground-services-on-android-9d0127dc8f9a ) Currently, the app lacks the required permission, causing app to lose access to microphone in the background. This behavior maybe relates targetSdkVersion.

How to fix

Added the FOREGROUND_SERVICE_MICROPHONE permission to the app's manifest and configured it to be used by the JitsiMeetOngoingConferenceService.

Tested devices

Thank you.

jitsi-jenkins commented 2 weeks ago

Hi, thanks for your contribution! If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

clvs7-gh commented 2 weeks ago

Signed!

saghul commented 2 weeks ago

Interesting! Does this fix the issue on your devices?

clvs7-gh commented 2 weeks ago

Hello.

Yes, I've tested on my Android devices. The models of each device are listed in the "Tested devices" section.

Is this issue not occurring on your Android devices?

saghul commented 2 weeks ago

@Calinteodor can you PTAL?

Calinteodor commented 2 weeks ago

Jenkins please test this please

clvs7-gh commented 2 weeks ago

Thank you!