Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 谷歌Chrome云消息-多条消息_Google Chrome_Google Chrome Extension_Google Cloud Messaging_Chrome Gcm - Fatal编程技术网

Google chrome 谷歌Chrome云消息-多条消息

Google chrome 谷歌Chrome云消息-多条消息,google-chrome,google-chrome-extension,google-cloud-messaging,chrome-gcm,Google Chrome,Google Chrome Extension,Google Cloud Messaging,Chrome Gcm,我目前正在开发一个Chrome扩展,它使用Chrome提供的Chrome.pushMessaging API 我在扩展的后台页面中注册推送消息回调: chrome.pushMessaging.onMessage.addListener(pushMessageReceivedCallback); 问题是pushMessageReceivedCallback会立即被发送到扩展通道ID的最后四条消息击中。在我使用的计算机上,这种行为似乎相同 如果使用GCM消息,有什么方法吗?一旦我看到消息一次,我不

我目前正在开发一个Chrome扩展,它使用Chrome提供的Chrome.pushMessaging API

我在扩展的后台页面中注册推送消息回调:

chrome.pushMessaging.onMessage.addListener(pushMessageReceivedCallback);
问题是pushMessageReceivedCallback会立即被发送到扩展通道ID的最后四条消息击中。在我使用的计算机上,这种行为似乎相同

如果使用GCM消息,有什么方法吗?一旦我看到消息一次,我不希望每次加载扩展时它都不断到达

谢谢