php - 有没有办法在从 php 服务器发送的 Firebase 通知中实现 "expiration"时间?

标签 php android curl firebase firebase-cloud-messaging

我已经实现了一个 php 服务器,它向订阅了我的 Firebase 项目的特定主题的用户发送 Firebase 通知。

有效。

在 Firebase 的控制台中,可以设置通知的“过期时间”(从 1 分钟到 4 周)。

有没有办法在我的 php 服务器中也插入这种可能性?

谢谢

最佳答案

我认为您正在寻找 time_to_live参数:

This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message.

关于php - 有没有办法在从 php 服务器发送的 Firebase 通知中实现 "expiration"时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42177111/

相关文章:

android - 无法在服务器端使用 Uber 刷新 token 重新生成 Uber 访问 token

ruby-on-rails - 使用 curl 访问实现设计的 Rails 应用程序的后端 API

php - 将值设置为 NULL 而不是 'NULL'

php - Laravel 表单输入不需要

android - 将系统应用程序替换为您自己在android上修改的应用程序

android - 从 Android 中的 GridLayout 和 EditBox 中删除默认焦点颜色

php - mysql查询获取2个日期之间的第一个特定日期

php - 为什么在 PHP 中使用 PDO 而不是 MySQL?

javascript - react native 相机在导航时变成空白

http - 如何使用格式为 "filter[name]=foo"的查询字符串参数进行 curl