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

查看:120
本文介绍了我需要在客户端将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

但是从4月中旬开始:

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

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

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天全站免登陆