无法获得GCM注册ID [英] Not able to get GCM registration ID

查看:92
本文介绍了无法获得GCM注册ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用chrome.gcm.register(senderID,注册回调)时,我得到了未被捕获的类型错误:无法读取未定义的属性'register',我是否需要向我的应用程序添加任何gcm配置,我是从chrome访问应用程序。



谢谢,



我尝试过:



在Chrome控制台中也尝试使用chrome.gcm.register,无法在控制台中看到hcm扩展名。

解决方案

chrome.gcm API适用于扩展程序和Chrome(OS)应用程序...如果您要查找来自Web应用程序的推送消息,请从此处开始:将推送通知添加到Web应用程序  | 网络  |  Google Developers [ ^

When I use chrome.gcm.register(senderID,Register callback), I m getting uncaught typeerror: Can't read property'register' of undefined, do I need to add any gcm configuration to my application, I'm accessing application from chrome.

Thanks,

What I have tried:

Tried with chrome.gcm.register in chrome console also, not able to see hcm extension in console.

解决方案

The chrome.gcm API is for extensions and Chrome (OS) applications... If you are looking for push messages from a web applications you should start here: Adding Push Notifications to a Web App  |  Web  |  Google Developers[^]


这篇关于无法获得GCM注册ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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