gpt4 book ai didi

android - 在 FCM for Chrome 中订阅主题

转载 作者:太空狗 更新时间:2023-10-29 16:13:12 24 4
gpt4 key购买 nike

我正在使用 FCM 发送推送通知。

当我知道它们的 ID 时,我能够成功地向一组设备发送通知。

但是现在,我想向此处提到的主题发送通知:https://firebase.google.com/docs/cloud-messaging/topic-messaging

他们很好地记录了服务器端。但我不确定如何在客户端订阅主题(我的客户端包括 chrome 打包应用程序、网络浏览器、适用于不同平台的基于 ionic 的移动应用程序。)

那么,总而言之,我该如何让用户订阅主题?

请帮帮我。提前致谢。

PS:我确实通过了How to get registered into GCM topics from javascript (for Chrome)How to implement Google Cloud Messaging - Topic Messaging in Chrome?但这并没有太大帮助。

最佳答案

更新:最近才宣布(2016 年 10 月 17 日),Firebase JavaScript library :

Today we're announcing web support for Firebase Cloud Messaging (FCM) with the release of a JavaScript library. This extends our current browser support, enables a dramatically simpler implementation process, and brings powerful features such as Topics and Device Group Messaging to the web.

--

With the FCM JavaScript library, you can send web push notifications to single devices, topics or groups of devices. With the addition of topic support on the Web, we are making it possible for developers to send a message to their Android, iOS and Web users who have opted in to a particular topic. To take advantage of topics and device groups, you can use the server-side APIs to manage your topics and groups subscriptions.

Setting Up the JavaScript Client App 的 Firebase 文档链接.


我查看了文档。 Chrome 的主题消息传递似乎仍不适用于 GCM 和 FCM

关于android - 在 FCM for Chrome 中订阅主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38085728/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com