microsoft / microsoft/WindowsAppSDK
AppNotificationManager doesn't support multiple app entries.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
I have a packaged MSIX which has 2 app entries in package.manifest. "App A" and "App B". I want to be able to raise app notifications from App A with the name of App B, and vice versa.
Previously this was possible using with ToastNotificationManager.CreateToastNotifier that takes applicationId as parameter, but AppNotificationManager.Default does not support this.
Also, having 2 different com server for app notification handling crashes AppNotificationManager.Default.Register() crash with COMException that says "The class is configured to run as a security id different from the caller", which is expected but blocks the notification handling for the second registry.
### Steps to reproduce the bug
1. Create another entry under tag in your package.appxmanifest.
2. Define desktop:Extension and com:Extension for both of the application entries in package.appxmanifest.
3. Run the app.
You'll see that AppNotificationManager.Default.Register() crashes with COMException. Also, there is no API to create notifications between app entries.
### Expected behavior
AppNotificationManager should be extended with better APIs to handle multiple app entries.
### Screenshots
_No response_
### NuGet package version
2.0.250930001-experimental1
### Packaging type
Packaged (MSIX)
### Windows version
Insider Build (xxxxx)
### IDE
Visual Studio 2022-preview
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with AppNotificationManager.Default and its Register() behavior, then reproduce the issue using two entries with desktop:Extension and com:Extension entries in package.appxmanifest. Done would require a supported way to target notifications across app entries and prevent the second registration from failing with the reported COMException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100