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

how to storage notifications into Action center #76

Open
lukifer195 opened this issue Aug 5, 2020 · 2 comments
Open

how to storage notifications into Action center #76

lukifer195 opened this issue Aug 5, 2020 · 2 comments

Comments

@lukifer195
Copy link

It is interesting feature I want to keep it

@maxwill-max
Copy link

I am using this. It works perfectly and can hold notifications in notification/action center until you clear them
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
notifier = ToastNotificationManager.create_toast_notifier(r'C:\Users\HP\AppData\Local\Programs\Python\Python38\python.exe')

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))

@lukifer195
Copy link
Author

lukifer195 commented Dec 22, 2021

I am using this. It works perfectly and can hold notifications in notification/action center until you clear them 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
notifier = ToastNotificationManager.create_toast_notifier(r'C:\Users\HP\AppData\Local\Programs\Python\Python38\python.exe')

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))

yah this well working although some confuse with XML language , how can I create time duration or icon bro? Thank you bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants