Tag: notifications

使用node-gcm发送android通知而不折叠它们

我使用node-gcm向Android设备发送通知,在某些情况下,我需要发送带有通知的图像作为缩略图显示,如下所示: 缩略图通知 有时我需要发送没有缩略图的通知。 使用下面的代码,我可以发送通知中的图像,问题是当另一个通知收到时,他们崩溃,使新的一个覆盖已经存在的通知: var message = new gcm.Message({ "data" : { "title" : "Test", "message" : "Test message!", "priority" : 2, // Highest priority. "ledColor" : [255, 0, 0, 1], "content-available": "1", "image": req.body.notificationImageUrl, //<– image URL }, }); 但是,如果我设置如下的消息,我不能find一种方式发送图像,但通知不会崩溃,所有这些都出现。 另一个问题是,在这个版本中,led不会激活: var message = new gcm.Message({ data: { "priority" : 2, // Highest priority. […]