首页 文章

Nodewebkit应用程序的桌面通知

提问于
浏览
3

我目前正在构建一个带有Chat的 Node webkit 桌面应用程序 .
如果有来自用户的任何新消息,它应该通知类似Skype上面的窗口停靠点,点击它应该打开应用程序 .
我浏览了一些提供的桌面通知库:
Growl
Node Webkit Desktop Notification

第二个为我工作,但它不是互动的 .
是否有其他库提供类似Skype的桌面通知行为,并与NodeWebKit一起使用?
或者是否有任何可以在 NW Desktop Notification 中更改以使其具有交互性?

提前致谢

2 回答

  • 1

    我猜没有关于它的插件 . 但我认为可以通过在运行主窗口时创建新窗口(看起来像一个弹出窗口)来实现,并且当新数据或新用户通知时,它可以像socket.io一样由实时通信引擎触发 . 它看起来像推送通知 .

  • 1

    Node-Notifier

    Node.js模块,用于发送跨平台系统通知 . 使用Mac的Notification Center,适用于Linux的notify-osd / libnotify-bin,适用于Windows 8/10的Toasters或适用于早期Windows版本的任务栏Balloons . 如果不满足这些要求,则使用Growl .

    $ npm install --save node-notifier
    
    
    const notifier = require('node-notifier');
    notifier.notify('Message');
    
    notifier.notify({
      'title': 'My notification',
      'message': 'Hello, there!'
    });
    

相关问题