There's a problem with my app and I don't know why: notification with Firebase doesn't work when the app is in the background, but they are fired once the app goes in the foreground. The problem is not how to handle them, but why when the app is in foreground notification popup are fired, but when are in the background not.
{
"notification" : {
"title" : "...",
"body" : "...",
"icon" : "...",
"sound" : "default"
},
"to": "...",
"priority" : "high",
"data" : {
...
}
}
This is a sample of the notification I tried to fire with the postman. Any ideas? Thanks