mattermost / mattermost-plugin-calls

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

Issue - New ring sound feature only plays when Mattermost app is active #857

Open ageekhere opened 1 month ago

ageekhere commented 1 month ago

App version 2.19.0 Mattermost Version: 9.10.1 Android IOS

The new ring sound feature for mobile only plays when the Mattermost app is running and opened on the phone, it does not play when the phone's screen is off or if the Mattermost app is running in the background.

What should happen, If the option is selected the ring sound should play under all conditions when the Mattermost app is running in the background (phone screen is locked, using another app, watching a video etc ) .

Please confirm if you are able to recreate this issue.

amyblais commented 1 month ago

Opened https://mattermost.atlassian.net/browse/MM-60301.

streamer45 commented 1 month ago

@ageekhere This is by design. We can't ring while the app is not active. To get it ringing like a phone call we'd need to integrate much deeper into the system (i.e., using CallKit).

We have a couple of improvements we are tracking (e.g., https://mattermost.atlassian.net/browse/MM-59470 and https://mattermost.atlassian.net/browse/MM-54765) but nothing in the roadmap right now.

/cc @cpoile @matthewbirtch

ageekhere commented 1 month ago

@streamer45 For android could ConnectionService be used? https://developer.android.com/reference/android/telecom/ConnectionService

streamer45 commented 1 month ago

Indeed, we'd need to use something like that for the Android side.

ageekhere commented 1 month ago

I did a bit of research and chatgpt, here is the basic code of how to add ringing when the phone is locked. Maybe it could be used as a base for this feature or at least give some ideas to developers who know what they are doing.

ConnectionService ConnectionService.txt

Callkit CallKit.txt