send-notification
send-notification copied to clipboard
Support native notification icons
I am using linux notify-send module and I would want to use native icon instead of specifying one but API do not support it.
Please would you consider this feature ?
Hi, what do you mean by native icon ? not setting an icon at all and let notify-send
display a notification with its default behaviour ?
Huh, not setting an Icon will throw an exception:
public static void main(String [] args) {
Notifier notifier = new SendNotification()
.initNotifier();
Notification notification = Notification.builder().level(Notification.Level.WARNING).message("test test test")
.title("hello")
.subtitle("world")
.build();
notifier.send(notification);
notifier.close();
System.out.println("exiting");
System.exit(0);
}
results in: Exception in thread "main" java.lang.IllegalStateException: Missing required properties: icon at fr.jcgay.notification.AutoValue_Notification$Builder.build(AutoValue_Notification.java:166)
An icon is mandatory at the moment, because I haven't got any case where I don't need one. But I guess I could go with a default behavior when none is set... ?