wire-android_legacy
wire-android_legacy copied to clipboard
Call audio cuts out in background on Android 9 (API level 28) and later
If I start a call in Wire and remove the app from the foreground, the audio will go completely silent after a few seconds and the recipient will hear nothing until the app is in the foreground again. This is due to new(ish) security restrictions in Android 9+ that forbid microphone access for background apps unless it has explicitly requested the FOREGROUND_SERVICE permission and has a notification priority of PRIORITY_LOW or higher.
Note: On devices running Android 9 (API level 28) or higher, apps running in the background cannot access the microphone. Therefore, your app should record audio only when it's in the foreground or when you include an instance of MediaRecorder in a foreground service.
Source: https://developer.android.com/guide/topics/media/mediarecorder
Note: Apps that target Android 9 (API level 28) or higher and use foreground services must request the FOREGROUND_SERVICE permission. This is a normal permission, so the system automatically grants it to the requesting app.
If an app that targets API level 28 or higher attempts to create a foreground service without requesting FOREGROUND_SERVICE , the system throws a SecurityException.
Source: https://developer.android.com/guide/components/services.html#Foreground
I don't currently see any reference to FOREGROUND_SERVICE in your source code repo, so I can only assume this consideration hasn't been implemented yet. Please update your app to comply with Android's modern security framework.
Hi @PacoBell , thanks for the suggestion. We will look into this when time allows.
I am facing the same issue on Android 9. When I switch to another app or lock my screen, the recipient hears nothing until I switch back to Wire or unlock my screen.
@marcoconti83, any news about this bug?
Are there any plans to prioritize this bug? It is an absolutely annoying bug and makes wire calls almost impossible (at least with a headset). In my opinion it should be a priority 1 bug especially since it is around here since 1.5 years...