Use GCM Token for push messages in FCM

前端 未结 3 1551
再見小時候
再見小時候 2021-01-06 13:53

Currently we have devices using old GCM implementation.

Does anyone know if it\'s possible to use old existing GCM tokens when sending push messages using firebase c

相关标签:
3条回答
  • 2021-01-06 14:30

    Does anyone know if it's possible to use old existing GCM tokens when sending push messages using firebase cloud messaging APIs?

    Yeah that is possible. FCM and GCM messaging api are the same. The only thing that is different is the url (gcm-http.googleapis.com/gcm/ vs fcm.googleapis.com/fcm/) but they point to the same server.

    Also see server endpoints documentation.

    0 讨论(0)
  • 2021-01-06 14:31

    Yes we can use GCM token to push on FCM. See the below explanation:

    Your GCM and FCM registration tokens are mutually interchangeable; you can send to existing GCM tokens through the FCM HTTP server APIs.

    https://developers.google.com/cloud-messaging/faq

    0 讨论(0)
  • 2021-01-06 14:45

    GCM token and firebase token are not the same. I did a test and subscribed to both services and saw that both tokens are different. you'll have to be very careful when using tokens to make sure. some 3rd party libraries still want to use GCM tokens while others are using firebase.

    further, if you take a GCM token and try to use it in the firebase cloud messaging console to send a message, it might not be received by the android client. this was my case. i had to ensure i had a FCM token.

    0 讨论(0)
提交回复
热议问题