I have configured remote notifications, and everything is working as expected. Now I want to set a custom sound to my remote notifications. I have tried many ways but these are not working. I am using react-native-push-notification and react-native-firebase.
I have placed a custom sound file in android/app/src/main/res/raw/sound.mp3
.
I have also tried soundName:"sound.mp3"
I appreciate any help in this regard. Thanks. :)
Below is the sample Code:
PushNotification.configure({
onRegister: async function(token) {
},
onNotification: function(notification) {
console.log(notification);
},
senderID: 'xxxx',
permissions: {
alert: true,
badge: true,
sound: true,
},
playSound: true,
soundName: 'sound.mp3',
popInitialNotification: true,
requestPermissions: true,
});
}````