Reputation: 2528
Previously I used setSound(null) but with the new notification channels this doesn't work.
So I could create yet another channel (already have around 10) that says Notification Updates and set that one to a null value for sound? Is that the only way to work around this? And if the user is stupid enough (there are always some) to set a sound for this category he will get multiple sounds when we update the existing alert.
Upvotes: 3
Views: 980
Reputation: 19783
Have you tried using NotificationCompat.Builder.setOnlyAlertOnce()
?
Set this flag if you would only like the sound, vibrate and ticker to be played if the notification is not already showing.
It seems to do exactly what you want. :)
Upvotes: 12