Commit ec674ea7 by Alexandre Laurent Committed by Sebastián Katzer

Android: Ability to disable notification led (#864)

parent d9ac383b
...@@ -117,6 +117,7 @@ public class Builder { ...@@ -117,6 +117,7 @@ public class Builder {
public Notification build() { public Notification build() {
Uri sound = options.getSoundUri(); Uri sound = options.getSoundUri();
int smallIcon = options.getSmallIcon(); int smallIcon = options.getSmallIcon();
int ledColor = options.getLedColor();
NotificationCompat.Builder builder; NotificationCompat.Builder builder;
builder = new NotificationCompat.Builder(context) builder = new NotificationCompat.Builder(context)
...@@ -127,8 +128,11 @@ public class Builder { ...@@ -127,8 +128,11 @@ public class Builder {
.setTicker(options.getText()) .setTicker(options.getText())
.setAutoCancel(options.isAutoClear()) .setAutoCancel(options.isAutoClear())
.setOngoing(options.isOngoing()) .setOngoing(options.isOngoing())
.setColor(options.getColor()) .setColor(options.getColor());
.setLights(options.getLedColor(), 100, 100);
if (ledColor != 0) {
builder.setLights(ledColor, 100, 100);
}
if (sound != null) { if (sound != null) {
builder.setSound(sound); builder.setSound(sound);
......
...@@ -242,7 +242,7 @@ public class Options { ...@@ -242,7 +242,7 @@ public class Options {
String hex = options.optString("led", null); String hex = options.optString("led", null);
if (hex == null) { if (hex == null) {
return NotificationCompat.DEFAULT_LIGHTS; return 0;
} }
int aRGB = Integer.parseInt(hex, 16); int aRGB = Integer.parseInt(hex, 16);
......
...@@ -67,7 +67,7 @@ exports.applyPlatformSpecificOptions = function () { ...@@ -67,7 +67,7 @@ exports.applyPlatformSpecificOptions = function () {
defaults.smallIcon = undefined; defaults.smallIcon = undefined;
defaults.ongoing = false; defaults.ongoing = false;
defaults.autoClear = true; defaults.autoClear = true;
defaults.led = 'FF0000'; defaults.led = undefined;
defaults.color = undefined; defaults.color = undefined;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment