AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Maui Push Notifications

skill-davidortinau-maui-skills-maui-push-notifications · by davidortinau

>

No reviews yet
0 installs
44 views
0.0% view→install

Install

$ agentstack add skill-davidortinau-maui-skills-maui-push-notifications

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-davidortinau-maui-skills-maui-push-notifications)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Maui Push Notifications? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Push Notifications — Gotchas & Best Practices

Troubleshooting Table

| Issue | Cause | Fix | |-------|-------|-----| | Token changes every debug run (Android) | Debug builds regenerate Firebase tokens | Always re-register in OnNewToken | | HttpClient requests fail silently | BaseAddress missing trailing / | Ensure endpoint ends with / | | iOS push won't arrive on simulator | Simulators don't support APNS | Use a physical iOS device | | No notifications on Android 13+ | POST_NOTIFICATIONS required (API 33+) | Call RequestPermissions in OnCreate | | Notification channel missing (API 26+) | Android requires explicit channel creation | Create channel before sending | | SendNotificationAsync throws for >20 tags | Azure NH tag expression limit | Batch tags in groups of 20 | | 422 on device registration | Platform string mismatch | Use "fcmv1" (not "gcm") and "apns" | | Token empty at RegisterAsync | Race condition on cold start | Guard with IsNullOrWhiteSpace check |

Critical Gotchas

⚠️ BaseAddress trailing slash

HttpClient.BaseAddress must end with /. Without it, relative URI resolution silently breaks.

// ❌ Relative URIs resolve incorrectly
_http = new HttpClient { BaseAddress = new Uri("https://example.com") };

// ✅ Trailing slash required
_http = new HttpClient { BaseAddress = new Uri("https://example.com/") };

⚠️ Android: Always re-register on token refresh

Firebase tokens regenerate frequently in debug builds. If you skip OnNewToken, the backend holds a stale token and pushes silently fail.

// ❌ Only registering once at startup
// (token may change later without re-registration)

// ✅ Always re-register in OnNewToken
public override void OnNewToken(string token)
{
    var svc = IPlatformApplication.Current?.Services.GetService();
    if (svc is null) return;
    svc.Token = token;
    _ = svc.RegisterAsync();
}

⚠️ Android 13+ requires POST_NOTIFICATIONS permission

Without explicitly requesting POST_NOTIFICATIONS on API 33+, notifications are silently dropped.

⚠️ Azure NH tag expression limit: 20 tags

SendNotificationAsync throws if a tag expression references more than 20 tags. Batch into chunks:

// ✅ Batch tags to stay under the limit
var batches = request.Tags.Chunk(20);
foreach (var batch in batches)
{
    var tagExpr = string.Join(" || ", batch);
    await _hub.SendFcmV1NativeNotificationAsync(payload, tagExpr, ct);
}

⚠️ Use "fcmv1" not "gcm"

The legacy "gcm" platform string causes 422 errors on device registration. Always use "fcmv1" for Android and "apns" for iOS.

⚠️ iOS simulators cannot receive push notifications

APNS only works on physical iOS devices. Simulators silently ignore push registrations.

Platform Checklist

Android

  • [ ] google-services.json in Platforms/Android/ with ` in .csproj`
  • [ ] Xamarin.Firebase.Messaging NuGet package added (Android-only condition)
  • [ ] POST_NOTIFICATIONS permission requested on API 33+
  • [ ] Notification channel created before first notification (API 26+)
  • [ ] OnNewToken always calls RegisterAsync
  • [ ] FirebaseMessagingService registered in manifest with MESSAGING_EVENT intent filter

iOS

  • [ ] Push Notifications capability enabled in Apple Developer portal
  • [ ] APNs key (.p8) uploaded to Azure Notification Hub
  • [ ] Entitlements.plist with aps-environment set to development or production
  • [ ] CodesignEntitlements set in .csproj
  • [ ] RegisterForRemoteNotifications called on main thread after authorization grant
  • [ ] Device token converted to lowercase hex string (no dashes)

Backend

  • [ ] Azure Notification Hub configured with FCM V1 JSON and APNS key
  • [ ] BaseAddress ends with trailing /
  • [ ] Tag expressions batched in groups of ≤20
  • [ ] Platform strings: "fcmv1" and "apns" (not legacy values)

Architecture Overview

MAUI app → ASP.NET Core backend → Azure Notification Hub → FCM / APNS → device

See references/push-notifications-api.md for full implementation templates.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.