简体   繁体   English

从GCM迁移到FCM Android的问题

[英]Migration issue from GCM to FCM Android

I need a good solution on how can I handle/support GCM for older version builds as well as have FCM for new versions in my android app. 我需要一个很好的解决方案,说明如何在我的android应用中如何处理/支持旧版本的GCM以及新版本的FCM。

Problem that I am facing is, when my app is upgraded from GCM to FCM successfully, i still receive GCM message on new version builds even if i have removed all the receivers and code for it. 我面临的问题是,当我的应用程序成功从GCM升级到FCM时,即使我已经删除了所有接收器并为其编写了代码,我仍会在新版本的构建中收到GCM消息。 Now as GCM is still there running on server for older builds, I still receive GCM messages in FCM onMessageReceived(). 现在,由于GCM仍在服务器上运行,以进行较早的构建,因此我仍然在FCM onMessageReceived()中接收GCM消息。

According to fcm faq 根据fcm常见问题解答

FCM is the new version of GCM under the Firebase brand. FCM是Firebase品牌的GCM的新版本。 It inherits GCM's core infrastructure to make sure we continue to deliver messages reliably on Android, iOS and Chrome. 它继承了GCM的核心基础架构,以确保我们继续在Android,iOS和Chrome上可靠地传递消息。

So it may give you the gcm messages as well 所以它也可能给您gcm消息

Can fallow up this official Migration doc Google Cloud messaging to Firebase cloud messaging. 可以将此官方迁移文档Google Cloud消息传递到Firebase云消息传递。

please see the guides for migrating in Android . 请参阅Android迁移指南。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM