小编Mah*_*ani的帖子

使用新的 firebase API 向特定设备发送消息

我正在编写一个新的服务器应用程序(使用 .net)来向客户端(主要是 android 设备)发送通知,并且我正在使用来自 firebase 云消息传递的新 Http v1 api,我看到以下 Post 请求正文来发送主题通知

{
  "message": {
    "topic": "news",
    "notification": {
      "title": "Breaking News",
      "body": "New news story available."
    },
    "data": {
      "story_id": "story_12345"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

但是,我将如何使用 FCM Id 向特定设备发送通知?

注意:我已经使用旧 API 实现了向单个设备发送通知。

firebase firebase-cloud-messaging

1
推荐指数
1
解决办法
6788
查看次数

标签 统计

firebase ×1

firebase-cloud-messaging ×1