从GCM迁移到最新的FCM,但获得相同的令牌 [英] Migrating from GCM to latest FCM but get the same Token

查看:73
本文介绍了从GCM迁移到最新的FCM,但获得相同的令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经将我的其他APP从GCM升级到FCM,并且当用户已经在其设备上安装了该应用时,他们在迁移后第一次打开时,我假设他们获得的FCM令牌与原始GCM令牌不同(抱歉,我不太确定,这是很久以前的事情了.在该应用中,FCM版本为11.8.0.

I used to upgrade my other APP from GCM to FCM, and when the user already installed the App on their device, the first time they open after migration, I assumed they get FCM token that is different from the original GCM token (Sorry I'm not very sure, it's a long time ago). In that App, the FCM version is 11.8.0.

现在在我当前的迁移应用中,我正在从GCM迁移到最新的FCM版本17.3.4.当我尝试复制并粘贴代码时,发现需要在此过程中进行一些安排.所以我遵循: 不推荐使用FirebaseInstanceIdService Firebase( FCM)如何获取令牌.

And now in my current migrating App, I'm migrating from GCM to the latest FCM version which is 17.3.4. When I tried to just copy and paste my code, I found out I need to make some arrangements along the way. So I followed: FirebaseInstanceIdService is deprecated and Firebase (FCM) how to get token.

但是现在我们公司的测试人员告诉我,我发送到服务器的新FCM令牌与旧GCM令牌相同.我只是想知道这是否正常,所以我看不到有人问同样的问题,只是想确保我没有错过任何事情或做错了什么,所以在此先感谢您.

But now the tester in our company told me the new FCM token I send to the server is the same as the old GCM token. Just wondering if this is normal or not, I don't see anyone asking the same question and just trying to make sure I didn't miss anything or do something wrong, thanks in advance.

推荐答案

注册令牌是"隐式链接到软件包生成它的应用程序+设备的名称"-因此,如果该设备用于同一应用程序和同一项目,则返回相同的令牌是合理的.即使答案已经很老了(GCM时代),我相信这种行为仍然存在.这是有道理的,因为 GCM和FCM的向后兼容性仍然有效( 查看全文

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