I am not getting any sound when i get any notification from fcm . Even I also not get default sound.
Everything works fine but There is no sound in any notification.
PushNotification.configure({
onRegister: function(token) {
console.log('TOKEN:', token);
}.bind(this),
onNotification: function(notification) {
console.log('NOTIFICATION:', notification);
},
permissions: {
alert: true,
badge: true,
sound: true,
},
senderID: '256504080411',
requestPermissions: true,
});
Using in constructor of App.js
versions
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-push-notification": "^3.1.9"
i am sending payload from my server
notification: {
title: 'Title of your push notification',
body: 'Body of your push notification',
playSound: true,
soundName: 'default'
},
Anyone please help me
陌f you're using iOS while app is open, it will not give you sound. in background it will.
No I am using Android.
i have the same issue
i have the same issue
Better To use react-native-firebase
It's more mature
I was having the same problem.
In your notification, try setting "sound":"default". (instead of "playSound"). That seemed to do the trick for me.
I was having a similar issue with sound not working in background notifications. The fix was to pass correct FCM payload.
See here: https://github.com/zo0r/react-native-push-notification/issues/1868#issuecomment-784338446
Most helpful comment
Better To use react-native-firebase
It's more mature