Answer the question
In order to leave comments, you need to log in
Java Mac Tray Notification
Good afternoon!
I'm developing a Java application on Mac and I'm facing this problem.
When I try to call this method:
trayIcon.displayMessage(title,
text,
TrayIcon.MessageType.INFO);
It shows a window with an Ok button.
But on Windows and Linux (Debian, Ubuntu) it works properly, shows the notification as it should.
I tried native notifications that use Notification Center on Mac and here is the result:
1) https://github.com/alloy/terminal-notifier
Pros:
- works
- shows notification with picture
Cons:
- If you run this .app on another computer, then you must manually first "confirm the launch", and only then it will work.
2) https://github.com/petesh/OSxNotificationCenter + https://github.com/twall/jna/blob/master/www/Getti...
Pros:
- Works
- shows notification
- No "confirm launch" required " the first time
Cons:
- In the Notification Center, the name of the application is Java for some reason
- Does not show the application image (Ec-but tried to run the application packaged in .app, but still).
Does anyone know how to solve this issue?
Looking forward to your reply, thanks in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question