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.31k stars 206 forks source link

I've device_id, how to I get registration_id? #130

Closed technotip closed 9 years ago

technotip commented 9 years ago

I'm building my app using cordova / ionic, I can get device ids, but I din't see any method to get the registration_id from GCM via node-gcm.

Can anyone guide me how to get registration_id from GCM by sending device_id's.

hypesystem commented 9 years ago

I'm sorry I don't know anything about Cordova, and this isn't an issue that has anything to do with this library, so I'm closing it.

I would recommend asking your question on StackOverflow

technotip commented 9 years ago

I'm confused now. How is it not related to the library!

I'm not asking any doubt regarding Cordova or Ionic here.

Since the library is interacting with GCM service, I want to know how do I pass device_id and get registration_id from GCM via node-gcm.

hypesystem commented 9 years ago

You don't use this library to get a registration id. You have to generate the registration id locally on your device. I don't know how this is done using Cordova, but how to do it using native Android apps can be found here: https://developers.google.com/cloud-messaging/android/client