我想注册一个镀铬的应用程序获得注册ID,所以我测试,但铬的JavaScript控制台显示:无法注册的Chrome应用的GCM
遗漏的类型错误:无法读取属性“注册”的undefined
我不知道什么是错的。我得到的例子来自:https://github.com/GoogleChrome/chrome-app-samples#push-messaging
我想注册一个镀铬的应用程序获得注册ID,所以我测试,但铬的JavaScript控制台显示:无法注册的Chrome应用的GCM
遗漏的类型错误:无法读取属性“注册”的undefined
我不知道什么是错的。我得到的例子来自:https://github.com/GoogleChrome/chrome-app-samples#push-messaging
似乎你的Chrome API没有加载。
您需要确保您的Chrome API已加载才能使用推送消息传递方法。
为了正确加载Chrome API,请按照the step 5 in Chrome developer page启动您的应用或扩展程序。对于一些较新的Chrome浏览器,你可以去Settings -> Extensions -> Load unpacked extension