.NET MAUI Push Notifications in C#

C#, .NET 10. Android uses Firebase; iOS uses PushKit + CallKit directly.

🟣 .NET MAUI

C#, .NET 10. Android uses Firebase; iOS uses PushKit + CallKit directly.

The SDK is free and open source (MIT) on GitHub. Create a free account to get your App ID.

  1. Add the SDK

    Run dotnet add package TingPush.Maui (the TingPush.Maui package on NuGet), then declare the Firebase file for Android:

    MyApp.csproj
    <!-- MyApp.csproj -->
    <ItemGroup>
      <PackageReference Include="TingPush.Maui" Version="1.1.1" />
    </ItemGroup>
    
    <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
      <GoogleServicesJson Include="Platforms\Android\google-services.json" />
    </ItemGroup>

    Requires .NET 10 / MAUI 10. In TingPush: upload the service account JSON (Android) and the .p8 key (iOS).

  2. Initialize in MauiProgram

    MauiProgram.cs
    using TingPushSdk;
    
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseTingPush(new TingPushOptions
            {
                AppId = "YOUR_APP_ID",
                TextAnswer = "Answer",
                TextDecline = "Decline"
            });
        return builder.Build();
    }
  3. iOS: change the AppDelegate base class, enable VoIP

    Platforms/iOS/AppDelegate.cs
    // Platforms/iOS/AppDelegate.cs
    [Register("AppDelegate")]
    public class AppDelegate : TingPushSdk.TingPushAppDelegate   // instead of MauiUIApplicationDelegate
    {
        protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
    }
    Platforms/iOS
    <!-- Platforms/iOS/Info.plist -->
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
      <string>voip</string>
    </array>
    
    <!-- Platforms/iOS/Entitlements.plist  (csproj: <CodesignEntitlements>Platforms/iOS/Entitlements.plist</CodesignEntitlements>) -->
    <key>aps-environment</key>
    <string>development</string>

    Enable Push Notifications for the App ID in Apple Developer. Release builds: aps-environment = production.

  4. Handle events & assign the user

    App.xaml.cs
    using TingPushSdk;
    
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
    
            TingPush.CallEvent += (_, e) =>
            {
                if (e.Action == TingPushCallAction.Accepted)
                {
                    // User tapped Answer → connect the call (e.Call.Id, e.Call.Data["room"])
                }
            };
            // User tapped a notification (even when the app was closed)
            TingPush.NotificationOpened += (_, e) => { /* navigate using e.Data["screen"] */ };
            // Notification received while the app is open
            TingPush.NotificationReceived += (_, e) => { /* e.Title, e.Body, e.Data */ };
        }
    
        protected override void OnStart()
        {
            // Android: Answer tapped while the app was closed
            if (TingPush.TakeAcceptedCall() is { } call) { /* connect the call */ }
        }
    }
    
    // Assign the user
    await TingPush.LoginAsync("user-123");
    await TingPush.LogoutAsync();
    await TingPush.SetTagsAsync(new Dictionary<string, string> { ["plan"] = "vip" });

    Android: keep LaunchMode = LaunchMode.SingleTop on MainActivity (the template default). CanUseFullScreenIntent() and OpenBatteryOptimizationSettings() are available.

✅ After integrating, check

  1. Run the app on a real device with logging on: you should see [TingPush] Device registered ….
  2. The project's Devices tab: the device appears; iOS devices show the VoIP badge if you use calls.
  3. The Send tab: send a test to that device.
  4. Choose 📞 Call and test with the app open, closed and with the screen locked.

Ready to integrate?

Create an account to get your App ID and API Key. Dashboard samples are pre-filled with your project details.