I use node-gcm for push notification android with cordova.
When I execute node file I recevie success in terminal but not receive notification to device.
my node-gcm code :
var sender = new gcm.Sender(myGoogleApiKey);
var message = new gcm.Message();
message.addData('title','testdarinodegcm');
message.delay_while_idle = 1;
var registrationIds = [];
registrationIds.push(myId);
sender.send(message, registrationIds, 4, function (err, result) {
console.log(result);
});
Thanks for your help.
答案 0 :(得分:0)
Check that you are receiving a token in the device after you have registered the device to the service, and then add it to the registrationIds.
If you receive a token and you are sending the right one, and of course registered to the service, it should all work.