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

Rename the name of program in the notification center #74

Open
Reikagilu opened this issue Jun 10, 2020 · 5 comments
Open

Rename the name of program in the notification center #74

Reikagilu opened this issue Jun 10, 2020 · 5 comments

Comments

@Reikagilu
Copy link

image
i want to know if i can, and how i can change the name of program in the notification center

@Reikagilu
Copy link
Author

Reikagilu commented Mar 11, 2021 via email

@maxwill-max
Copy link

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

@Avnsx
Copy link

Avnsx commented Apr 22, 2021

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

Good shit buddy, good bypass to this hardly maintained repo. 👍
But how would you add add Icons to this?

@hugogva
Copy link

hugogva commented Apr 22, 2021

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

Good shit buddy, good bypass to this hardly maintained repo. 👍
But how would you add add Icons to this?

How could you also add a custom sound ? The Microsoft documentation is so bad ...

@Avnsx
Copy link

Avnsx commented Apr 25, 2021

@hugogva @maxwill-max @Reikagilu Just use this repo instead it's way easier to use and has alot more functionality: https://github.com/J-CITY/tinyWinToast

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

4 participants