gpt4 book ai didi

android - GCM 到 FCM 迁移

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:11:48 25 4
gpt4 key购买 nike

我有一个运行良好的 Android 应用程序,有超过 10 万名用户使用旧的 GCM API key 接收通知。我想升级我们的服务器以使用 FCM,但我不确定我是否可以生成新的 Firebase API key ,同时让旧客户端使用 GCM。看起来,我必须用我的应用程序创建一个新项目并使用那里生成的 API key ,但它会禁用我的旧 GCM API key 吗?

最佳答案

几个月前,我们将我们的应用程序从 GCM 迁移到了 FCM。那时我们每月有超过 100 万活跃用户,这对我们来说是一次非常紧张的迁移。

按照迁移指南,您需要将 GCM 项目导入为 Firebase 项目,并在应用中进行大量更改。

我们对生成的 google-services.json 与之前版本中的内容进行了 git-diff/比较,并确认 API key 未更改。

对我们来说,这是 100% 向后兼容的无缝迁移。

自 2019 年 3 月起,您还必须迁移后端服务。


2018 年 1 月:

Updating these endpoints is not strictly required, as Google will continue to support the existing GCM endpoints.


2018 年 11 月(归功于@JonEgerton,看起来他们最终倾向于放弃对它的支持):

The FCM equivalent of the GCM HTTP protocol is labeled "legacy" only to distinguish it clearly from the HTTP v1 API. The API is fully supported and Google has no near-term plan to deprecate it.

2019 年 3 月:

We will turn off most GCM services in April 2019, so you should plan to have most of your services migrated by then.

Note that client SDKs and GCM tokens will continue to work indefinitely. However, you won't be able to target the latest version of Google Play Services in your Android app unless you migrate to FCM. ref: https://developers.google.com/cloud-messaging/faq

关于android - GCM 到 FCM 迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48193271/

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