0

I am confused about GCM to FCM migration. I was sending data only, so I could wake up my app when it was closed, and got into onmessagereceive. With my migration to FCM, it no longer works, and saw following :

A service extending GcmListenerService is now required only for the following use cases: receiving messages with data payload only. WHat exactly needs to be maintained from the GCM part. Do I need to have both FCM and GCM in my manifest, and do I need to have both FCMlistenerservice AND GCMlistenerservice ? If only GCMlistenerservice is required, what is then the use of the FCM migration , and why is this data payload only not integrated in the FCM ? Thanks in advance Best regards Ludo Kustermans

AL.
  • 36,815
  • 10
  • 142
  • 281
  • You might want to check the migration document of GCM to FCM for [Android](https://developers.google.com/cloud-messaging/android/android-migrate-fcm) and [iOS](https://developers.google.com/cloud-messaging/ios/ios-migrate-fcm) and [FAQ for GCM and FCM](https://developers.google.com/cloud-messaging/faq). Also in the related [SO post](https://stackoverflow.com/a/37876727/5995040), it stated that you should not include the `notification` key in the `POST` payload, so all push messages are delivered to your `onMessageReceived`. Hope this helps. – Mr.Rebot Aug 28 '17 at 09:10
  • Hi AL, Thanks for your feedback. It is the migration document that states : A service extending GcmListenerService is now required only for the following use cases: receiving messages with data payload only(one of them). I am using a data payload only. I wonder what the meaning is of migrating to FCM if you still need to use a GCMlistenerservice instead(or together with ??) FCMlistenerservice. best regards . Ludo – Ludo Kustermans Aug 29 '17 at 19:55

0 Answers0