我可以使用电子发送 Windows 通知node-notifier
notifier.notify({
appName: "myapp",
title: 'My notification',
message: 'Hello, there!'
});
我可以使用电子运行服务node-windows
从我的主要过程
var svc = new Service({
name: 'MyService',
description: '',
script: 'MyService.js',
});
svc.on('install', function () {
console.log('Install complete.');
svc.start();
});
svc.install();
但是,当我尝试从由电子创建的服务发送通知时,并没有出现。虽然我检查了服务内的代码运行,但日志中没有任何错误!
我知道这在 c# 中是可能的,但我如何在电子中做到这一点?
任何指南如何从服务发送通知?
谢谢