有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java使用Firebase云消息传递创建每日推送通知

在Firebase控制台中,我们可以设置发送通知的具体时间和日期。但是有没有一种方法可以让我们每天都进行设置呢?例如,它将在每周一、周三和周五或每天发送


共 (3) 个答案

  1. # 1 楼答案

    If you want to schedule functions to run at specified times, use functions.pubsub.schedule().onRun() This convenience method creates a Google Cloud Pub/Sub topic and uses Google Cloud Scheduler to trigger events on that topic, ensuring that your function runs on the desired schedule.

    https://firebase.google.com/docs/functions/schedule-functions

  2. # 2 楼答案

    FCM现在提供定期消息。可能对某人有帮助

    Daily

    custom

  3. # 3 楼答案

    带有Firebase通知的推送活动可以立即发送,也可以稍后发送(已计划)

    您可能会切换到Firebase Cloud Messaging,使用他们的HTTP API,然后构建一个cron脚本,在这些天自动触发通知

    或者改用更成熟的产品,比如Parse Server、Batch。com或其他任何东西,因为它们通常提供每日/每周/每月定期推送通知功能