-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications on Windows #262
Comments
How about is this now? |
Since there is no standard notification API on Windows <= 7, the implementation will be much more complicated than on Linux and Mac, so it may not be finished recently. |
Get it, tks. |
How about implementing skip taskbar and show inactive apis from node-webkit that would make creating notification windows easy. |
@zcbenz |
+1 |
Any roadmap for resolution of this issue? This is a pretty big deterrent for using Electron. |
Agreed. Native notifications are a big deal, they are even advertised on the Electron homepage. The fact that they don't work on Windows is hugely disappointing. |
I mean, it's hugely disappointing that Windows makes it a total PITA to implement notifications, sooooooooooo |
What about using the Windows Toast Notifications support from Node-Notifier? |
@Glavin001 You have to create a dummy shortcut in users' start menus to use that, it's a pretty big drawback |
@paulcbetts Oh wow. Thanks for letting me know. Bummer. I am usually not a Windows user, let alone Windows app developer, however I recently won a Microsoft Surface and realize I really miss not being able to receive SMS notifications on my Surface from my iPhone, like my Macbook does. I hope to develop this project with Electron, although this lack of Windows notification support puts a speed bump in that plan. |
Hi guys, my app is using web notifications but it does not work on windows (because of this ticket). Can I shim notification API somehow, so it does tray bubble instead? The thing is, I can't change the clientside code, cause I am loading it from public url. The app is just packaged webapp. However, if I were able to shim Notification API from the main script, it would be awesome. Do you know whether something like that is possible? Thanks a lot! |
+1 for this. Any workaround without end-user troubles? |
Ok, it works this way:
This way I can listen in main thread on |
+1 |
Hi, I tried to design it close the chrome rich text notifications, but i' am not the best designer 😄 Regardless to restrictions and features of different native notification systems we could build something that mimics chrome rich text notifications. So far it fits my needs. If any one is interested. Would be cool to hear your thoughts about this. |
I'm interested in where that is going for sure. This is a definite roadblock to us using Electron at the moment. |
@s-a that's nice! but... I am not a windows user but I am assuming it is not able to detect that other notifications are in place and therefore it would be placed on top of other notifications creating a kinda weird user experience? Just asking... |
@jmesquita ty for your feedback. When I remember back I cannot remember such a situation, but in fact you are absolutely right. |
Something really simple that should work: Download electron.exe, run, open up dev tools, run |
Not seeing anything with electron.exe I'm interested to knowing how notification is implemented on Windows 8.1, since it doesn't have a notification center as Win 10.. |
Oh I do see a |
Hold on, we might have a regression here. |
Upon inspection, we don't have a regression, but getting 8.1 setup to accept notifications is a bit tricky and the documentation I wrote is not nearly as detailed as it has to be. I'll add some docs there, but in the meantime, here are the important steps:
The good news: Squirrel handles that all for you. |
That's weird, I think I'm doing these correctly. My update.exe file verison is '1.2.5.0', I think it's pretty new.. |
Is it possible to test things out with electron.exe? Here's my attempt at getting notification to work for it:
Is it because by the time I setAppUserModelId it was too late? Does it matter? |
@fantasticsid You can't set the app user model ID via remote, you need to call it before you open a window |
And the shortcut has to be inside the Start Menu folder inside the user's appdir. It's a horrible system (which is why it's no longer in Windows 10), and my documentation isn't great. Once //build is over, I'll make another pass at the docs and make this stuff more clear. |
I rebuilt my app to call I'm using squirrel.windows to generate installer (noMsi, it generates a Setup.exe). I did find a shortcut to my app under Notification still does not show from my app, I also used dev console to confirm this. I'm running Windows 8.1 in vmware, if that matters. At this point just a screenshot of notification working on Windows 8 would make me so much better.. Seriously though does it matter that the lnk file points to squirrel binary? |
Also according to this https://msdn.microsoft.com/en-us/library/dn449300(v=winembedded.82).aspx I did not see my app's Application User Model ID listed, perhaps it needs to register during installation, and squirrel somehow did not do that? |
In addition to all this mess: #4973 |
I'm gonna try 0.35.0 where notification support is first implemented.. Unfortunately I only have a VM for windows 8 so it's gonna be a PITA to build brightray & electron in the VM. |
To everyone who might be looking to do notifications in Windows 7:
And in the browser, I ran:
(FWIW: I also tried this all using node-notifier with success) |
I have created a notification on Windows 10 and it works correctly except one thing - when it disapears after a few seconds it's not available in the notifications list. When notification is visible and I click the system notifications icon - it's on the list. But after I close the list and open again - it's gone. |
Update on Windows <=7 notifications: The above code works, but we're currently having issues with it causing a change of the active window (e.g. if the Electron app is in the background and I'm in a different app, receiving a custom notification on Windows <= 7 seems to make the Electron app active without any user input). Wondering if it's something with |
@rubencodes is the solution you're trying related to electron-notification-shim? Feel free to log an issue there and I'll take a look. |
Does anyone know how to override the default native notifications with node-notifier or electron-notification-shim? I am using electron-notification-shim with electron-notify and both works perfectly. The only problem is I am not able to hide/override the native notifications. |
@akashnimare If you want to disable the built in Notification implementation simply doing something like class NullNotification {
}
window.Notification = NullNotification Will make it not work (just override the Notification constructor) |
@MarshallOfSound I'm assuming that's in the renderer process? |
@akashnimare maybe this will shed light on this problem ? RocketChat/Rocket.Chat.Electron#199 We switched to Rocket.Chat and it's working in there with some custom notification layout. |
persist media device id salt across sessions
persist media device id salt across sessions
webkitNotifications api seems to be implemented in mac build but not in windows build.
The text was updated successfully, but these errors were encountered: