【问题标题】:Firebase notification LED blinkFirebase 通知 LED 闪烁
【发布时间】:2016-12-12 00:04:03
【问题描述】:
我正在使用 Cordova 制作移动应用程序,并尝试通过 google's Firebase. 发送推送通知
我可以设置title、body、badge、sound 等,但我不知道如何设置 LED 在收到通知时闪烁。
我尝试使用localNotification,但它要求应用程序始终处于运行状态。
你们对如何解决这个问题有任何想法吗?
【问题讨论】:
标签:
android
cordova
firebase
push-notification
led
【解决方案2】:
这对我们有用,在服务器上使用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);
});