电子应用通知表示应用发送通知是electron.app.甚至包装后 [英] Electron app notification states the app sending notification is electron.app.<App Name> even after packaging

查看:92
本文介绍了电子应用通知表示应用发送通知是electron.app.甚至包装后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

制作了基本的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆