Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron app not showing in notification settings

We have written an electron app. It shows notifications (Win10). Once the app was spamming with a lot of notifications so I switched them off from the notification tile.

As seen in the image

I wanted to enable them back. So I went to notification settings and I could not find my app in the list.

PS: We are using electron Notification module and we are also calling app.setAppUserModelId("OurAppName")

like image 969
Nikhil Avatar asked Sep 17 '20 08:09

Nikhil


1 Answers

This is a semi-known issue where electron applications are simply missing from Windows Notifications Center.

Try changing

app.setAppserModelId("yourAppName");

To

app.on('ready', () => app.setAppUserModelId("Your.AppName"));

I had the same issue recently and this did the trick for me, I found the solution here: https://github.com/Automattic/simplenote-electron/pull/2483

In other iterations of similar issues, there is a workaround to enable notifications again which can be found here: https://github.com/electron/electron/issues/24330#issuecomment-650546142

For Electron you can find the event 'ready' here: https://www.electronjs.org/docs/api/app#event-ready

like image 99
GodLess Avatar answered Nov 19 '22 07:11

GodLess