Brandsum Well-Known Member Licensed User Mar 11, 2019 #1 In windows I can show a system notification from tray icon using this code, Code: Copy Dim jo As JavaObject = trayIcon jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) But how can I do this in Mac OS?
In windows I can show a system notification from tray icon using this code, Code: Copy Dim jo As JavaObject = trayIcon jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) But how can I do this in Mac OS?
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2019 #2 See this answer: https://stackoverflow.com/a/34225861/971547 Should be simple to port it with jShell. Upvote 0
See this answer: https://stackoverflow.com/a/34225861/971547 Should be simple to port it with jShell.
Kiffi Well-Known Member Licensed User Longtime User Mar 12, 2019 #3 Brandsum said: In windows I can show a system notification from tray icon using this code, Code: Copy Dim jo As JavaObject = trayIcon jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) Click to expand... sorry for Off-Topic, but I would like to display this notification under Windows. What kind of object is trayIcon? Thanks in advance & Greetings ... Peter Upvote 0
Brandsum said: In windows I can show a system notification from tray icon using this code, Code: Copy Dim jo As JavaObject = trayIcon jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) Click to expand... sorry for Off-Topic, but I would like to display this notification under Windows. What kind of object is trayIcon? Thanks in advance & Greetings ... Peter
mangojack Expert Licensed User Longtime User Mar 12, 2019 #4 TrayIcon object is from the jSystemTray lib. Code: Copy Dim jo As JavaObject = icon1 jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) see there example here ... https://www.b4x.com/android/forum/t...icons-to-the-system-tray-notifications.37534/ Last edited: Mar 12, 2019 Upvote 0
TrayIcon object is from the jSystemTray lib. Code: Copy Dim jo As JavaObject = icon1 jo.RunMethod("displayMessage",Array As Object("Hello, World", "notification demo", "INFO")) see there example here ... https://www.b4x.com/android/forum/t...icons-to-the-system-tray-notifications.37534/
Brandsum Well-Known Member Licensed User Mar 13, 2019 #6 Erel said: See this answer: https://stackoverflow.com/a/34225861/971547 Should be simple to port it with jShell. Click to expand... I've tried this. But in the notification, it's showing apple script icon instead of my application icon. How can I change that? Code: Copy Dim j As Shell j.InitializeDoNotHandleQuotes("notify","osascript",Array As String("-e",$"display notification "New notification" with title "Title" sound name "Funk""$)) j.Run(-1) I want to do this because ControlsUtils showNotification cant show notification while the app is in background. Last edited: Mar 13, 2019 Upvote 0
Erel said: See this answer: https://stackoverflow.com/a/34225861/971547 Should be simple to port it with jShell. Click to expand... I've tried this. But in the notification, it's showing apple script icon instead of my application icon. How can I change that? Code: Copy Dim j As Shell j.InitializeDoNotHandleQuotes("notify","osascript",Array As String("-e",$"display notification "New notification" with title "Title" sound name "Funk""$)) j.Run(-1) I want to do this because ControlsUtils showNotification cant show notification while the app is in background.
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2019 #7 Brandsum said: I've tried this. But in the notification, it's showing apple script icon instead of my application icon. How can I change that? Click to expand... I don't think that you can change this icon as it is not your app that displayed the notification. Upvote 0
Brandsum said: I've tried this. But in the notification, it's showing apple script icon instead of my application icon. How can I change that? Click to expand... I don't think that you can change this icon as it is not your app that displayed the notification.