GCM3 & FCM is backward compatible for GCM 2

2020-02-06 04:00发布

问题:

Right now i am using Google Cloud Messaging 2.0 by default its using myregistration_id in GCM version.Now i want move to FirbaseCloudMessaging or GoogleCloudMessaging 3. is both are backward compatible?

回答1:

The tokens are different. Firebase Cloud Messaging (GCM) use gets registration tokens from the Instance ID API which means you'll get different tokens between that and GCM2.

You'll need to send that new token back to your server to send messages. On the server side the APIs should be fully compatible (just new endpoints for FCM)