Using electron / node.js for desktop application. Trying to figure out how to produce a notification on the desktop. Is it built into the electron API?
Electron provides the built-in Notification Module which allows the application to send Custom Notifications, using the operating systems native notification APIs to display it. This tutorial will demonstrate how to create Custom Desktop Notifications using the Notification Module.
Go to Settings > System > Notifications & actions , under Get notifications from these senders select the app, and then under Priority of notifications in action center select Top.
node-notifier
made easier to send native notifications. Node notifier A Node.js module for sending notifications on native Mac, Windows, and Linux (or Growl as fallback).
Github
npm install --save node-notifier
const notifier = require('node-notifier');
// String
notifier.notify('Message');
// Object
notifier.notify({
title: 'My notification',
message: 'Hello, there!'
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With