1

Is there any possibility to retrieve/get GCM message_id in service worker push event?

We have built an application to send browser push notification, and for notification data (title, body, image, etc.) we retrieve through our internal API. All seems working as expected, but we need to pass GCM message id to our API and according to GCM message_id we serve relevant notification data to requested service worker event.

Can anyone share your idea's or solution how to pass GCM message_id?

We tried a lot but haven't found any solution.

Jayesh Patel
  • 289
  • 3
  • 12
  • Maybe you can use another kind of ID (generated by your app) to identify the message and simply include it in the notification payload. – collimarco Sep 07 '17 at 19:41
  • @collimarco We already did, but it wont feasible solution for our notification message. Let me give you brief details why we need message_id, let assume that user getting multiple push notification at same time, our service worker received push event request from GCM and it will try to retrieve notification data from API server. At this point how we recognize which notification data we need to deliver on that request. It might be fetch irrelevant. Does this make sense for you. – Jayesh Patel Sep 08 '17 at 09:55
  • Any updates on this? Seems not possible... – Pavel Biryukov May 29 '20 at 15:07

0 Answers0