### Install and Rebuild Electron App Source: https://github.com/felixrieseberg/electron-windows-notifications/blob/master/samples/electron/readme.md Installs project dependencies using npm and rebuilds native modules for the Electron application. This is a prerequisite for running the sample. ```shell cd samples\electron npm install .\node_modules\.bin\electron-rebuild -m .\app\node_modules ``` -------------------------------- ### Install electron-windows-notifications Source: https://github.com/felixrieseberg/electron-windows-notifications/blob/master/README.md Installs the electron-windows-notifications package using npm. This is the primary method to add the library to your Node.js project. ```bash npm install --save electron-windows-notifications ``` -------------------------------- ### Run Electron Sample App Source: https://github.com/felixrieseberg/electron-windows-notifications/blob/master/samples/electron/readme.md Executes the Electron sample application after all dependencies have been installed and native modules rebuilt. ```shell npm start ``` -------------------------------- ### Create and Show ToastNotification Source: https://github.com/felixrieseberg/electron-windows-notifications/blob/master/README.md Demonstrates how to create a ToastNotification instance with a custom XML template and strings, attach an event listener for activation, and display the notification. Requires the 'electron-windows-notifications' package. ```javascript const appId = 'electron-windows-notifications' const {ToastNotification} = require('electron-windows-notifications') let notification = new ToastNotification({ appId: appId, template: `%s`, strings: ['Hi!'] }) notification.on('activated', () => console.log('Activated!')) notification.show() ``` -------------------------------- ### Create and Show TileNotification Source: https://github.com/felixrieseberg/electron-windows-notifications/blob/master/README.md Demonstrates how to create a TileNotification instance with a custom XML template and strings, attach an event listener for activation, and display the notification. This functionality is intended for UWP environments on Windows 10 Anniversary Update and later. ```javascript const appId = 'electron-windows-notifications' const {ToastNotification} = require('electron-windows-notifications') let notification = new ToastNotification({ appId: appId, template: `%s`, strings: ['Hi!'] }) notification.on('activated', () => console.log('Activated!')) notification.show() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.