I am sending push notification from Firebase to my Android application, but it is only playing the default sound when the notification is recieved.
I have set the custom sound param {“sound”:”notificationsound.mp3”} in the fcm notification object and the file is present in the res/raw folder according to (https://firebase.google.com/docs/cloud-messaging/http-server-ref)
But It’s still playing the default sound on all app states (background, foreground and killed).
This is my request body for sending the notification on Android :
{
"to" : “some id”,
"notification": {
"title":"asdasd",
"body":"sdsad",
"click_action" : "MAIN",
"sound":"notificationsound.mp3"
},
"data": {
"title" : "Something",
"body" : "Important",
"type" : "message"
},
"priority": "high"
}
What I can do to play the custom notification sound.