Chapter 15. Making desktop notifications

 

This chapter covers

  • Seeing how Electron supports desktop notifications through a third-party npm module
  • Using the HTML5 notification API to make desktop notifications in NW.js
  • Working with Twitter to create a live tweet notification app

When working day-to-day with computers, users tend to have a number of apps open and running while focusing on one app at a time. Applications such as chat apps, file downloaders, and music players may have activity, but if the user doesn’t have them in direct view or focus, they might miss that activity.

One feature provided by OSs is allowing notifications to be displayed as small dialogs that overlay all open and focused windows, usually in the top-right corner of the desktop window, helping users stay informed of important activity. Both NW.js and Electron provide notification APIs to ensure that your apps can communicate events using the OS’s notifications system.

15.1. About the app you’ll make

15.2. Creating the Watchy app in Electron

15.3. Creating the Watchy app in NW.js

15.4. Summary