Migration issue from GCM to FCM Android

438 Views Asked by At

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.

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. Now as GCM is still there running on server for older builds, I still receive GCM messages in FCM onMessageReceived().

2

There are 2 best solutions below

1
Vishwajit Palankar On

According to fcm faq

FCM is the new version of GCM under the Firebase brand. It inherits GCM’s core infrastructure to make sure we continue to deliver messages reliably on Android, iOS and Chrome.

So it may give you the gcm messages as well

1
Garg On

Can fallow up this official Migration doc Google Cloud messaging to Firebase cloud messaging.

please see the guides for migrating in Android.