从 GCM 迁移到 FCM 对当前生产应用程序的影响

Migration from GCM to FCM effects on current porduction apps

我有一个在生产环境中运行的 android 应用程序,但我不知道如何从 GCM 迁移到 FCM。我没有旧 GCM 应用程序的副本来探索该过程。所以,我担心的是:如果我尝试将现有应用程序上传到 firebase 并创建一个新的 firebase 项目,我的现有 GCM 项目是否会受到影响,因此这样做是否会使我的应用程序停止支持我的用户使用 GCM 服务?

任何帮助表示感谢, 艾欣

如果您想 migrate a GCM Client App for Android to FCM,请记住:

  • GCM and FCM SDKs cannot co-exist within an application.
  • GCM tokens retrieved via GoogleCloudMessaging.register() or InstanceID.getToken() will continue to work in FCM without any modification or renewal.

因此,如果您想将 GCM 应用程序及其用户迁移到现有的 FCM 项目中,则必须执行一些特殊步骤。

These special steps are required because the existing Firebase project will not be able to send messages to tokens belonging to a completely separate GCM project. Until all client app instances upgrade to your Firebase app, you'll need to create a mapping between old GCM tokens and the Firebase project.

有关详细信息,请参阅此文档以了解如何 Migrate GCM to an existing Firebase project