电子应用通知表示应用发送通知是electron.app.甚至包装后 [英] Electron app notification states the app sending notification is electron.app.<App Name> even after packaging
问题描述
制作了基本的CPU Monitor应用程序后(
在Windows上,似乎 app.setAppUserModelId()必须事先调用:
if(process.platform ==='win32'){app.setAppUserModelId(app.name)}
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?
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)
}
这篇关于电子应用通知表示应用发送通知是electron.app.甚至包装后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!