-
Notifications
You must be signed in to change notification settings - Fork 862
Fix missing sounds on room notifications (messages, invitations, etc). #3786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Ringing on incoming Call only do a simple Notification Sound? I think in v1 there was ringing ???? |
Something I've noticed is that if you have "Sound" set to something in the ringing notification category (which I had, although I don't remember changing it), it will just play that sound, but if you set it to none, it will play the phone's normal ringtone. |
@DoM1niC @LinAGKar This PR is just related to room notifications like message notifications not having a sound (I 've updated the title to make that clearer). If you are seeing other notification issues (like calling) mind creating a new Issue with steps to reproduce? |
|
Hi. Edit: |
bmarty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
|
@bahur142 thanks for your test.
Let's merge the PR and see if the regression you are describing can be reproduced by others. |
|
Doesn't seem to work perfectly. Now with 1.2.2 I sometimes get double sounds, on Android 11 (which is an improvement over missed notifications, but still). |
|
I know this is an old request, but given the current state of the code, would anyone know of a (hopefully) quick way to only have the alert sound happen once? I'm trying to build an alternate version that simply plays the sound for each DM, as my kids and I use it, and they constantly miss notifications from messages. My original post is here: #5161 I am not an Android developer, so I know very little about it (so far), but am merely trying to change the behavior of the audible alerts from just the first alert (setOnlyAlertOnce) to an alert for EVERY DM. I'm able to get sounds for every DM currently, but as mentioned in this thread, the sounds are doubled for older devices. Would anyone have a solution? Many thanks. |
Old behaviour
On receiving of push notifications we do a background sync to fill in missing information in the push content.
Previously we would update the notification with a call to notify but with the sound disabled in an attempt to update the notification and avoid a second notify sound.
Depending on on the time it would take to do the background sync you would sometimes see different behaviours:
New behaviour
I am removing the modification of the notification
noisyproperty and as per this guide using thesetOnlyAlertOnceproperty on all group notifications other than the summary notification. So that any sounds on notifications are not silenced(or double fired) by updates. Child notifications continue to be rolled up into a single summary notification here.The behaviour also appears different across android versions. As reported in the issue it appears to affect versions 8+ but in those below it does not seem to cut off the notification on update.
I tested this on 7.0 and 8+ and is working across both.
I'll look for somebody else to test this on API < 24 as I don't have an old device and it's difficult to test push on the emulator for versions that old.
I'll also wait for this to be reviewed by @bmarty when he is available as I think he has most context on this code.
Fixes #3243