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 come across anything of that sort. Any help will be much appreciated.
There 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.com/SpeCT/node-c2dm
https://github.com/Instagram/node2dm
https://npmjs.org/package/pushover.net
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With