Electron app notification states the app sending notification is electron.app.<App Name> even after packaging

一个人想着一个人 提交于 2021-02-11 14:11:35

问题


After making a basic CPU Monitor app (https://drive.google.com/drive/folders/1f5yGQc4LFGj2baEjyHl5TT_LD5kM09uZ?usp=sharing) which sends notification when the cpu utilization goes over a certain percentage, I packaged the project. But the notification states that the app creating the notification is electron.app.CPU Monitor in place of CPU Monitor. How to exclude the unnecessary electron.app part?


回答1:


This appears to have been answered recently: how can you overwrite or remove the signature “electron.app.Electron” from the desktop notification

On Windows, it seems that app.setAppUserModelId() must be called beforehand:

if (process.platform === 'win32')
{
    app.setAppUserModelId(app.name)
}


来源:https://stackoverflow.com/questions/64237127/electron-app-notification-states-the-app-sending-notification-is-electron-app-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!