simon.vergauwen
01/19/2022, 9:54 AMTray
. I’m following the tutorial on compose-jb
, but the notification is not showing on my machine. I’m on MacOs BigSur 11.6.
However, I can see that the trayState.sendNotification
is correctly being called.
My build.gradle.kts
is the one from templates/desktop-template
. https://github.com/JetBrains/compose-jb/blob/master/templates/desktop-template/build.gradle.kts (using 1.0.1 version, not rc2)Igor Demin
01/19/2022, 10:12 AMjava
(or for your application, when you ship it as native distribution). Try to open macOs notifications, and there should be a request for it, with button "Allow"simon.vergauwen
01/19/2022, 11:35 AMdmg
, and tried it that way too but that also didn’t work. Although I did get a pop-up requesting if I wanted to allow notifications when I ran the installed dmg
.
I gave both java
, and the installed dmg
permission to send notifications.simon.vergauwen
01/19/2022, 11:35 AMIgor Demin
01/19/2022, 12:06 PMsimon.vergauwen
01/19/2022, 1:47 PMdmg
. So it could not be 16/17 unless it’s baked into IntelliJ and I missed something (I’m double checking the ticket).Igor Demin
01/19/2022, 2:24 PMjava
some time ago.
Do notifications work in other applications?Igor Demin
01/19/2022, 2:40 PMGradle/IntelliJ is pointing to JAVA_HOME.When we run via IDEA, IDEA uses JDK that is set in the
Settings/.../Gradle
(see the screenshot).
But even with Java 11 it should work.
If it doesn't work, and all notifications are turned on in the macOs settings, and the other applications are able to send notifications, then it is some rare incompatibility with the notifications mechanism that was implemented by JDK.
By the way, IDEA probably also uses this mechanism. Do notifications work in it?simon.vergauwen
01/19/2022, 2:41 PMsimon.vergauwen
01/19/2022, 2:41 PMdmg
.Igor Demin
01/19/2022, 3:04 PMsimon.vergauwen
01/19/2022, 4:47 PMIgor Demin
01/20/2022, 8:46 AMproject to workWith or without notifications?
simon.vergauwen
01/20/2022, 8:52 AMjava
notifications, and after that it started working. However, I now have 3x java
in my notification settings and not sure what the difference is. (Different JDK versions ?)simon.vergauwen
01/20/2022, 8:52 AMIgor Demin
01/20/2022, 8:56 AMDifferent JDK versionsYes, those are different JDK versions. Usually Compose applications ship as
dmg
, and they have their own (single) name in Notification settings.simon.vergauwen
01/20/2022, 9:08 AMpackageDmg
.
It should also automatically request to allow notification for it, right? Let me also double check that.