I have migrated my project from using GCM to use Firebase. Push notification comes through ok when the device is awake or been asleep recently but if I leave the device for
After struggling with a similar issue I managed to get it to work.
I send following json data through postman:
{
"data": {
"body": "Test body from curl"
},
"registration_ids": ["Token"],
"webpush": {
"headers": {
"Urgency": "high"
}
},
"android": {
"priority": "high"
},
"priority": 10
}
It seems like the last "priority":10 is what's fixing it for me.
I could not find any reference to this in the Firebase documentation, but in the deprecated GCM documentation it's used. https://developers.google.com/cloud-messaging/concept-options