-
Notifications
You must be signed in to change notification settings - Fork 742
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
Update notifications rules: make a sound for each notification #5796
Conversation
Unit Test Results122 files + 8 122 suites +8 2m 3s ⏱️ +44s Results for commit f188eb6. ± Comparison against base commit 7c7822a. This pull request removes 9 and adds 12 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
some things to look out for when making changes to this area
Hopefully the combination of all fixes in this area might have solved these without |
for #1673 - tested locally on a mi band 5 and can confirm there's no regression however #4152 returns, a way to test this locally is to apply a delay to https://github.com/vector-im/element-android/blob/develop/vector/src/gplay/java/im/vector/app/gplay/push/fcm/VectorFirebaseMessagingService.kt#L174 coroutineScope.launch {
delay(5000)
session.requireBackgroundSync()
} to avoid double notifications we'll need to further refine the notifications to dynamically enable |
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.
After some tests with an emulator Pixel 3a Android 12, I frequently have 2 notification sounds per message. I don't know how notifications work on the project but it may be worth to check/add logs when notify()
is called on the NotificationManager
for a single message.
@mnaturel I didn't reproduce your bug with an emulator. |
After some tests on real device (Nokia 7.2, Android 11) I could not reproduce the double notification bug. I suspect it may happen sometimes on very high connectivity. |
To clarify the double the notification, the notification UI is correct but two pings will be triggered for each message that goes through the fastlane flow (push from server -> fetch message directly -> notify message -> request sync -> sync finds new messages and notifies again) https://github.com/vector-im/element-android/blob/develop/vector/src/gplay/java/im/vector/app/gplay/push/fcm/VectorFirebaseMessagingService.kt#L174 The double ping will only happen if the sync triggered by the push returns after the |
Thanks @ouchadam for your explanation, it's more clear now. |
ultimately my gut feeling is that we'll need to dynamicly apply the there's a few changes needed to enable this
|
thanks for the update, can confirm it's working for me locally 💯 |
changelog.d/46312.misc
Outdated
@@ -0,0 +1 @@ | |||
Use the same notification rules than web / iOs client |
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.
is it worth calling out that the change will mean we will notify for all (new) messages?
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.
yes we can, i update the message
Type of change
Content
#4632
Align notification experience to web / ios client.
Notify with noise for each notification.
Motivation and context
Screenshots / GIFs
Tests
Tested devices
Checklist