Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Gaoyifei1011 opened this issue Nov 5, 2024 · 0 comments
Labels
area-Notifications Toast notification, badges, Live Tiles, push notifications feature proposal

Comments

@Gaoyifei1011
Copy link

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

@RDMacLachlan RDMacLachlan added area-Notifications Toast notification, badges, Live Tiles, push notifications feature proposal and removed needs-triage labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Notifications Toast notification, badges, Live Tiles, push notifications feature proposal
Projects
None yet
Development

No branches or pull requests

2 participants