【问题标题】:Android - Firebase Cloud Messaging Device to Device Push Notification Without Server [duplicate]Android - Firebase Cloud Messaging Device to Device Push Notification without server [重复]
【发布时间】:2018-08-03 12:53:09
【问题描述】:

有没有办法在没有服务器的情况下在两台安卓设备之间发送推送通知?

我找到了一些教程,但它们都使用 node.js 发送通知。 (或者我发现一些使用 Firebase 控制台执行此操作的示例)

【问题讨论】:

    标签: android firebase firebase-cloud-messaging


    【解决方案1】:

    不,

    您需要一个“服务器”来进行推送通知。您可以使用各种服务来做到这一点,正如您提到的,firebase 就是其中之一。你可能不需要一个完整的服务器,但你需要某种服务来做到这一点,你不能简单地直接在设备之间发送通知:

    一些例子是:

    AWS Serverless functions

    Cloud functions in firebase

    如果您更愿意使用其中一项服务,则需要在您的应用中配置 FCM,您可以在 docs 中查看如何执行此操作。还有一些不错的示例代码here :)

    【讨论】:

      猜你喜欢
      • 2018-02-05
      • 2022-12-27
      • 1970-01-01
      • 2022-12-27
      • 2011-11-22
      • 1970-01-01
      • 1970-01-01
      • 2020-06-28
      • 2022-12-02
      相关资源
      最近更新 更多