Soenneker.Azure.NotificationHubs.Maui
4.0.32
Prefix Reserved
dotnet add package Soenneker.Azure.NotificationHubs.Maui --version 4.0.32
NuGet\Install-Package Soenneker.Azure.NotificationHubs.Maui -Version 4.0.32
<PackageReference Include="Soenneker.Azure.NotificationHubs.Maui" Version="4.0.32" />
<PackageVersion Include="Soenneker.Azure.NotificationHubs.Maui" Version="4.0.32" />
<PackageReference Include="Soenneker.Azure.NotificationHubs.Maui" />
paket add Soenneker.Azure.NotificationHubs.Maui --version 4.0.32
#r "nuget: Soenneker.Azure.NotificationHubs.Maui, 4.0.32"
#:package Soenneker.Azure.NotificationHubs.Maui@4.0.32
#addin nuget:?package=Soenneker.Azure.NotificationHubs.Maui&version=4.0.32
#tool nuget:?package=Soenneker.Azure.NotificationHubs.Maui&version=4.0.32
Soenneker.Azure.NotificationHubs.Maui
A .NET MAUI library for Azure Notification Hubs push installation lifecycle, push channel management, permission handling, and notification tap routing.
Installation
dotnet add package Soenneker.Azure.NotificationHubs.Maui
Registration
using Soenneker.Azure.NotificationHubs.Maui.Registrars;
builder.Services.AddAzureNotificationHubsMaui(options =>
{
options.ThrowIfInstallationRegistrarMissing = true;
});
Register an app-owned backend registrar when you want RegisterCurrentInstallation and UnregisterCurrentInstallation to call your API:
using Soenneker.Azure.NotificationHubs.Maui;
using Soenneker.Azure.NotificationHubs.Maui.Abstract;
public sealed class PushInstallationRegistrar : IAzureNotificationHubMauiInstallationRegistrar
{
public ValueTask Register(AzureNotificationHubMauiInstallation installation, CancellationToken cancellationToken = default)
{
// Send installation to your authenticated backend.
return ValueTask.CompletedTask;
}
public ValueTask Unregister(string installationId, CancellationToken cancellationToken = default)
{
// Tell your authenticated backend to unregister the installation.
return ValueTask.CompletedTask;
}
}
builder.Services.AddSingleton<IAzureNotificationHubMauiInstallationRegistrar, PushInstallationRegistrar>();
The library does not reference Microsoft.Azure.NotificationHubs, create Azure installations directly, send notifications, or derive Azure tags. Your backend should register with Azure Notification Hubs and derive trusted tags from authenticated identity.
Usage
IAzureNotificationHubMauiService service = provider.GetRequiredService<IAzureNotificationHubMauiService>();
await service.Initialize();
AzureNotificationHubMauiInstallation installation = await service.GetCurrentInstallation();
await service.RegisterCurrentInstallation();
InstallationId is a stable GUID string stored in SecureStorage. It is not the platform push channel.
Android
The Android provider retrieves the FCM v1 registration token with Firebase Messaging and exposes it as PushChannel with Platform = FcmV1.
Setup requirements:
- Configure Firebase for the MAUI app before requesting the current installation.
- Add the app's
google-services.jsonand any Firebase initialization required by the app. - Request notification permission on Android 13+ with
IAzureNotificationHubMauiPermissionServiceor setRequestPermissionOnInitialize = true. - Ensure the Android manifest contains the notification permission required by your target SDK.
iOS
The iOS provider returns the APNs device token captured from AppDelegate. Override RegisteredForRemoteNotifications and call the extension method:
using Foundation;
using Soenneker.Azure.NotificationHubs.Maui;
using UIKit;
public override async void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
await this.SetAzureNotificationHubsMauiApnsPushChannel(deviceToken);
}
Setup requirements:
- Enable Push Notifications and Remote notifications background mode in the app capabilities.
- Request notification permission before registration.
- Call
UIApplication.SharedApplication.RegisterForRemoteNotifications()after permission is granted.
Windows
The Windows provider attempts to create a real WNS channel URI with PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync().
Setup requirements:
- Run as a packaged app with Windows app identity.
- Configure WNS in Partner Center and in the app package as required by Windows.
- If WNS is unavailable in the current app context, the provider throws a clear
PlatformNotSupportedExceptioninstead of returning a fake channel.
Notification taps
IAzureNotificationHubMauiTapRouter only raises NotificationTapped. It does not navigate:
tapRouter.NotificationTapped += (_, args) =>
{
// Decide navigation in the consuming app.
};
tapRouter.RouteTap(payload);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
-
net10.0-android36.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Maui.Essentials (>= 10.0.71)
- Soenneker.Gen.EnumValues (>= 4.0.37)
- Xamarin.Firebase.Messaging (>= 125.0.2)
-
net10.0-ios26.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Maui.Essentials (>= 10.0.71)
- Soenneker.Gen.EnumValues (>= 4.0.37)
-
net10.0-windows10.0.19041
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Maui.Essentials (>= 10.0.71)
- Soenneker.Gen.EnumValues (>= 4.0.37)
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.32 | 82 | 8/21/2026 |
| 4.0.31 | 79 | 8/20/2026 |
| 4.0.30 | 82 | 8/18/2026 |
| 4.0.29 | 78 | 8/15/2026 |
| 4.0.28 | 82 | 8/15/2026 |
| 4.0.27 | 88 | 8/15/2026 |
| 4.0.26 | 87 | 8/7/2026 |
| 4.0.25 | 95 | 7/28/2026 |
| 4.0.24 | 101 | 7/28/2026 |
| 4.0.23 | 102 | 7/23/2026 |
| 4.0.22 | 92 | 7/17/2026 |
| 4.0.21 | 104 | 7/16/2026 |
| 4.0.20 | 102 | 7/16/2026 |
| 4.0.19 | 94 | 7/14/2026 |
| 4.0.18 | 100 | 7/14/2026 |
| 4.0.17 | 116 | 7/3/2026 |
| 4.0.16 | 100 | 6/28/2026 |
| 4.0.15 | 107 | 6/28/2026 |
| 4.0.14 | 106 | 6/25/2026 |
| 4.0.13 | 108 | 6/25/2026 |
Update dependency Soenneker.Gen.EnumValues to 4.0.44 (#107)