GCM重复的报文

编程入门 行业动态 更新时间:2024-10-11 05:24:04
本文介绍了GCM重复的报文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个基于谷歌云消息传递的应用程序,它运作良好。现在,突然之间(今天)一切开始有我们从未见过的一个问题。用于设备之间发送的每个消息中,接收装置将获得它的两倍。第一个将几乎立即到达(发送的少于3秒内)。第二个到达,几分钟后。有在测试两个装置,但问题是相同的哪一个是所述发送/接收器。因此,如果一个设备发送一些消息给对方,对方就会得到它们pretty的多即刻 - 但随后在稍后的时间,它会收到它们的消息的它已经接收到第二拷贝信息的一连串

I have an app based on Google Cloud Messaging and it was working well. Now (today) all of a sudden it started having a problem we've never seen before. For each message sent between devices, the receiving device will get it twice. The first will arrive almost instantly (within less than 3 seconds of sending). The second arrives a few minutes later. There are two devices in the test, the problem is the same whichever one is the sender/receiver. So if a device sends a few message to the other, the other will get them pretty much instantly--but then at a later time, it will receive a barrage of messages which are the second copies of the messages it has received.

我已经把断点,以确保发送设备是不是罪魁祸首:邮件的发送一次(即Web服务发送被调用一次 - 和code的后端,它运行在谷歌应用程序引擎,并没有改变的年龄)。然而,该消息在某种程度上被传递到接收设备的两倍。通过使用断点我也确信我们自己的code对接收方概不负责:验证了 GCMIntentService ::的onMessage()确实被调用两次,每次发送的邮件。

I have put in breakpoints to make sure that the sending device wasn't the culprit: the message was sent exactly once (i.e. the web service for sending was called exactly once--and the code for the backend, which runs on Google App Engine, hasn't changed for ages.) However, the message somehow gets delivered to the receiving device twice. By using breakpoints I also made sure our own code on receiving side isn't responsible: it is verified that GCMIntentService::onMessage() indeed gets invoked twice for each sent message.

我们还相信在我们的数据库中的注册ID是最新的。在这一点上我很为难,需要思想做任何进一步的进展。因此,任何想法?

We also made sure the registration id in our database is the latest. At this point I'm stumped and need ideas to make any further progress. So any ideas?

推荐答案

groups.google/forum/#​​!topic/android-gcm/EHZUTEJMeyw

检查高于官方GCM线程。每个人都遇到此问题。谷歌的错!

Check the official GCM thread above. Everyone is experiencing this issue. Google's fault!

更多推荐

GCM重复的报文

本文发布于:2023-11-27 22:20:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639821.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报文   GCM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!