|
@@ -90,10 +90,15 @@ public class Builder {
|
|
|
int smallIcon = options.getSmallIcon();
|
|
int smallIcon = options.getSmallIcon();
|
|
|
NotificationCompat.Builder builder;
|
|
NotificationCompat.Builder builder;
|
|
|
|
|
|
|
|
- builder = new NotificationCompat.Builder(context, "group")
|
|
|
|
|
|
|
+ if (options.isSilent()) {
|
|
|
|
|
+ return new Notification(context, options);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ builder = new NotificationCompat.Builder(context, "channel")
|
|
|
.setDefaults(options.getDefaults())
|
|
.setDefaults(options.getDefaults())
|
|
|
.setContentTitle(options.getTitle())
|
|
.setContentTitle(options.getTitle())
|
|
|
.setContentText(options.getText())
|
|
.setContentText(options.getText())
|
|
|
|
|
+ .setTicker(options.getText())
|
|
|
.setNumber(options.getBadgeNumber())
|
|
.setNumber(options.getBadgeNumber())
|
|
|
.setAutoCancel(options.isAutoClear())
|
|
.setAutoCancel(options.isAutoClear())
|
|
|
.setOngoing(options.isSticky())
|
|
.setOngoing(options.isSticky())
|
|
@@ -103,6 +108,8 @@ public class Builder {
|
|
|
.setPriority(options.getPriority())
|
|
.setPriority(options.getPriority())
|
|
|
.setShowWhen(options.getShowWhen())
|
|
.setShowWhen(options.getShowWhen())
|
|
|
.setUsesChronometer(options.isWithProgressBar())
|
|
.setUsesChronometer(options.isWithProgressBar())
|
|
|
|
|
+ .setGroup(options.getGroup())
|
|
|
|
|
+ .setGroupSummary(options.getGroupSummary())
|
|
|
.setLights(options.getLedColor(), options.getLedOn(), options.getLedOff());
|
|
.setLights(options.getLedColor(), options.getLedOn(), options.getLedOff());
|
|
|
|
|
|
|
|
if (options.isWithProgressBar()) {
|
|
if (options.isWithProgressBar()) {
|