Skip to content
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

Native Notification on Windows 10 Action center not works as expect #6824

Open
deltapath-eric opened this issue Oct 10, 2018 · 18 comments
Open
Assignees
Labels

Comments

@deltapath-eric
Copy link

deltapath-eric commented Oct 10, 2018

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.

@betsonserviceportal
Copy link

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

@rogerwang
Copy link
Member

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.

@betsonserviceportal
Copy link

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

@rogerwang
Copy link
Member

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.

@gpetrov
Copy link

gpetrov commented Oct 18, 2018

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?

@rogerwang
Copy link
Member

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...

@rogerwang rogerwang self-assigned this Oct 18, 2018
@rogerwang
Copy link
Member

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

@betsonserviceportal
Copy link

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.

@rogerwang
Copy link
Member

rogerwang commented Oct 18, 2018 via email

@betsonserviceportal
Copy link

I don't see that update in my history.

@gpetrov
Copy link

gpetrov commented Oct 29, 2018

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....

@rogerwang
Copy link
Member

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

@deltapath-eric
Copy link
Author

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

@deltapath-eric
Copy link
Author

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

@deltapath-eric
Copy link
Author

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

@panther7
Copy link

Is somewhere docs, how use native win 10 noti center via NWjs?

@deltapath-eric
Copy link
Author

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

which use the index.html and package.json at the top
also the https://tests.peter.sh/notification-generator/

@monema75
Copy link

Nothing new to add here from my side, I do experience the same problem. Is there any release date preview for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants