You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds cross-platform support for Microsoft.Windows.AppNotifications and a legacy Windows.UI.Notifications scheduling adapter for platforms with native scheduling support.
Adds the app-notification contracts, builder API, payload parsing, durable state, progress updates, activation lifecycle, history, and removal.
Adds native backends for Android, iOS, Win32, macOS, X11, and WebAssembly.
Adds durable scheduled-toast handling for Android, iOS, and macOS. Scheduled toasts are not implemented by the Skia Win32, X11/Linux, or WebAssembly adapters; those paths report unsupported behavior rather than an in-process substitute. Native WinUI on Windows continues to use the Windows SDK implementation.
Adds an AppNotificationManager manual sample plus unit coverage for API parity, builders, translators, state recovery, scheduling, and payload hardening.
Adds documentation for the feature and for the WebAssembly service-worker feature flag.
Source and API alignment
The implemented Microsoft.Windows.AppNotifications and ...Builder contract versions are checked against the metadata in Microsoft.WindowsAppSDK.Foundation 2.3.5. The authoritative implementation source for these non-UI APIs is Windows App SDK, not Microsoft UI XAML.
The notification objects, progress data, activation decoder, and builder components now use source-attributed declaration/header/implementation partials. The port includes native XML ordering and limits, sticky button-style behavior, IStringable.ToString(), and Windows-version capability gates. CLR collection/null/XML-safety adaptations remain explicit in Uno partials; they are not described as byte-for-byte native getter/storage behavior. Calling-preview and conferencing additions remain outside the advertised implemented contract versions.
Current master is integrated non-destructively and the implementation is migrated into Uno.WinRT. Platform registration, delivery, and durable state remain explicit adapters. Windows preserves native-only raw XML and uses the SDK's in-place progress update rather than re-posting. History preserves originally posted progress values with transient sequence 1, separately from the latest update/recovery state.
Review follow-up
Android notification and boot permissions are consuming-app manifest opt-ins, not unconditional library permissions. New scheduling requires the boot opt-in, while migrated schedules remain enumerable/removable and pending cancellations can recover without it.
Android Register() initiates the existing asynchronous permission flow when declared and required; registration is not treated as a grant, and live Setting remains authoritative.
Win32 registration forwards actual native startup activation only for the pinned toast contract, without eagerly decoding unrelated protocol/push activations. Startup-read failures roll back the call's foreground registration/subscription while preserving persistent registration and the original error.
Complete per-TFM runtime asset groups carry the backend, support assembly and native projections through normal package-consumer loading.
Compile: analyzer-enabled Win32 and Android builds pass without warnings/errors. Four SDK-merged Android manifest variants verify explicit opt-ins and the disabled, non-exported boot receiver.
Runtime: 429 notification unit cases, 24 normal-package consumer process cases and 12 fixture process cases pass, including native activation ordering, timeout/retry, rollback and cleanup. The package cases use the actual Win32 nupkg with normal assembly loading; surrounding unpublished Uno dependencies remain project references.
Runtime (direct Android registration): three fresh task-owned identities on API 34 / target SDK 36 called production Register() once, without the sample preflight or a direct permission request. Allow displayed the native dialog and transitioned to Enabled with one granted callback; Deny remained DisabledForApplication with one denied callback; a missing declaration remained DisabledByManifest with no dialog/callback. Only the isolated emulator and probe identities were used, and cleanup was verified.
Limits: reboot/scheduled delivery, other Android versions and actual Windows Shell notification clicks are not claimed by these checks. No global software installation or unrelated notification cleanup was performed.
Previously recorded repair validation
Latest follow-up validated at de6e962ab403a31df879df8600a32c0f3e9a7313 using local .NET 10 overrides; repository target defaults were not changed.
Compile: Skia Win32 backend (analyzers enabled) and SamplesApp desktop builds succeeded with zero warnings/errors.
Unit tests: 378 focused notification/toast cases passed, none skipped. Coverage includes raw native XML, API surface, builders, activation parsing, schema 4/5 migration, posted versus current progress, an unacknowledged content replacement followed by a progress update, and lossless legacy text/attribute restoration without rendering the third line twice.
Service worker: seven builtin Node tests passed, none skipped, covering closing clients, activation fallback/navigation, acknowledgement timeout, port cleanup, unexpected-error reporting, and dismissal delivery. They run in the existing WASM CI job.
Runtime: three actual Skia Win32 API/backend cases passed, none skipped: native posting, extended XML/history, correctly bound progress updates, legacy Show/GetHistory, and scoped removal. These use suppressed display and do not claim visual notification-presentation QA.
Native differential probes (initial source repair): compared the production backend with direct Windows App SDK controls. Progress preserves native notification identity; content replacement still posts new content. Public history matches native history for originally posted sequence 7 and for notifications with no initial progress.
Regression evidence: nine targeted C# contract cases and all seven service-worker cases failed before their fixes and passed afterward. A native probe separately reproduced the previous progress re-posting behavior.
Earlier PR QA, not rerun in this Windows repair pass:
The broad unit run reported 4418 passes with unrelated, timezone-dependent Windows_Globalization.When_Calendar.When_Gregorian_* failures.
iOS 26.0 simulator: authorization, immediate/scheduled delivery, history, removal, and tap activation.
macOS 26.5.2: native bridge build, authorization, immediate/scheduled delivery, history, removal, and tap activation.
Review platform backends and cross-platform correctness
Review state/persistence layer
Review tests and samples
Post inline comments and finalize summary
Overall verdict: fix-first — the architecture is well-structured and the breadth of coverage is impressive, but there are a handful of correctness issues that should be addressed before merging.
Issue summary
Severity
Count
Bug (state inconsistency)
3
Performance / stall risk
1
Reliability (activation drain)
1
Cross-cutting observations
State-cleanup contract is fragile (the biggest concern). Three separate inline comments cover the same root cause: when a backend's Remove() throws instead of returning silently, AppNotificationManager.Remove() never reaches state.RemoveById(). This leaves orphaned records in the on-disk state store. The cleanest fix is a two-part change:
Make LinuxAppNotificationManagerBackend.Remove() and MacOSAppNotificationManagerBackend.Remove() return silently when the service is unavailable or the notification is already gone. These are idempotent operations — "notification is absent" is the goal, not "notification was present and we removed it."
As a defensive backstop, restructure the AppNotificationManager.Remove() private method so state.RemoveById() always runs, even if backend.Remove() throws.
iOS EnsureCategory holds _gate during a 10 s blocking native round-trip. Every notification with action buttons pays this cost, and any concurrent notification operation is blocked for that duration. Caching the last-registered category identifier avoids the native call when nothing changed.
AppNotificationActivationBroker.Drain aborts the queue on handler exception. The current behavior re-throws and leaves remaining queued activations undelivered. All call sites already catch the propagated exception, so the user sees at most one activation; subsequent ones are silently dropped until the next Publish/Register.
FileAppNotificationStatePersistence atomic write-via-temp-file + backup-before-replace pattern is solid.
AppNotification.Expiration locking, CaptureSnapshot, and the two-gate design (_gate / _lifecycleGate) in AppNotificationManager are well thought out.
AddRequest() (iOS) correctly fires-and-forgets to avoid UI-thread deadlock on immediate notifications — the PR description explains the fix and the comment confirms it.
XAML sample uses {ThemeResource ApplicationPageBackgroundThemeBrush} and ThemeResource for all foreground/background colours — passes style guidelines.
Source-generated JsonSerializerContext used on macOS and WASM backends — no JsonDocument runtime parsing.
No event Action<T> declarations anywhere in the new code — correct TypedEventHandler<,> / EventHandler<TEventArgs> usage throughout.
AppNotificationPayloadParser.ValidateChildElements prevents silent attribute/element drift from accumulating.
Unit test coverage for builders, translators, state recovery, scheduling, and codec is comprehensive.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. 1 out of 3 committers have signed the CLA.
✅ morning4coffe-dev ❌ Dominik Titl ❌ Copilot
Dominik Titl seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it.
Review core files for previously flagged and new issues
Post inline comments
Finalize summary
Overall verdict: fix-first — three of the five issues from the previous review remain unfixed; one new issue was found. The architecture is solid and the unit-test breadth is impressive, but the state-cleanup contract is still fragile.
Status of previously reported issues
#
Issue
Status
1
LinuxAppNotificationManagerBackend.Remove() throws when service unavailable
❌ Still present — inline comment posted
2
MacOSAppNotificationManagerBackend.Remove() throws for dismissed notifications
❌ Still present — inline comment posted
3
RemoveWithAcknowledgement drops state.TryRemove when backend throws
❌ Still present — inline comment posted
4
iOS EnsureCategory holds _gate during blocking native round-trip
✅ Mitigated — _registeredCategoryIdentifiers cache added; first-call still blocks but is no longer per-show
5
AppNotificationActivationBroker.Drain aborts queue on handler exception
✅ Fixed — now collects failures, continues draining, re-throws AggregateException after
New finding
WASM [JSExport] Dispatch has no exception guard — the improved Drain() re-throws an AggregateException after completing the drain when any handler throws. The WASM Dispatch method calls Publish() without a try/catch, so that exception propagates across the JS→WASM boundary and can crash the runtime. iOS wraps the equivalent call in a try/catch; WASM should too. Inline comment posted on WebAssemblyAppNotificationManagerBackend.wasm.cs:295.
What looks good (unchanged from prior review)
TypeScript navigateProtocol now uses blockedProtocolSchemes Set that includes vbscript: — the CodeQL finding is resolved.
FileAppNotificationStatePersistence atomic write pattern is solid.
Gather context (triggered by push of commit 44259ae6, "fix: restore app notification source parity" — a large-scale re-split of the App Notifications sources into the repo's .h.mux.cs/.mux.cs/.uno.cs WinUI-port convention, plus reapplication of several fixes from earlier review rounds)
Review new/changed code against AGENTS.md criteria
Post inline comments for findings
Finalize summary
Overall verdict: fix-first — one substantive, previously-flagged-but-unaddressed issue remains (Android manifest/permission surface). Everything else in this push is either a clean mechanical restructuring or a re-application of logic already validated in prior review rounds.
Findings posted inline
Severity
File
Summary
Medium (architecture/privacy surface)
AppNotificationsPermissions.Android.cs
RECEIVE_BOOT_COMPLETED + POST_NOTIFICATIONS and a boot-triggered BroadcastReceiver (AndroidToastNotificationBootReceiver) are injected unconditionally into every Android app referencing Uno.WinRT, not just apps using scheduled app notifications. First flagged by Copilot on 2026-08-25 as "needs a closer look"; still unaddressed. Suggest gating behind an opt-in feature flag, mirroring the UseServiceWorkerOnWebAssembly pattern already used elsewhere in this same PR.
Low (pre-existing, minor)
App.Tests.cs:271-272
TryNavigateToLaunchSample indexes pathParts[0]/[1] without a length check; relies on the surrounding catch for malformed launch arguments instead of an explicit guard. Not a functional bug (caught and logged), also previously flagged by Copilot and left as-is.
What I verified in this push (no issues found)
File-split correctness: spot-checked the newly introduced .h.mux.cs/.mux.cs/.uno.cs triples for AppNotification, AppNotificationBuilder, and AppNotificationComboBox — fields/properties/methods are each declared exactly once across the partial-class files, base .cs files are reduced to the [ContractVersion]-attributed empty partial declaration, and MUX reference-source attribution lines are present and accurate.
Schema v4→v6 migration (FileAppNotificationStatePersistence.ReadRecord/WriteRecord): version-gated reads for IsProgressUpdate (v5+) and PostedProgress (v6+, falling back to progress for older snapshots) are consistent and match the writer.
PostedProgress/IsProgressUpdate state-machine (AppNotificationStateStore.BeginProgressUpdate): correctly distinguishes "a progress value chained onto an unacknowledged content replacement" (PostedProgress advances, IsProgressUpdate stays false) from "a plain progress-only update" (PostedProgress untouched until acknowledged, IsProgressUpdate = true) — backed by the new When_Progress_Changes_History_Preserves_Posted_Properties and When_Replacement_Throws_A_Progress_Update_Still_Delivers_The_Replacement tests, which assert the exact history/posted-progress split.
IAppNotificationRawPayloadCapability (Win32 backend): Show() now skips portable-payload parsing only for backends that opt into raw XML, and CreateNativeNotification throws instead of silently degrading via the old BuildFallbackPayload when RawPayload is empty — but every call path populates RawPayload from the builder's XML, so this is a real invariant assertion, not a live regression. Covered by the new When_Backend_Consumes_Raw_Xml_Then_Extended_Windows_Payload_Is_Preserved / When_Backend_Needs_Portable_Translation_Then_Extended_Payload_Is_Not_Silently_Truncated tests.
RemoveByTagAndGroupAsync("tag", "") now throws ArgumentException via ValidateIdentifier instead of the looser ValidateGroup — consistent with the contract-parity fix already reviewed and approved on 2026-09-08, now correctly carried through the restructuring; the existing When_Remove_Arguments_Are_Invalid_Manager_Throws test was updated accordingly.
Documentation: the iOS/tvOS → iOS support-matrix correction and the new "tvOS has no app notification backend" note resolve the Copilot-flagged doc accuracy issue from 2026-08-25.
AppNotificationComboBox.Items: the setter still accepts a plain Dictionary, but GetSelectionItems() always re-sorts into a fresh SortedDictionary<string, string>(StringComparer.Ordinal) before serializing, so output ordering is deterministic regardless of the backing collection type — the Copilot-flagged non-determinism concern doesn't materialize in the emitted XML.
Validation
Code review: by inspection only, as detailed above.
Compile/Runtime: not performed in this pass — given the scale of the restructuring (25 files re-split in the Builder namespace alone), I'd recommend confirming a fresh Tests - Unit Tests / Uno.WinAppSDKSyncGenerator CI run is green on this exact head before merge if not already covered.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved moderate findings remain across platform reliability, state handling, scheduling, validation, and test coverage.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (16)
doc/articles/feature-flags.md:90
In service-worker mode, Register() starts navigator.serviceWorker.register() asynchronously and returns before serviceWorkerRegistration is assigned. If permission is already granted, Setting is immediately Enabled, so following this documented sequence can call Show while the registration is still null; the persistent show then fails and the first notification is lost. Make posting await worker readiness (or expose readiness separately) before treating registration as ready. doc/articles/features/app-notifications.md:11
This bullet says unsupported structures are rejected, but the portable translators intentionally omit unsupported parts (for example, extra text and excess actions) and continue posting while logging warnings. The documentation therefore promises stricter behavior than the implementation; describe those parts as omitted/reported instead. doc/articles/features/app-notifications.md:39
The claim that state is persisted on every target is false for the default WebAssembly document mode: AppNotificationStatePersistenceFactory selects InMemoryAppNotificationStatePersistence unless the service-worker flag is enabled. IDs, progress, and pending activation state therefore do not survive a reload/process restart in that documented default mode; qualify this bullet and point users to service-worker mode for durable browser state. doc/articles/features/app-notifications.md:24
The table marks Linux as supporting cold-start activation, but this backend only receives ActionInvoked through the live D-Bus subscription; it has no launcher or other out-of-process activation path, and the native mapping is discarded when the session ends. A notification clicked after the app exits cannot deliver NotificationInvoked on Linux; remove the checkmark or implement a cold-start mechanism. src/Uno.UI.Runtime.Skia.Win32/AppNotifications/Win32AppNotificationManagerBackend.cs:179
If EnsureRegistered() fails, this method silently returns, after which AppNotificationManager.RemoveWithAcknowledgement removes the durable record as though native removal succeeded. A transient Windows App SDK bootstrap/registration failure can therefore leave the native notification orphaned with no recovery path; propagate the failure or return an explicit removal acknowledgement. RemoveAll has the same issue below. src/Uno.UI.Runtime.Skia.Win32/AppNotifications/Win32AppNotificationManagerBackend.cs:187
RemoveAll has the same acknowledgement problem as Remove: a failed EnsureRegistered() returns normally, so the manager can discard durable records even though the native notifications were not closed. Preserve the records by propagating the failure or expose the native acknowledgement to the manager. src/Uno.UI.Runtime.Skia.X11/AppNotifications/LinuxAppNotificationManagerBackend.cs:219
GetContext reads initialization.Result after a synchronous wait, and the helper below repeats the blocking pattern with GetAwaiter().GetResult(). These new D-Bus bridges violate the repository's async discipline and can deadlock or obscure task failures; keep the operation asynchronous or provide a non-blocking completion bridge. src/Uno.UI.Runtime.Skia.X11/Hosting/X11ApplicationHost.cs:101
This registration makes the X11 backend available to synchronous AppNotificationManager.IsSupported/Setting calls, but the backend's D-Bus initialization waits synchronously for up to its 10-second timeout. When the desktop notification daemon or session bus is unavailable, a normal capability check from the UI thread can therefore block the application for several seconds. Keep connection establishment non-blocking for the sync API (or cache an asynchronous readiness result) before exposing this backend. src/Uno.UI.RuntimeTests/Tests/Microsoft_Windows_AppNotifications/Given_AppNotificationNativeBackend.cs:27
These runtime cases convert an unavailable Windows App SDK backend into Assert.Inconclusive, so the suite can report a non-verifying outcome instead of failing when the feature is not actually exercised. The repository review rules disallow inconclusive tests; arrange execution only where the prerequisites are guaranteed or make the unavailable prerequisite a real failure. src/Uno.UI.RuntimeTests/Tests/Microsoft_Windows_AppNotifications/Given_AppNotificationNativeBackend.cs:51
This second prerequisite branch also uses Assert.Inconclusive, allowing the added runtime test to pass without validating notification delivery when notifications are disabled. Remove the inconclusive path by guaranteeing the required environment or treating the missing prerequisite as a test failure. src/Uno.WinRT/Microsoft/Windows/AppNotifications/AppNotificationManager.cs:1028
When RefreshAndReconcileStateAsync cannot obtain active IDs (for example, after a WebAssembly service-worker refresh failure), it returns false, but this result is ignored here. GetAllAsync can therefore return stale durable Shown records as if they were active instead of refusing to serve unverified state; handle the failure consistently with UpdateAsyncCore and RemoveAsyncCore. src/Uno.WinRT/Microsoft/Windows/AppNotifications/Builder/AppNotificationComboBox.mux.cs:38
The count check runs before assignment, so calling AddItem to replace an existing item throws once the combo box already has five entries even though the number of entries would not grow. Check whether id already exists before enforcing the maximum (and validate the ID before the count check). src/Uno.WinRT/Microsoft/Windows/AppNotifications/Builder/AppNotificationProgressBar.uno.cs:28
double.NaN passes this range check because both comparisons with NaN are false. The resulting XML contains value='NaN', which is not a valid progress value and will fail later during payload validation or native posting. Reject non-finite values before storing the value. src/Uno.WinRT/Microsoft/Windows/AppNotifications/Internal/AndroidAppNotificationTranslator.cs:31
SetAudioUri/SetAudioEvent and looping audio populate Payload.Audio, but the Android command has no audio source and the backend never consumes it. Because this translator does not report custom audio as unsupported, Android silently falls back to the channel default instead of telling callers that the requested audio was ignored. src/Uno.WinRT/Microsoft/Windows/AppNotifications/Internal/AppleAppNotificationManagerBackend.iOS.cs:11
IsSupported is hard-coded to true, but AppleAppNotificationRuntime.IsSupported performs the actual UserNotifications/bundle capability check. As a result, AppNotificationManager.IsSupported() reports support on hosts where the native runtime returns unsupported, and callers can proceed into registration/posting instead of taking the unsupported path. Delegate this property to the runtime capability check. src/Uno.WinRT/Microsoft/Windows/AppNotifications/Internal/AppleAppNotificationRuntime.iOS.cs:244
These new synchronous bridges block on a Task and then read Task.Result (the same pattern is repeated for pending and delivered notification queries). This violates the repository's async discipline and can deadlock if UserNotifications invokes the completion on the blocked thread; use an asynchronous path or a non-blocking native bridge.
Require consuming-app manifest opt-ins and initiate the declared runtime permission flow. Gate new schedules before persistence while retaining enumeration, cancellation and recovery of migrated schedules after permission changes.
Co-authored-by: Copilot <[email protected]>
Decode only the pinned toast activation contract and preserve unrelated activation ordering. Roll back foreground registration transactionally on startup-read failure, retain persistent state, and ship complete runtime asset groups for normal package loading.
Exercise native ordinary, toast, push, timeout, retry and cleanup behavior through isolated package consumers and process fixtures.
Co-authored-by: Copilot <[email protected]>
Gather context (triggered by push of commits 549f6e9e, 6d8035ff, 352bf519 since the last automated review on 44259ae6)
Diff the new commits against the previous review point
Review new/changed code against AGENTS.md criteria
Post inline comments for findings
Finalize summary
Overall verdict: no new findings. This push is three focused fixes, each closing a previously-flagged issue with matching root-cause changes and test coverage.
What changed and what I verified
549f6e9e — Android permission scoping. The unconditional [assembly: UsesPermission(POST_NOTIFICATIONS, RECEIVE_BOOT_COMPLETED)] file (AppNotificationsPermissions.Android.cs, flagged repeatedly by Copilot and the automated reviewer since 2026-08-25) is deleted entirely — apps now opt in themselves via their own manifest. AndroidAppNotificationManagerBackend.Register() now fires RequestPermissionAsync() (fire-and-forget, internal try/catch, so no unobserved-exception risk) which calls the existing PermissionsHelper.TryGetPermission only when AndroidAppNotificationSettingEvaluator.ShouldRequestRuntimePermission (new, unit-tested with 8 data rows) says the permission is declared-but-ungranted on API 33+ — closing the earlier "Register() never requests POST_NOTIFICATIONS" finding. ToastNotificationScheduler.Add() now calls _lifecycle?.ValidateNewSchedule()before_store.Add(...), so a missing RECEIVE_BOOT_COMPLETED declaration rejects a new schedule before it's persisted, while AndroidToastNotificationBootReceiverLifecycle.Reconcile() still lets existing/migrated schedules be enumerated, removed, and recovered after the permission is revoked (_hasBootPermission() && ShouldEnable(...) only gates the receiver's enabled state, not read/remove access to the durable store). Covered by 8 new tests in Given_AndroidToastNotificationBootReceiverLifecycle exercising exactly this pre/post-permission-loss matrix, red-before/green-after style (Assert.ThrowsExactly for the gated-add path, permission-query-failure isn't treated as opt-out).
6d8035ff — Win32 cold-start activation forwarding. Addresses the same reviewer's earlier finding that Register() only subscribed to the live NotificationInvoked event and never read the toast activation Windows App SDK stores for cold starts. RegisterCore now calls ReadStartupActivation() once per process (guarded by _hasReadStartupActivation), gated by a new Win32AppNotificationActivation.IsAppNotificationLaunch helper that decodes only the exact ----AppNotificationActivated: COM-launch argument and defers when a higher-priority protocol/push qualifier (----ms-protocol:, ----WindowsAppRuntimePushServer:) is present anywhere in argv, regardless of order — 20+ data-row unit tests in the new Given_Win32AppNotificationActivation cover exact-match vs. prefix/casing/embedded variants and order-independence. If ReadStartupActivation() throws after native register(manager) succeeded, the catch block now rolls back transactionally (manager.Unregister() + unsubscribe, aggregating rollback failures into an AggregateException alongside the original) instead of leaving _isRegistered true with a native/managed state mismatch. AppNotificationActivationBroker.Publish(startupActivation) is called outside the _gate lock, consistent with the pattern already used to avoid holding a lock across a broker callback. The accompanying csproj/targets changes ship Microsoft.Windows.AppLifecycle.{winmd,Projection.dll} (needed for AppInstance.GetActivatedEventArgs()) through the same asset-flow paths as the existing AppNotifications assets.
352bf519 — sample/doc cleanup.App.Tests.cs now returns false when pathParts.Length < 2 instead of relying on the surrounding catch for a malformed sample=OnlyCategory argument — the exact fix Copilot suggested on 2026-08-25/2026-09-17. The docs support matrix is corrected to show ScheduledToastNotification as unsupported on Windows (Skia Win32) and Linux, matching Win32Host.cs/X11ApplicationHost.cs only registering IAppNotificationManagerBackend (no IToastNotificationSchedulerBackend — only MacSkiaHost.cs does), plus new sections documenting the Android manifest opt-in and Windows cold-start activation behavior just implemented.
Cross-cutting note (not introduced by this push)
Copilot's 2026-09-17 review flagged several still-open items in files this push didn't touch — notably Win32AppNotificationManagerBackend.Remove()/RemoveAll() silently returning (and letting the manager discard the durable record) when EnsureRegistered() fails, mirroring the exact fake-success pattern already fixed for the Linux/macOS backends earlier in this PR. Worth a follow-up given the precedent, but outside the scope of this diff.
Validation
Code review: by inspection only, as detailed above.
This synchronous public backend path blocks on a task and reads Result while initialization performs D-Bus I/O. Calls such as IsSupported, Show, and Remove can therefore stall the UI thread for the full 10-second timeout and use sync-over-async exception semantics; cache/initialize the connection without blocking the caller instead.
Clarify handling of unsupported payload structures
doc/articles/features/app-notifications.md:11
Portable backends do not consistently reject unsupported structures: Android, Linux, and WebAssembly take only the supported subset of text/actions and report the rest as unsupported (for example, Linux truncates actions at lines 61-68). This wording should distinguish parser-rejected XML from platform features that are ignored or truncated, otherwise users may assume the full payload was delivered.
Linux remove APIs do not throw when D-Bus is unavailable
doc/articles/features/app-notifications.md:35
The Linux note does not match the public manager behavior: when the D-Bus daemon is unavailable, IsSupported is false and RemoveByIdAsync/the other public remove methods return a completed no-op before calling the backend, rather than faulting. Update the note or change the public API behavior so applications are not told to expect an exception that cannot occur.
Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.
Queue this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area/automationCategorizes an issue or PR as relevant to project automationarea/buildCategorizes an issue or PR as relevant to build infrastructurearea/skia ✏️Categorizes an issue or PR as relevant to Skiakind/documentationplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platformplatform/macos 🍏Categorizes an issue or PR as relevant to the macOS platformplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformplatform/x11 🐧Categorizes an issue or PR as relevant to X11
7 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #22462
PR Type:
✨ Feature
What changed? 🚀
Adds cross-platform support for
Microsoft.Windows.AppNotificationsand a legacyWindows.UI.Notificationsscheduling adapter for platforms with native scheduling support.AppNotificationManagermanual sample plus unit coverage for API parity, builders, translators, state recovery, scheduling, and payload hardening.Source and API alignment
The implemented
Microsoft.Windows.AppNotificationsand...Buildercontract versions are checked against the metadata inMicrosoft.WindowsAppSDK.Foundation2.3.5. The authoritative implementation source for these non-UI APIs is Windows App SDK, not Microsoft UI XAML.The notification objects, progress data, activation decoder, and builder components now use source-attributed declaration/header/implementation partials. The port includes native XML ordering and limits, sticky button-style behavior,
IStringable.ToString(), and Windows-version capability gates. CLR collection/null/XML-safety adaptations remain explicit in Uno partials; they are not described as byte-for-byte native getter/storage behavior. Calling-preview and conferencing additions remain outside the advertised implemented contract versions.Current master is integrated non-destructively and the implementation is migrated into
Uno.WinRT. Platform registration, delivery, and durable state remain explicit adapters. Windows preserves native-only raw XML and uses the SDK's in-place progress update rather than re-posting. History preserves originally posted progress values with transient sequence1, separately from the latest update/recovery state.Review follow-up
Register()initiates the existing asynchronous permission flow when declared and required; registration is not treated as a grant, and liveSettingremains authoritative.Compile: analyzer-enabled Win32 and Android builds pass without warnings/errors. Four SDK-merged Android manifest variants verify explicit opt-ins and the disabled, non-exported boot receiver.
Runtime: 429 notification unit cases, 24 normal-package consumer process cases and 12 fixture process cases pass, including native activation ordering, timeout/retry, rollback and cleanup. The package cases use the actual Win32 nupkg with normal assembly loading; surrounding unpublished Uno dependencies remain project references.
Runtime (direct Android registration): three fresh task-owned identities on API 34 / target SDK 36 called production
Register()once, without the sample preflight or a direct permission request. Allow displayed the native dialog and transitioned toEnabledwith one granted callback; Deny remainedDisabledForApplicationwith one denied callback; a missing declaration remainedDisabledByManifestwith no dialog/callback. Only the isolated emulator and probe identities were used, and cleanup was verified.Limits: reboot/scheduled delivery, other Android versions and actual Windows Shell notification clicks are not claimed by these checks. No global software installation or unrelated notification cleanup was performed.
Previously recorded repair validation
Latest follow-up validated at
de6e962ab403a31df879df8600a32c0f3e9a7313using local .NET 10 overrides; repository target defaults were not changed.Earlier PR QA, not rerun in this Windows repair pass:
Windows_Globalization.When_Calendar.When_Gregorian_*failures.PR Checklist ✅
Screenshots Compare Test Runresults.