I have a simple query. I am implementing GCM notification in my application developed in meteor. The code goes as follows
var gcm = Meteor.npmRequire('node-gcm');
var sender = new gcm.Sender('MY_ID');
var message = new gcm.Message();
//message.addData('message',new Date().getTime());
message.addData({'title':'mytitle','message':new Date().getTime()});
message.delay_while_idle = true;
var registrationIds = [];
registrationIds.push("MY_REG_NO");
sender.send(message, registrationIds, 4, function (err, result) {
console.log(result);
});
Now when I call this method from client, I get a notification properly. But when I invoke this method again, the previous notification is overridden with the latest one. How can I show a list of notifications in the notification tray without overriding the previous ones?
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire