Posting GCM notification to existing C2DM registration ids

爱⌒轻易说出口 提交于 2019-12-10 11:58:39

问题


I am wondering if it is possible to use the new GCM mechanism and post notifications to my existing registration IDs that are based on C2DM?

The migration/GCM documentation didn't touch on this part, but it's implied that it may not work because it mentioned we have to store the GCM registration ids separately from C2DM registration ids.

This also means that to migrate to GCM, we need to maintain two sets of registration ids, and use two separate calls (GCM and C2DM) for a foreseeable future, am I right?


回答1:


Just tried an experiment myself, while using GCM to send messages to registration ids that were created by C2DM, I get the error 'MisMatchedSenderId'. This makes sense, since the older C2DM uses an email address as sender ID, while the new GCM uses an API key.

So it looks like two sets of registration ids has to be maintained until all apps has been upgraded to use the new GCM.



来源:https://stackoverflow.com/questions/11237289/posting-gcm-notification-to-existing-c2dm-registration-ids

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