-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Implement desktop notifications [$100 awarded] #27
Comments
Hyperlinks for the future docs on this feature:
|
And somebody should tell that user to watch this issue. |
Hi! Any news about this feature? Hope yes =) |
Desktop Notifications are very critical for any App to give a completely native experience. And for a chat app (which I'm trying to port from a chrome-extension), notifications are essential. |
+1 |
2 similar comments
+1 |
+1 |
me too |
im not sure, but chrome 28+ should have notifications http://blog.chromium.org/2013/05/rich-notifications-in-chrome.html |
prior versions of chrome had it buried too under chrome://flags |
I wonder if it does really mean that they appear then in Chromium/Blink code and then in node-webkit. |
Please, could we know the place / priority of this feature in the roadmap? |
That's rich notifications for Chrome packaged apps and extensions. A different thing. Here we are talking about HTML5 Notifications API. The real issue here is that |
maybe just a flag somewhere in build config or something? or some permission issues(you have to ask a permission in order to display notification) |
Hello, thanks for your patience. The reason this feature is in Chromium but not in node-webkit is: The feature is implemented in the Chromium I planed to move it to |
Thank you for explaining the current state of things. |
That sounds great @rogerwang thanks for the update! |
Please keep us posted - I guess we'll have to individually work around this and come up with some sort of temporary solution on our own. For linux, at least, we've got notify-send. |
My extremely dependency heavy take at a workaround is here: https://gist.github.com/miklschmidt/5896306 if it's useful to anyone. |
@miklschmidt That's quite helpful, thanks! I'll probably have to pick it over myself to make it a bit more agnostic, but that is a great start. I take it vendor/tween is tween.js? Also - what is lib/gui? |
tween.js is TWEEN.js https://github.com/sole/tween.js/ lib/gui is just a require.js wrapper for require('nw.gui') i like to avoid using two types of dependency declarations in the same file :) |
How we can help so this can be integrated as soon as possible? |
+1 |
I agree with you @jamesmortensen, I've made a pull request #2289 |
+1 |
Just published replacement for rich desktop notifications check live -http://screencast.com/t/bUxB6vNvW8BN https://github.com/edjafarov/node-webkit-desktop-notification |
Fixes an issue with node-webkit notifications -- nwjs/nw.js#27 (comment)
Hello, I've tried node-webkit v0.10.5 on Windows 7 (64 bit), Service Pack 1. When trying to create a new Notification, node-webkit crashed. This occurred with both a local script bundled into the application and also in an IFrame. Notifications on MacOSX and Ubuntu both worked. If someone has had success on Windows 7, can you share what version of the OS and version of node-webkit worked for you. Thanks. |
@joshleaves @jamesmortensen @jtg-gg this works fine! Thanks! |
Fixes an issue with node-webkit notifications -- nwjs/nw.js#27 (comment)
Like @J-Rojas, I'm also seeing a crash in Windows 7 64 bit. The notifications are working fine in OS X and Linux. Does anybody have notifications working in Windows 7 (I have not tried other windows version yet)? |
@marbemac I've just tested the latest build, it works on my win 7 64 bit, hmm do you have the call stack for the crash ? |
@jtg-gg I checked the %TEMP% folder for the crash dump as described here https://github.com/nwjs/nw.js/wiki/Crash-dump but don't see anything. Is there somewhere else I should be looking? When it crashes Windows only gives me a "programName.exe has stopped working. a problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." I took the notification code out to make sure, and sure enough the app booted fine. Then, in the dev console, I created a new notification while the app was running and it crashed. |
@jtg-gg I was able get the .dmp file. See this paste bin: Looks like something to do with storage.get?
The code I'm using for the notification is just new Notification("Title", {body: "Body"}); Thanks in advance for any help you can provide! |
@marbemac looks like, there is problem of getting the application icon, the notification, will try to get the application icon, if no image is specified |
If it works on OSX and Linux, but not Windows with fetching an image from the file tree it sounds a lot like a path error :P — On Tue, Feb 24, 2015 at 5:46 AM, jtg-gg [email protected] wrote:
|
Hmm, where should I set this application icon? Is it required? If it makes any difference, I'm currently using https://github.com/mllrsohn/node-webkit-builder to build the app. |
@victorzimmer @jtg-gg I set the winIco option in node-webkit-builder but no luck - still crashes. Any other ideas? Do Windows 7 (64) notifications work for you guys when you build with node-webkit-builder (just to rule that out)? |
@marbemac can you try, to specify some jpg/png icon (http:// or file://) when you execute the notification ? |
@jtg-gg I updated my notification code test to the below, and it works fine in OS X, but still crashes in Windows. Any other ideas? And it's working in Windows 7 for you? This is so weird. Incidentally I did try it on another windows 7 computer and it crashed on that one as well. I've also tried several of the packaging methods listed in the wiki. var options = {
icon: "http://www.fnordware.com/superpng/pngtest16rgba.png",
body: "Here is the notification text"
};
var notification = new Notification("Notification Title", options); |
Ok so the example here worked: Investigating.. |
Solved, my manifest file had the window.icon set to a blank string. So many places to set an icon, I didn't notice that option in the manifest file. Thanks for the help guys! |
webkitNotifications
can be implemented by overridingShowDesktopNotification
andCancelDesktopNotification
in content browser client, chrome has already implemented them inchrome/browser/notifications
, code can be reused there.The $100 bounty on this issue has been claimed at Bountysource.
The text was updated successfully, but these errors were encountered: