Open sunnyville opened 5 years ago
Try this:
Solution from: https://www.thewindowsclub.com/notifications-missing-from-action-center
Hope this helps.
I am using this. It works perfectly. You can assign any string to appid, that would become the name of the notifications but I can't seem to figure out how to clear out the notifications or make python listen for the click event It is supported by MS and can work in lastest update refer https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-ux-guidance
from winrt.windows.ui.notifications import ToastNotificationManager, ToastNotification
import winrt.windows.data.xml.dom as dom
appid=r'C:\Users\HP\AppData\Local\Programs\Python\Python38\python.exe'
notifier = ToastNotificationManager.create_toast_notifier(appid)
tString = """<toast duration='short'><audio src = 'ms-winsoundevent:Notification.Reminder' loop = 'false' silent = 'false'/><visual><binding template='ToastText02'><text id="1">""" + title + """</text><text id="2">""" + desp + """</text></binding></visual></toast>"""
xDoc = dom.XmlDocument()
xDoc.load_xml(tString)
notifier.show(ToastNotification(xDoc))
Hi,
I've been using this library for a long time and never had any problems. Recently I let Windows update with it's latest update, and right after that I stopped getting notification from my program. I tested this by creating a simple python file with only the sample code of this library and again the notification didn't popup. I noticed whenever the notification was supposed to popup it will only show an icon in the system tray and not show the notification.
I suspect this has to do with Windows' feature of "Focus Assist" that I only noticed recently. I also noticed that there is a white-list of programs in the "Notifications & Actions" section of Settings, where you can enable or disable notifications from certain programs and sources, which I'm not sure was there before.
Would really appreciate a feedback on this as this library is very crucial for my application.
Thank you.