Nw.js: Native Notification on Windows 10 Action center not works as expect

Created on 10 Oct 2018  ·  15Comments  ·  Source: nwjs/nw.js

https://bugs.chromium.org/p/chromium/issues/detail?id=734095&desc=3

base on the above change in chromium if I understand correctly, the chrome should already support the Native Notification on Windows 10 Action center

I just have a quick test on nwjs-sdk-v0.33.4-win-x64.zip
And I discover that the native notification on Windows 10 is not showing (not under the Action Center).
It will still show the chrome style notification.

provided the following demo index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Hello World!</title>
    <script>window.location = 'https://jsfiddle.net/yoshi6jp/Umc9A/';</script>
    </head>
  <body>
    <h1>Hello World!</h1>
    We are using node.js <script>document.write(process.version)</script>.
  </body>
</html>

and package.json

{
  "name": "nw-demo",
  "version": "0.0.1",
  "main": "index.html"
}

Thanks so much.

Most helpful comment

It's being worked on and will take more efforts than 0.34.2.

All 15 comments

I have noticed this in my native application as well as in the test application above.

Thanks for reporting. Will look to fix it.

Yes, the code from upstream is there. But it's broken because of the missing registry entry and shortcut link, which is supposed to be handled during application installation. Will find a way to enable them.

Excuse my ignorance. Is this something I can grab and test? Thanks.

Not for now. Will let you know. However proposals on how it will be done would be helpful:

The latest win10 requires that any application must have a shortcut in start menu so it would be allowed to show notifications. And to receive event when users interact with the notification, Chrome requires that an entry with application specific CLSID in the system registry should be set and pointed to the application exe. I'm trying to design an API for the shortcut creation, but any suggestions are welcome.

Well we usually have an installer that takes care of the shortcut creation as well any registry settings. So that shouldn't be a problem and only needs to be documented.

Will the native Win10 notifications work out of the box after that? And starting from which NWJS version?

It is still to be fixed in NW, as the current CLSID is builtin. Will let applications customize it via package.json or API call...

btw, NW needs to know the AppUserModelID in the shortcut lnk file as well.

This is our first dive into NW. We're only using NW to launch an Intranet page so that we can have more control over the browser window. We're handling the minimize and close events and placing our application in the system tray. We're just pushing out the NW folder and our app folder to the users computers and adding nw.js to the PATH. We're doing a redirect to an HTTPS page, so we found we need to get a certificate for that so that the notification itself shows. The notification showing up in the Action Center worked until a few weeks ago.

Did they install the win10 fall creators update? The requirements on the
shortcut is introduced in that update:
https://stackoverflow.com/questions/46814858/toast-notification-not-working-on-windows-fall-creators-update

On Thu, Oct 18, 2018, 7:09 PM betsonserviceportal notifications@github.com
wrote:

This is our first dive into NW. We're only using NW to launch an Intranet
page so that we can have more control over the browser window. We're
handling the minimize and close events and placing our application in the
system tray. We're just pushing out the NW folder and our app folder to the
users computers and adding nw.js to the PATH. We're doing a redirect to an
HTTPS page, so we found we need to get a certificate for that so that the
notification itself shows. The notification showing up in the Action Center
worked until a few weeks ago.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/nwjs/nw.js/issues/6824#issuecomment-430968505, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKGGUU7qPszQR0n7WaBc4k2PxG0ali-ks5umGFWgaJpZM4XUcw8
.

I don't see that update in my history.

will the native Windows 10 notifications work in the 0.34.1? Or maybe the upcoming 0.34.2 - or will it take much longer @rogerwang ? We really would like to have them soon....

It's being worked on and will take more efforts than 0.34.2.

Base on the example at the top and tested v0.39.3 with Windows 10, still not able to make the notification under Windows 10 Action Center

  • which use the index.html and package.json at the top

Base on the example at the top and tested v0.44.0 with Windows latest 10, still not able to make the notification under Windows 10 Action Center

Base on the example at the top and tested v0.50.2 with Windows 10 Pro Version 2004, still not able to make the notification under Windows 10 Action Center

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sorty-zz picture sorty-zz  ·  4Comments

hooker99 picture hooker99  ·  4Comments

chino23 picture chino23  ·  3Comments

xland picture xland  ·  3Comments

nawazishali picture nawazishali  ·  3Comments