windowsnotifications / desktop-toasts Goto Github PK
View Code? Open in Web Editor NEWraw samples for desktop toasts using com activation
License: MIT License
raw samples for desktop toasts using com activation
License: MIT License
After upgrading to Windows 10 1903 I am no longer able to compile this example.
I am getting the following warnings:
The referenced component 'Windows.Data' could not be found.
The referenced component 'Windows.Foundation' could not be found.
The referenced component 'Windows.UI' could not be found.
And errors where code is dependent on the above assemblies.
These files were earlier in system32 but seems to have been removed from 1903. I have not been able to fin a nuget package that includes them.
I also updated to Visual Studio 16.0.3 to 16.1.1 but I don't think that this is the problem.
I have also been having problems building the progress example on a Windows 2016 build server: https://stackoverflow.com/questions/55899493/toastnotification-does-not-contain-a-definition-for-data-on-windows-server-2
Hello, glad to see you are working on this.
Before you revamped your C# example, there was a dropdown example.
I'm in the process of converting that example to a console app, but I'm having an issue.
I want to send the value of the dropdown box in the invokedArgs activation callback.
I'm trying to do something like:
new ToastButton("Submit", "action=" + ToastSelectionBox.Value??????)
In your example, you simply had 'action=answer', which seemed like magic to me.
I don't know how to retrieve the value of the selection box, and the documentation doesn't explain this part as far as I know.
Any ideas?
In the documentation, the code for the button is simply left blank.
Hi!
I'm trying to build the sample but got a lot of errors... Which VS components should I install?
Thanks
Hello, I just want the notification with Title, Subtitle and I have figured that out but I want to call this from a C++ function which passes title and description to this code and it gives the notification. Any one has any idea on how to do it. I don't want the UI for calling notification.
I tried to follow the instructions but i am not sure what to do after deploying. There is no release folder.
Desktop Bridge
Open the project in VS
Set the DesktopToastsPackageProject as the startup project
Deploy
Toasts will work out-of-the-gate thanks to Desktop Bridge!
when i run the solution from debug, i clicked on "pop toast", nothing is showing. No notifications or anything.
I am using the latest version of Windows 10 :
(Windows 10, version 1903)
with latest version of Visual Studio 2017
(15.9.160
and Windows 10 SDK
(10.0.18362.0)
It would be great for the library to support a custom timeout period for when it's displayed by the Action Center. And by that I mean that after the message pops up in the Notification Area and the user closes it, it would be a great feature to have the message stay in the Action Center a little longer.
Custom audio for toast notification is not working for desktop bridge application
We have desktop bridge app
Trying to set custom audio for toast notification
`
ToastContent toastContent = new ToastContent()
{
Visual = new ToastVisual()
{
BindingGeneric = new ToastBindingGeneric()
{
Children =
{
new AdaptiveText()
{
Text = title
}
}
}
}
};
toastContent.Audio = new ToastAudio()
{
Src = new Uri("ms-appx:///Assets/Audio/sound.m4a")
};`
we tried with more options with creating URI object like below:
`Src = new Uri("ms-appx:///Asset/sound.wav")
Src = new Uri(@"ms-appx:///Asset/sound.wav")
Src = new Uri("ms-appx:///xx/Asset/sound.wav")
Src = new Uri("pack://application:,,,/LibraryName;component/Asset/sound.wav")
Src = new Uri("pack://application:,,,/Asset/sound.wav")
Src = new Uri("ms-appdata:///local/sound.wav")
Src = new Uri("ms-appdata:///temp/sound.wav")
Src = new Uri(@"C:\Final\sound.wav")
Src = new Uri("ms-appdata:///local/sound.wav")
Src = new Uri($"pack://ms-appx:///Asset/sound.wav")`
with all options - its not working
Also we tried with creating Appx package with above URI but still same problem.
We are getting default sound or invalid URI errors
Note: It works properly with core UWP application
https://stackoverflow.com/questions/60495405/action-center-toast-notification-without-shortcut
Everything works perfectly as expected but I wonder one thing. Is it possible to register the ToastActivator without creating a shortcut? This program is going to be used on an internal enterprise network and I don't intend for it to have any UI. It'll be launched by the Task Scheduler, check a web service and send toast messages to the user when they apply.
If I must have a shortcut, the best UX I can think of is to just display an about dialog and exit.
followed every step of the code but after deployment app opens up but on clicking it doesnt show the notifcation and also stops
Had to change the AUMID set on the shortcut by the installer to "WindowsNotifications.DesktopToastsCppWrl" (to match the AUMID registered by the app?) to get the Toasts to display
Other projects from your GitHub org are listed under MIT - what is the license for this project?
I am recieving the LNK2019 unresolved external symbol when running the project for c++ win22 plugin for development of notification plugin for flutter! I have #include the DesktopNotificationManagerCompat.h file and copied the files to the include directory, but I seem the project isn't able to detect the definition of the Hresult function defined in the related CPP file. The project used Cmake for the dependencies. Request urgent support in this issue.
Hello,
Could you test creating scheduled toast notifications without ever calling the CreateToastNotifier.Show() function?
If my app just creates scheduled toast notifications, it doesn't seem to work. One thing I tested was creating a build that creates notifications immediately using .show(), then replacing it with the one that uses AddToSchedule and then it starts working. There must be something that .show() is doing that AddToSchedule isn't, because until I call show() I never see my app in the Notification & Actions section of the Windows Settings. But, I don't see anything in the documentation on scheduled notifications that indicate this....
Doesn't work...
var toast = new ScheduledToastNotification(toastContent.GetXml(), DateTime.Now.AddSeconds(5));
DesktopNotificationManagerCompat.CreateToastNotifier().AddToSchedule(toast);
Will work...
ToastNotification toast = new ToastNotification(toastContent.GetXml());
DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast);
var toast = new ScheduledToastNotification(toastContent.GetXml(), DateTime.Now.AddSeconds(5));
DesktopNotificationManagerCompat.CreateToastNotifier().AddToSchedule(toast);
The app isn't activated(by tapping or clicking the toast) when it is running as administrator.
@andrewleader, @MichaelGoulding If application icon has transparent areas then it is displayed as blue color. Sample has a "default icon" and looks like image below :
If I use icon of our application (with transparent area), then it is also displays blue color instead of transparent area. Can it be fixed?
https://github.com/Microsoft/Windows-classic-samples/tree/master/Samples/DesktopToasts
Is the new location for this sample. This repo should be deleted.
In the guide, it stating that Wix can be used as installer. But the other method is not explained.
I am new to Windows development and haven't used Wix before. Is there a way to continue without adding this dependency ?
Step 5.1: WiX Installer
If you're using WiX for your installer, edit the Product.wxs file to add the two shortcut properties to your Start menu shortcut as seen below....
I am using the latest version of Windows 10 :
(Windows 10, version 1903)
with latest version of Visual Studio 2017
(15.9.160
and Windows 10 SDK
(10.0.18362.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.