2016-08-05 131 views
6

我正在使用Cordova制作移动应用程序,并试图通过Google的Firebase发送推送通知。Firebase通知LED闪烁

我可以设置title,body,badge, sound等,但我不知道如何设置LED闪烁时收到通知。

我试过使用localNotification,但它需要应用程序始终运行。

你们有没有关于如何解决这个问题的想法?

回答

0

这工作对我们来说,在服务器上使用node-gcm

var gcm = require('node-gcm'); 
var push = new gcm.Message({ 
    data: { 
    title: 'Your app', 
    message: message, 
    ledColor: [215, 138, 138, 1], //show a blinking LED with given color in ARGB format 
    }, 
}); 
gcmSender.send(push, [token], function(err, res) { 
    console.log(res); 
});