ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Depricated registration id #160

Closed minal2709 closed 8 years ago

minal2709 commented 8 years ago

Hey,

I see GCM has deprecated the registration ids. It uses tokens instead. This lib requires an update?

hypesystem commented 8 years ago

I am not sure I quite follow. According to the server ref Notification Keys are deprecated, but the registration_ids field is not. We support all of the available key types at the moment (topics, registration ids, notification keys).

eladnava commented 8 years ago

Google decided to rename the registration IDs in their documentation to registration tokens, which actually makes a lot more sense. However, they did leave the registration_ids parameter in the GCM API intact: https://developers.google.com/cloud-messaging/http-server-ref

registration_ids (String array) - This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration tokens.

If you wanted, you could update the docs and rename the IDs to tokens, but that's not really that important.

hypesystem commented 8 years ago

I think updating the docs would be great. There is the one issue of the named registrationIds argument we use. There should probably be an alias: registrationTokens.

eladnava commented 8 years ago

@hypesystem Good point. Here's what I'm planning to do:

What do you think?

hypesystem commented 8 years ago

:+1:

eladnava commented 8 years ago

@hypesystem Done. :+1:

eladnava commented 8 years ago

@hypesystem this can be closed.