2016-08-05 110 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); 
});