genericUser
genericUser

Reputation: 7178

Disable FCM firebase push notification sound

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!

Upvotes: 4

Views: 2020

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317657

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.

Upvotes: 2

Related Questions