Is it possible to dismiss Tray Notifications? I ha...
# compose-desktop
a
Is it possible to dismiss Tray Notifications? I had a look at the available functions in both Tray and Notifications but I couldn’t find anything related
a
Looking for the same.
a
@Anmol Verma couldnt find anything related. I did some testing to see if i can display a notification via running swift from the CLI, but no luck. It was throwing some errors. I found this though. Seems like we have access to native APIs in kotlin multiplatform
will report back when i get the chance to try it out
a
Thanks alex! Will try myself and let you know
a
@Anmol Verma I think the above link I shared is unrelated to Jetpack Compose desktop. From what I understood Jetpack Compose desktop targets the Jvm (it creates a Java application). The link I shared above is about kotlin mulitplatform and you can target platform specific APIs if you are targeting the specific platform (and not the jvm).
a
It would be good to have something like https://pub.dev/packages/flutter_local_notifications
a
agreed. that would be fantastic to have. I am not sure if something like this is possible with Jetpack Compose Desktop though. I’ll ask in the channel in case anyone knows.
Asked in #compose-desktop + #multiplatform in case anyone know. I am afraid that we would need to access the JNI to achieve what we want from a jvm target.
a
I think expect actual would work well here. JNI allows to call cpp code from java and i don’t see any use of that here, not sure if I’m missing anything.. it should be easy to port that flutter lib to kmp
It has support for macosx and linux atleast