GCM Chrome: Empty Data Response

筅森魡賤 提交于 2019-12-14 04:26:00

问题


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: http://i.imgur.com/MkrIAzF.png and thats the received from the client: http://i.imgur.com/gSZtEiY.png

The Field "data" is everytime empty,


回答1:


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.



来源:https://stackoverflow.com/questions/37088397/gcm-chrome-empty-data-response

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!