microsoft / microsoft/WindowsAppSDK

Please provide a UWP/WASDK application notification event API for permission status changes

Open
#4,850 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Notifications feature proposal
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

Describe the bug

Please provide a UWP/WASDK application notification event API for permission status changes

---------------------------------------------

请提供一个 UWP/WASDK 应用程序通知权限状态发生变化的事件 API


In UWP, there is an API ToastNotifier.Setting Attributes.

---------------------------------------------

在 UWP 中,有这样的一个 API ToastNotifier.Setting 属性。


In WASDK, there is an API like this, AppNotificationManager. Setting Attributes.

---------------------------------------------

在 WASDK 中,有这样的一个 API,AppNotificationManager.Setting 属性。


We can use these two properties in UWP and WASDK, respectively, to get the notification permissions for the system or app, and to check if the notification permissions for the current app are enabled. However, when I manually modified the notification permissions of the app, I found that there was no corresponding event or message sent (normally, when the system settings are changed, WM_SETTINGCHANGE messages will be sent to all apps), so I hope that the UWP and WASDK can provide a NotificationStatusChanged event to get the notification status of the current app

---------------------------------------------

我们可以分别在 UWP 和 WASDK 使用这两个这两个属性来获取系统或应用的通知权限,并检查当前应用的通知权限是否已经启用。然而当我在设置手动修改了应用的通知权限后,却发现没有对应的事件或消息发送(一般情况下,系统设置发生更改时,会向所有应用发送 WM_SETTINGCHANGE 消息),所以希望 UWP 和 WASDK 能提供一个 NotificationStatusChanged 事件来获取当前应用的通知状态发生变化的情况


Steps to reproduce the bug

Settings Notification(设置通知)


This includes the total notification permission settings and the notification permission settings for each app

---------------------------------------------

包括总通知权限设置和各个应用的通知权限设置

Image


When the notification permissions in the settings change, no message or event can perceive the change in this status

---------------------------------------------

当设置中的通知权限发生变化后,没有任何消息或事件可以感知这一状态的变化


Expected behavior

Provide an event in the WASDK or UWP that will allow the app to be aware of the change in the notification state of the current system

---------------------------------------------

请在 WASDK 或 UWP 中提供一个事件,可以让应用感知当前系统的通知状态发生变化


Screenshots

No response

NuGet package version

Windows App SDK 1.6.1: 1.6.240923002

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the UWP ToastNotifier.Setting and WASDK AppNotificationManager.Setting APIs cited in the issue, then verify how notification permission changes behave on Windows 11 22H2. Done means a supported UWP/WASDK notification-status-change event lets the current app observe system or app permission changes in the packaged MSIX scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, desktop, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.