Proper Windows Notifications on Electron

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • NodeRT

    Winrt APIs-node.js modules generator

  • We need something deeper than what Electron gives us out of the box, which means using NodeRT.

  • electron-windows-notifications

    :zap: Send native Windows WinRT notifications from Electron

  • There's electron-windows-notifications, though it's wrapping a pretty old version of NodeRT, and it does not expose some of the APIs we'll need. I decided to directly use the generated NodeRT APIs.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • node-gyp

    Node.js native addon build tool

  • These are the bare minimum. You can also target other API levels like @nodert-win10-au, etc. You'll need to set up node-gyp with Python and Windows Build Tools and install the Windows 10 SDK corresponding to the version of the NodeRT package you pulled in.

  • electron-protocol-notification

    electron-protocol-notification

  • I've got a minimal example app to demonstrate the end-to-end protocol launch setup. I don't have this working for Mac OS yet but I think all it needs is an open-url event listener as per the docs.

  • electron-windows-interactive-notifications

    :zap: Respond to interactive notifications on Windows, from Electron

  • Windows also lets you type directly into a notification, which is something that a pure protocol approach doesn't handle. electron-windows-interactive-notifications ostensibly handles this but it hasn't been updated in a while and the author is not responding to issues. I dove in here for a bit, implemented two workarounds, invented a third but never successfully got my app to launch. My app doesn't really need the interactive notifications, so I abandoned this approach. If you want to try and tackle this, Chromium's notification_helper.exe might be a helpful reference.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts