PushPad:Chrome不显示推送通知 [英] PushPad: Chrome doesn't display push-notifications

查看:202
本文介绍了PushPad:Chrome不显示推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题来自以下问题(请参见评论部分):

PushPad:网站被删除后,订阅被删除刷新

我在使用PushPad时遇到问题.我创建了一个项目,实现了代码等等.我的问题是我发给(台式机和移动版)的Chrome 不显示推送通知.使用Firefox,一切正常.我在发送通知的第二秒钟收到了通知.

I've got a problem using PushPad. I've created a project, implemented the code and so on. My problem is that Chrome does not display push-notifications I sent (desktop and mobile version). Using Firefox everything works fine. I get notifications displayed in the second I sent them.

一段时间后,我在Chrome开发人员工具(资源->服务工作者)中找到了功能模拟推送事件" .当我点击此按钮时,Chrome会显示我之前发送的推送通知.

After some time, I found the Function "Emulate Push Event" in the Chrome Developer Tool (Ressources->Service Worker). When I clicked this button, the push-notifications I sent before were displayed by Chrome.

因此,推送通知似乎是由PushPad发送并接收的,但不会自动显示,就像它们是由Service Worker排队一样?但是我的网站用户不必进入开发者控制台并单击该按钮即可接收通知(应该像Firefox中一样).

So the push-notifications seem to be send by PushPad and are received, but not displayed automatically, as if they are queued by the Service Worker? But my website users should not have to go into the Developer Console and click that button to receive the notifications (it should be like it is in Firefox).

我已经尝试使用我的项目ID" 和我的项目编号" (来自我的Google Project)作为我的 GCM发件人ID .两者都导致上述问题.而且我还生成了一个新的API密钥,并在我的Pushpad-Project中对其进行了更改,但没有任何更改.

I've already tried to use my "Project ID" and also my "Project Number" (from my Google Project) as my GCM Sender ID. Both result in the issue described above. And also I've generated a new API-Key and changed it in my Pushpad-Project but nothing changed.

我还注意到,当我使用 Pushpad DEMO 从官方Pushpad-Homepage发送演示通知时,也会出现相同的问题.它也排在队列中,只有在我按下开发者控制台中的按钮时才会显示.

I also noticed that the same issue results, when I use the Pushpad DEMO to send a demo-notification from the official Pushpad-Homepage. It is also queued and only displayed when I press the button in Developer Console.

我已经在2台不同的PC和一台装有Chrome的Nexus 4上进行了所有测试,但这始终是相同的问题.

I have tried all my tests on 2 different PC's and one Nexus 4 with Chrome, and it's always the same problem.

您有什么建议吗?也许(只是一个猜测)Pushpad提供的Service Worker出现了一些问题(与他们的HP一样)?

Do you have any suggestions? Maybe (just a guess) some issue with the Service Worker provided by Pushpad (as it is the same on their HP)?

推荐答案

我发现我在Google GCM API的凭据中插入了错误的 HTTP-Referrer .因此,通知没有显示.

I have found out that I had inserted the wrong HTTP-Referrer in the Credentials of my Google GCM API. Therefore the notifications were not displayed.

这篇关于PushPad:Chrome不显示推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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