I’m doing a few tests with push notifications with firebase.
Everything is working fine except the custom sound that I’m trying to set. It’s always the default sound which is playing.
platform.ready().then(() => {
this.firebase.getToken()
.then(token => console.log(`The token is ${token}`))
.catch(error => console.error('Error getting token', error));
this.firebase.onNotificationOpen().subscribe((response) => {
if(response.tap){
console.log("RECEIVED APP NOT OPEN")
}else{
console.log("RECEIVED APP OPEN");
}
)
}
});
And here is the POST that I’m sending.
{
"to" : "f1oXvN6v9W...",
"notification" : {
"body" : "an amazing body",
"title" : "an amazing title",
"sound" : "alarm" // I also tried with alarm.mp3
}
}
Of course, I put the file alarm.mp3 in platforms/android/app/src/main/res/raw/alarm.mp3
What am I missing ?