LocalNotifications 4.0.0

dotnet add package LocalNotifications --version 4.0.0
                    
NuGet\Install-Package LocalNotifications -Version 4.0.0
                    
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="LocalNotifications" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LocalNotifications" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LocalNotifications" />
                    
Project file
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 LocalNotifications --version 4.0.0
                    
#r "nuget: LocalNotifications, 4.0.0"
                    
#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 LocalNotifications@4.0.0
                    
#: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=LocalNotifications&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LocalNotifications&version=4.0.0
                    
Install as a Cake Tool

LocalNotifications 4.0.0

NuGet License: MIT

Local notifications for .NET 10 MAUI on Android and iOS. Version 4.0.0 supports net10.0, net10.0-android, and net10.0-ios. Android builds target API 36 while retaining API 21 as minimum; iOS minimum is 12.2.

Installation

dotnet add package LocalNotifications --version 4.0.0

Register in MauiProgram.cs. Both arguments are required:

using LocalNotifications;

builder
    .UseMauiApp<App>()
    .UseLocalNotifications(isFirebase: false, autoRegistration: true);

isFirebase enables Firebase Cloud Messaging integration. autoRegistration controls automatic push-notification registration when Firebase is enabled. Lifecycle handling is configured by UseLocalNotifications.

Usage

Examples use LocalNotifications and standard .NET namespaces:

using LocalNotifications;
using System;
using System.Diagnostics;

Immediate notification

LocalNotificationCenter.Current.Show(
    notificationId: 1,
    title: "Hello",
    description: "Shown now",
    payload: "immediate",
    androidOptions: new AndroidOptions { IconName = "notification_icon" },
    iOSOptions: new iOSOptions { Sound = "default" });

Scheduled notification

LocalNotificationCenter.Current.Schedule(
    notificationId: 2,
    title: "Reminder",
    description: "Scheduled notification",
    dateTime: DateTime.Now.AddMinutes(10),
    payload: "scheduled",
    androidOptions: new AndroidOptions(),
    iOSOptions: new iOSOptions());

Repeating notifications

var time = new Time(hour: 9, minute: 0);

LocalNotificationCenter.Current.ShowHourly(
    3, "Hourly", "Every hour", time, "hourly");
LocalNotificationCenter.Current.ShowDaily(
    4, "Daily", "Every day", time, "daily");
LocalNotificationCenter.Current.ShowWeekly(
    5, "Weekly", "Every Monday", Day.Monday, time, "weekly");

Cancel and inspect pending notifications

LocalNotificationCenter.Current.Cancel(notificationId: 2);
LocalNotificationCenter.Current.CancelAll();

var pending = LocalNotificationCenter.Current.GetPendingNotificationRequests();
foreach (var request in pending)
    Debug.WriteLine($"{request.NotificationId}: {request.Title}");

Permissions and settings

bool granted = await LocalNotificationCenter.Current.RequestNotificationPermission(
    new NotificationPermission { AskPermission = true });
bool enabled = await LocalNotificationCenter.Current.IsNotificationsEnabled();

Android API 33 and later require runtime POST_NOTIFICATIONS permission. Library declares permission in merged manifest; app must request it at runtime before showing notifications.

Events

LocalNotificationCenter.Current.OnNotificationReceived += e =>
    Debug.WriteLine($"Received {e.NotificationId}: {e.Payload}");

LocalNotificationCenter.Current.OnNotificationTapped += e =>
    Debug.WriteLine($"Tapped {e.NotificationId}: {e.Payload}");

LocalNotificationCenter.Current.OnTokenRefresh += (source, e) =>
    Debug.WriteLine($"Firebase token: {e.Token}");

Firebase Cloud Messaging

Register with Firebase enabled:

builder.UseLocalNotifications(isFirebase: true, autoRegistration: true);

Android:

  1. Add google-services.json to app project with GoogleServicesJson build action.
  2. Add Internet permission to Platforms/Android/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
  1. On API 33+, request POST_NOTIFICATIONS permission as shown above.

iOS:

  1. Add GoogleService-Info.plist with BundleResource build action.
  2. Enable Background Modes and Remote notifications in Info.plist.
  3. Set FirebaseAppDelegateProxyEnabled to NO in Info.plist.
  4. Enable Push Notifications in Entitlements.plist.
  5. Configure APNs credentials and provisioning in Apple Developer and Firebase.

Retrieve current token after Firebase setup:

string token = await LocalNotificationCenter.Current.GetTokenAsync();

Scheduling limits

Android scheduling uses WorkManager and is best-effort. Delivery may be delayed by Doze, battery optimization, or OEM background restrictions. Library requires no exact-alarm permission and provides no exact-time guarantee.

iOS keeps at most 64 pending notifications; system retains 64 notifications scheduled to fire soonest.

Migrating to 4.0.0

Version 4 drops .NET 9 targets. Retarget app to .NET 10 (net10.0-android and/or net10.0-ios) and call UseLocalNotifications with both required arguments.

Build and pack

dotnet build LocalNotifications.sln -c Release
dotnet pack Source/LocalNotifications/LocalNotifications.csproj -c Release

See sample app. Licensed under MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 8 7/22/2026
3.0.0.2 160 3/4/2026
3.0.0.1 374 11/25/2025
3.0.0 502 11/25/2024
2.0.5.6 443 10/21/2024
2.0.5.5 374 10/21/2024
2.0.5.4 575 3/21/2024
2.0.5.3 369 3/21/2024
2.0.5.2 652 5/1/2023
2.0.5.1 734 11/25/2022
2.0.5 652 11/11/2022
2.0.4 656 11/7/2022