【发布时间】:2017-11-23 06:15:01
【问题描述】:
我的应用程序将推送通知从服务器发送到多个用户设备。通知将在我的应用场景中的特定时间段内有效。目前,所有通知都通过我的应用程序,但在给定的到期时间后我根本不发送。 发送给用户的代码。
{
"to":"REGISTRATION_ID", // "to" replaces "registration_ids"
"notification": {
"title": "Portugal vs. Denmark”,
"body”: "5 to 1”
},
"time_to_live":"600"
}
注意:“time_to_live”属性不起作用。
【问题讨论】:
-
您可以在通知中添加自定义字段,并检查用户的设备是否已过期。如果有 - 那么就不要显示通知
标签: android push-notification firebase-cloud-messaging