Short version: is the intent com.google.android.c2dm.intent.REGISTRATION
still used at all or has it been completely deprecated by GCM?
Longer version: Google's gcm-demo-client
declares this intent in its filter, however, if I follow the same procedure, I get a valid registration id when I call gcm.register()
and then, my broadcast receiver receives an additional registration id because of the REGISTRATION filter, and this second registration id is bogus (I can't send any notification to it).
At this point, I'm considering removing the REGISTRATION
filter (and keeping just RECEIVE
) but I want to make sure I'm not missing something important in the protocol.
Even for the latest GCM version (aka GCM 3) the official GCM documentation warns about the need of this permission for push support on old devices:
You are probably looking at an older version of the official Google demo. The current version doesn't use
com.google.android.c2dm.intent.REGISTRATION
, as you can see here:You risk not receiving registration IDs for a small percentage of your users.
https://blog.pushbullet.com/2014/02/12/keeping-google-cloud-messaging-for-android-working-reliably-techincal-post/
Gotta love GCM. =)