GCM Chrome:空数据响应 [英] GCM Chrome: Empty Data Response

查看:211
本文介绍了GCM Chrome:空数据响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将gcm整合到我的web应用程序,订阅和registration_id保存工作中,当我触发邮递员邮件时,我也收到客户的回复。所以现在我需要转移标题和消息。
i用这个参数触发gcm api: http://i.imgur.com/MkrIAzF。 png ,这是从客户端收到的: http://i.imgur.com/gSZtEiY。 png



字段data每次都是空的,

解决方案

它支持使用 Web推送加密标准。另请参阅developers.google.com网站上的博文。

您可以自己实现它,也可以使用库网络推送或为Python推送 pywebpush 或PHP的网络推送


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,

解决方案

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.

这篇关于GCM Chrome:空数据响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆