There is another alternative; android-gcm . It is very easy to use.
Example code from the documentation:
var gcm = require('android-gcm'); // initialize new androidGcm object var gcmObject = new gcm.AndroidGcm('API_KEY'); // create new message var message = new gcm.Message({ registration_ids: ['x', 'y', 'z'], data: { key1: 'key 1', key2: 'key 2' } }); // send the message gcmObject.send(message, function(err, response) {});
Muhammad reda
source share