Reputation: 21
i am currently integrating gcm in my web application, the subscription and the registration_id saving working, i get on the client also the response, when i trigger a message from Postman. So now i need to transfer the title and the message. i am triggering the gcm api with this parameter: https://i.sstatic.net/PC0fs.png and thats the received from the client: https://i.sstatic.net/OdYHl.png
The Field "data" is everytime empty,
Upvotes: 1
Views: 604
Reputation: 10802
Despite using GCM as its push service, Chrome doesn't support payloads using the GCM method.
It supports payloads encrypted using the Web Push encryption standard. See also the blog post on the developers.google.com website.
You can either implement it yourself, or use a library such as web-push for Node.js or pywebpush for Python or web-push for PHP.
Upvotes: 4