Reputation: 273
My application sending push notifications from the server to several user devices. Notification will valid for a certain time period in my app scenario. currently, all notifications go through my app, but I don't send this at all after given expiration time. Code to send on a user.
{
"to":"REGISTRATION_ID", // "to" replaces "registration_ids"
"notification": {
"title": "Portugal vs. Denmark”,
"body”: "5 to 1”
},
"time_to_live":"600"
}
Note: "time_to_live" attribute not works.
Upvotes: 5
Views: 7866
Reputation: 183
You should use the following as per this documentation: Setting the lifespan of a message.
"android": {
"ttl":"600s"
}
instead of
"time_to_live":"600"
Upvotes: 5