maui-accessibility
Guide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties…
Add local notifications to .NET MAUI apps on Android, iOS, and Mac Catalyst. Covers notification channels, permissions, scheduling, foreground/background handling, and DI registration. Works with XAML/MVVM, C# Markup, and MauiReactor. USE FOR: "local notification", "schedule
$ npx -y skills add davidortinau/maui-skills --skill maui-local-notifications --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/maui-local-notificationsContext preview
The summary Claude sees to decide when to auto-load this skill.
Add local notifications to .NET MAUI apps on Android, iOS, and Mac Catalyst. Covers notification channels, permissions, scheduling, foreground/background handling, and DI registration. Works with XAML/MVVM, C# Markup, and MauiReactor. USE FOR: "local notification", "schedule
name: maui-local-notifications description: > Add local notifications to .NET MAUI apps on Android, iOS, and Mac Catalyst. Covers notification channels, permissions, scheduling, foreground/background handling, and DI registration. Works with XAML/MVVM, C# Markup, and MauiReactor. USE FOR: "local notification", "schedule notification", "notification channel", "notification permission", "reminder notification", "alert notification", "in-app notification", "foreground notification". DO NOT USE FOR: push notifications from a server (use maui-push-notifications), permission handling only (use maui-permissions), or app lifecycle background tasks (use maui-app-lifecycle).
1. Define cross-platform `INotificationManagerService` interface and event args 2. Implement Android notification service (channel, AlarmManager, BroadcastReceiver) 3. Implement iOS/Mac Catalyst notification service (UNUserNotificationCenter) 4. Register platform implementations via DI 5. Configure platform permissions and MainActivity
See `references/local-notifications-api.md` for full implementation code.
| Issue | Fix | |---|---| | Notifications silently fail on API 33+ | Must request `POST_NOTIFICATIONS` runtime permission first | | `PendingIntent` crash on Android 12+ | Must include `PendingIntentFlags.Immutable` for API 31+ | | Scheduled notifications lost on reboot | `AlarmManager` does **not** survive device restart — re-schedule on boot via `BOOT_COMPLETED` receiver | | No notification appears | Channel not created — required on API 26+ (Android 8.0) | | Notification tap doesn't return to app | `LaunchMode = LaunchMode.SingleTop` must be set on `MainActivity` |
// ✅ Correct — API 31+ requires Immutable flag
var pendingIntentFlags = (Build.VERSION.SdkInt >= BuildVersionCodes.S)
? PendingIntentFlags.CancelCurrent | PendingIntentFlags.Immutable
: PendingIntentFlags.CancelCurrent;
// ❌ Wrong — crashes on Android 12+
var pendingIntentFlags = PendingIntentFlags.CancelCurrent;| Issue | Fix | |---|---| | No notification prompt appears | Permission already denied — user must re-enable in Settings | | Foreground notifications don't show | Must implement `UNUserNotificationCenterDelegate` and set `Current.Delegate` | | Notification shows `Alert` not `Banner` | Use `UNNotificationPresentationOptions.Banner` on iOS 14+ |
// ✅ iOS 14+ — use Banner
completionHandler(OperatingSystem.IsIOSVersionAtLeast(14)
? UNNotificationPresentationOptions.Banner
: UNNotificationPresentationOptions.Alert);
// ❌ Always using Alert — deprecated on iOS 14+
completionHandler(UNNotificationPresentationOptions.Alert);⚠️ Windows App SDK supports toast notifications but **scheduled notifications are not yet supported**. Immediate notifications work.
// ✅ Must use #if guards — there's no cross-platform implementation
#if ANDROID
builder.Services.AddTransient<INotificationManagerService,
Platforms.Android.NotificationManagerService>();
#elif IOS
builder.Services.AddTransient<INotificationManagerService,
Platforms.iOS.NotificationManagerService>();
#elif MACCATALYST
builder.Services.AddTransient<INotificationManagerService,
Platforms.MacCatalyst.NotificationManagerService>();
#endif// ❌ Sending without checking permission — silent failure on API 33+
notificationManager.SendNotification("Title", "Body");
// ✅ Request permission first
#if ANDROID
var status = await Permissions.RequestAsync<Platforms.Android.NotificationPermission>();
if (status != PermissionStatus.Granted) return;
#endif
// ❌ Updating UI directly from notification callback — cross-thread exception
notificationManager.NotificationReceived += (s, e) =>
myLabel.Text = ((NotificationEventArgs)e).Title;
// ✅ Marshal to UI thread
notificationManager.NotificationReceived += (s, e) =>
MainThread.BeginInvokeOnMainThread(() =>
myLabel.Text = ((NotificationEventArgs)e).Title);| Need | Approach | |---|---| | Immediate notification | `SendNotification(title, message)` with `null` notifyTime | | Scheduled reminder | `SendNotification(title, message, DateTime.Now.AddMinutes(30))` | | Persist across reboot (Android) | Add `BOOT_COMPLETED` receiver to re-schedule alarms | | Rich notifications (images, actions) | Extend platform implementations with native APIs | | Push notifications from server | Use a different pattern entirely (FCM/APNs) |
A collection of 41 skills for .NET MAUI development, UI/UX design reasoning, and Xamarin migration, designed for use with GitHub Copilot CLI and Claude Code.
Guide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties…
.NET MAUI view animations, custom animations, easing functions, rotation, scale, translation, and fade effects. USE FOR: "animate…
.NET MAUI app icon configuration, splash screen setup, SVG to PNG conversion at build time, composed/adaptive icons, and…
.NET MAUI app lifecycle guidance covering the four app states (not running, running, deactivated, stopped), cross-platform Window…
Guide for .NET MAUI apps consuming .NET Aspire-hosted backend services. Covers AppHost configuration, service discovery for…
Add authentication to .NET MAUI apps. Covers WebAuthenticator for generic OAuth 2.0 / social login, and MSAL.NET for Microsoft…