“TooManyMessages” Error coming from c2dm.intent.RECEIVE Intent

江枫思渺然 提交于 2019-12-06 14:50:20

问题


Does anyone have any documentation on this "TooManyMessages" error.

After I call the GoogleCloudMessaging send method I am getting an intent from com.google.android.c2dm.intent.RECEIVE with the following key/value pairs in the extras bundle.

Send error:
Bundle[{error=TooManyMessages, 
message_type=send_error, 
google.message_id=1, 
android.support.content.wakelockid=1}

回答1:


This means that too many messages were stored in the GCM server for a single device without being delivered (which might happen if your device was offline while many messages were sent by your server).

Once the number of such messages reaches the limit, which is 100 if you don't use a collapse key, they are deleted from the GCM server, and you get that error message, which informes you your device should sync with your server in order to get the lost messages.



来源:https://stackoverflow.com/questions/18932234/toomanymessages-error-coming-from-c2dm-intent-receive-intent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!