mattermost / mattermost-plugin-calls

https://www.mattermost.com
Other
96 stars 50 forks source link

Android app in background microphone not working #531

Closed kevev closed 10 months ago

kevev commented 12 months ago

We are having trouble for all Android users on the latest app in Play Store. The mic stops working when app is in background sometimes. The mic immediately stops working when screen is put to sleep. iOS users do not have this issue.

root@mattermost:~# cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS" PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

Mobile App: Android app version 2.8.0 Battery usage is set to "Unrestricted" Android device Pixel 6a Android version: 13

App debug info: No way to get that from mobile app. :(

Server version: Mattermost Version: 8.1.1 Database Schema Version: 109 Database: postgres

streamer45 commented 12 months ago

@kevev Would you be able to share mobile debug logs after reproducing this?

You should be able to export them through account screen -> settings -> report a problem.

image

kevev commented 12 months ago

I see this in log:

2023/09/25 13:57:29.407 INFO websocket closed wss://mattermost.texassportsproductions.com/api/v4/websocket?connection_id=&sequence_number=0 ... 2023/09/25 13:58:43.039 INFO websocket re-established connection to wss://mattermost.texassportsproductions.com/api/v4/websocket?connection_id=m91yr5n5xint5bxw6dddugi45r&sequence_number=99

1st device is the Pixel 6a on Android 13. 2nd device is a OnePlus 6t Android 11. 3rd device is a Samsung Galaxy S21 Android 13. Logs attached for all 3 devices. com.mattermost.rn-latest.log com.mattermost.rn-latest.log com.mattermost.rn-latest.log

streamer45 commented 12 months ago

@kevev Thanks. To confirm, does the mic start working again when re-opening the app in foreground or is it permanent?

streamer45 commented 12 months ago

I think the behaviour may have changed in recent versions of Android. This will likely need us to use a foreground service to make audio inputs work while the app is in background. Related to https://github.com/react-native-webrtc/react-native-incall-manager/issues/208#issuecomment-1380193603

I created https://mattermost.atlassian.net/browse/MM-54553 to track progress.

/cc @cpoile

kevev commented 12 months ago

@kevev Thanks. To confirm, does the mic start working again when re-opening the app in foreground or is it permanent?

Correct, bringing the app back to the foreground immediately restores mic audio.

wispoz commented 12 months ago

Yes same problem.

kevev commented 11 months ago

ETA on a fix? We have lots of Android users and are ramping up usage. :)

streamer45 commented 11 months ago

Hard to tell as I am not sure about the scope of the fix needed here. The team will assess next week more likely and will be then able to give a better update.

streamer45 commented 10 months ago

@cpoile Did we release this fix already? If so we can close, let me know.

cpoile commented 10 months ago

@streamer45 It's fixed on master and scheduled for release in mobile v2.10.0

streamer45 commented 10 months ago

Closing as this has been fixed in the latest release.