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
                    
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="Soenneker.Azure.NotificationHubs.Maui" Version="4.0.32" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Azure.NotificationHubs.Maui" Version="4.0.32" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Azure.NotificationHubs.Maui" />
                    
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 Soenneker.Azure.NotificationHubs.Maui --version 4.0.32
                    
#r "nuget: Soenneker.Azure.NotificationHubs.Maui, 4.0.32"
                    
#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 Soenneker.Azure.NotificationHubs.Maui@4.0.32
                    
#: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=Soenneker.Azure.NotificationHubs.Maui&version=4.0.32
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Azure.NotificationHubs.Maui&version=4.0.32
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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.json and any Firebase initialization required by the app.
  • Request notification permission on Android 13+ with IAzureNotificationHubMauiPermissionService or set RequestPermissionOnInitialize = 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 PlatformNotSupportedException instead 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 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. 
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.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
Loading failed

Update dependency Soenneker.Gen.EnumValues to 4.0.44 (#107)