我需要在客户端将 GCM 迁移到 FCM 吗? [英] Do I need to migrate GCM to FCM on client side?

查看:21
本文介绍了我需要在客户端将 GCM 迁移到 FCM 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Play 商店中有旧的 android 应用程序,由于制作了一个新应用程序,我将不再更新它.

I have the old android app on Play Store which I am not going to update anymore because of making a new app.

我是否需要在我的旧 Android 应用中将 GCM 迁移到 FCM?

许多消息来源说:

你必须改变你的客户端......blabla......等等......

You have to change your client side... blabla... etc...

GCM 和 FCM 常见问题解答 说:

GCM 令牌将继续在客户端设备上工作.

GCM tokens will continue to work on client devices.

推荐答案

在可预见的将来,接收通知的客户端应用程序的现有安装将继续工作.您不需要为所有用户获取新令牌.GCM 的现有令牌将继续工作

Existing installs of client-side apps receiving notifications will continue to work for the foreseeable future. You don't need to get new tokens for all users. The existing tokens from GCM will continue to work

但是从四月中旬开始:

  1. 您将无法再在较新的 SDK/Google Play 服务上使用旧的客户端 API 编译代码
  2. 您将无法再调用 GCM REST API 来发送消息
  3. 新安装的使用 GCM 的现有应用可能无法获得令牌.

要针对新的 SDK/Google Play 服务进行编译,您需要对客户端应用进行更改,以便从 GCM 迁移到 Firebase Cloud Messaging.这涉及到对 build.gradleAndroidManifest.xml 和您的代码的更改,如 将适用于 Android 的 GCM 客户端应用迁移到 Firebase 云消息传递.

To compile against the new SDK/Google Play Services, you will need to make changes to your client app to migrate to Firebase Cloud Messaging from GCM. This involves changes to the build.gradle, to AndroidManifest.xml and to your code, as described in Migrate a GCM Client App for Android to Firebase Cloud Messaging.

这篇关于我需要在客户端将 GCM 迁移到 FCM 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆