ActionCenterListener 1.0.4.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ActionCenterListener --version 1.0.4.1
NuGet\Install-Package ActionCenterListener -Version 1.0.4.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ActionCenterListener" Version="1.0.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ActionCenterListener" Version="1.0.4.1" />
<PackageReference Include="ActionCenterListener" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ActionCenterListener --version 1.0.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ActionCenterListener, 1.0.4.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ActionCenterListener@1.0.4.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ActionCenterListener&version=1.0.4.1
#tool nuget:?package=ActionCenterListener&version=1.0.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ActionCenterListener
A .NET library for reading and monitoring Windows Action Center notifications (toast notifications) directly from the system database.
Features
- Read all notifications from the Windows Action Center database
- Monitor for new notifications in real time
- Parse toast notification payloads (title, body, images, etc.)
- Lightweight and easy to integrate
Installation
Install via NuGet (after publishing):
dotnet add package ActionCenterListener
Or reference the DLL directly in your project.
Usage
using ActionCenterListener;
var poller = new ActionCenterPoller();
// Get all notifications
var notifications = poller.GetAllNotifications();
foreach (var notif in notifications)
{
Console.WriteLine($"[{notif.Timestamp}] {notif.AppId}: {notif.Payload?.ToastTitle} - {notif.Payload?.ToastBody}");
}
// Listen for new notifications
poller.OnNotification += notif =>
{
Console.WriteLine($"New notification: {notif.Payload?.ToastTitle} - {notif.Payload?.ToastBody}");
};
// Dispose when done
poller.Dispose();
API Overview
ActionCenterPoller
GetAllNotifications(): Returns a list of all notifications in the Action Center database.OnNotification: Event triggered when a new notification is detected.Dispose(): Cleans up resources.
ActionCenterNotification
- Properties:
Order,NotificationId,HandlerId,ActivityId,Type,PayloadRaw,Payload,Tag,Group,ExpiryTime,Timestamp,DataVersion,PayloadType,BootId,ExpiresOnReboot,AppId,Title,Body
NotificationPayload
- Properties:
ToastTitle,ToastBody,Images,RawXml
Requirements
- Windows 10+
- .NET 6.0 or later
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0-windows7.0
- Microsoft.Data.Sqlite (>= 9.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.