Disable FCM firebase push notification sound
855
Since the documentation suggests that you can provide "the filename of a sound resource bundled in the app" it seems to me that you could get away with bundling a sound resource in your app that is effectively silent, and target that with this API.
Author by
genericUser
🔠looking for knowledge to grab 🤓 🎯 Learn, Contribute and Grow 🌱
Updated on December 25, 2022Comments
-
genericUser over 1 year
I'm using Node.js to send firebase push notification (FCM Firebase Cloud Messaging) and I cannot find a way to disable notification sound.
Firebase official descriptions doesn't help much in that cause (Firebase Notification Sound)
I have tried many payload combinations such as:
const payload = { notification: { title: 'title', body: 'text', sound: 'disable' } }
And
const payload = { notification: { title: 'title', body: 'text', sound: '' } }
But none of them silent my messaging. Thanks in advance!
-
genericUser over 3 years"Sounds" much more sophisticated than it should be :) Thanks for your fast reply but I'm sure there is a better solution somewhere.
-
Doug Stevenson over 3 yearsIf it's not in the documentation, then the solution you're looking for might not exist. If that's the case, you can file a feature request with Firebase support. support.google.com/firebase/contact/support
-
genericUser over 3 yearsI have opened a request, but it's much more complicated than adding a silent mp3 file. You have to configure an android channel_id, make a different file for ios and much more... it's not makes any sense that firebase team does not support sound disable. They are already supporting this on their own website (on cloud messaging category).
-
genericUser over 3 yearsIn addition I have looking to lower the notification priority in order to silent notification, but it is not supported on android (In android you have only "normal" and "high" priorities and both of them are making sounds).