Reputation: 169
I'm trying to send Push Notifications via C2DM / GCM to an Android Application via PHP. No matter which i use, i keep getting the following :
For GCM : {"multicast_id":7672049265453358197,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
For C2DM : Error=InvalidRegistration
After reading allot about this issue all day I'm still clueless as to why this is an InvalidRegistration as if i take the registatoin_id and use it to send a test push message via Urban Airship it works.
Any help would be appreciated.
Upvotes: 0
Views: 1511
Reputation: 1702
If you copied the apid
from UrbanAirship then that's the problem:
http://docs.urbanairship.com/reference/glossary.html#term-apid
Airship Push Identifier
APID
APIDs identify devices with transient registration IDs, such as Windows devices. These identifiers are version 4 UUIDs, and are 36 characters long, including dashes.
You need to get the device information from http://docs.urbanairship.com/api/ua.html#get--api-apids-(APID) in the "gcm_registration_id"
property. That's the registration id needed.
It seems you need to then keep track of that registration id as it is transient as suggested by UrbanAirship. But that's another topic.
Upvotes: 1