问题
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