I have recently been trying to send push notification to my android and ios devices. For ios I found that node-apn module will be used for handling this,but for android I haven't e across anything of that sort. Any help will be much appreciated.
I have recently been trying to send push notification to my android and ios devices. For ios I found that node-apn module will be used for handling this,but for android I haven't e across anything of that sort. Any help will be much appreciated.
Share Improve this question edited Feb 24, 2016 at 19:39 Muhammad Reda 27k14 gold badges98 silver badges106 bronze badges asked Dec 18, 2012 at 6:48 Amanda GAmanda G 1,98111 gold badges33 silver badges44 bronze badges 1- Did you got the solution for this. I want node.js RESTful api for sending notification to mobile devices so that I can make use the services. – Vinod Kumar Marupu Commented Jun 28, 2016 at 12:55
2 Answers
Reset to default 6There is another alternative; android-gcm. It is super easy to use.
Code sample from 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) {});
Check these solutions for more info.
https://github./SpeCT/node-c2dm
https://github./Instagram/node2dm
https://npmjs/package/pushover