Element not found error while trying to use UserNotficationListener
In a .net console application
12 Replies
error happens on the
listener.NotificationChanged
lineUnknown User•5mo ago
Message Not Public
Sign In & Join Server To View
If you have no further questions, please use /close to mark the forum thread as answered
ive read every relevant stack overflow post on this specific issue and the only one that got me anywhere was running it from within an msix package app but i dont understand why i have to do this to access the api? ive seen other people online access the winrt api straight from a .net console app or even a python app.
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
@TeBeCo sorry to revive the thread but im not trying to use this in a gui. ive managed to get this to work by using a windows packaging project but i still dont understand why its not possible to work in a console app
the
windows.ui.notifcations.management
api isnt listed on the list of apis that only work in packaging projectsWindows Runtime APIs not supported in desktop apps - Windows apps
This article describes WinRT APIs that aren't supported for use in desktop apps, or that have restrictions.
according to this
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
I dont really understand this since
windows.ui.notifications.management
is part of the windows 10 sdk.
UserNotificationListener.GetNotificationsAsync
works outside of a packaging project but UserNotificationListener.GetNotification
doesnt
also it would help me if you could point me to which gui package specifically you are referring to
ive changed it to .net 8.0 targeting windows 10.0.19041.0 using the windows sdk
it can get the list of notifications perfectly fine
but cant seem to bind an event handlerUnknown User•5mo ago
Message Not Public
Sign In & Join Server To View
nowhere in any documentation does it suggest that i need anything more than the windows 10 sdk
my version of windows is above the minimum
and shouldnt rely on any ui/gui packages other than windows.ui
the
windows.ui.notifications.management
api is also not listed under the list of apis which require a package identity