You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I always get the success message, but my phone never receives a notification. Here's my code
var regId = "XXXX";
var gcm = require('node-gcm');
// create a message with default values
var message = new gcm.Message();
// or with object values
var message = new gcm.Message({
collapseKey: 'demo',
timeToLive: 3,
data: {
key1: 'message1',
key2: 'message2'
}
});
var sender = new gcm.Sender('AIzaSyDIWlkp-Z5xvjpR8cLtg5_-MgcUI_7HRPs');
var registrationIds = [];
// At least one required
registrationIds.push(regId);
sender.send(message, registrationIds, 4, function (err, result) {
console.log(result);
});
Thanks
The text was updated successfully, but these errors were encountered:
I always get the success message, but my phone never receives a notification. Here's my code
var regId = "XXXX";
var gcm = require('node-gcm');
Thanks
The text was updated successfully, but these errors were encountered: