firebase - GCM3 和 FCM 向后兼容 GCM 2

标签 firebase google-cloud-messaging firebase-cloud-messaging

现在,我默认使用 Google Cloud Messaging 2.0,它在 GCM 版本中使用我的registration_id。现在我想迁移到 FirbaseCloudMessaging 或 GoogleCloudMessaging 3。 两者向后兼容吗?

最佳答案

token 不同。 Firebase 云消息传递 (GCM) 使用从 Instance ID API 获取注册 token 这意味着您将获得 GCM2 和 GCM2 之间不同的 token 。

您需要将该新 token 发送回您的服务器才能发送消息。在服务器端,API 应该完全兼容(只是 FCM 的新端点)

关于firebase - GCM3 和 FCM 向后兼容 GCM 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37325366/

相关文章:

android - 在推送通知事件中维护父 Activity

javascript - TypeError : Cannot read property 'toString' of undefined at Geolib. isDecimal

ios - 通过同一个 Firebase 项目向多个应用程序传送 PushNotification、FCM

android - Google Cloud Messaging 上的最大主题数

java - GCM :Device can send message but not registered

javascript - Firebase 消息传递错误 : using service worker before get token

firebase - 从 Chrome 应用程序使用 Firebase 时出错

java - 将现有 POJO 对象存储在 Firebase 数据库中的最佳实践

javascript - Vuetify 密码与 v-text-field 标签重叠

swift - 在 Swift 中从 Radius 中的 GeoFire 检索 key