I'm trying to get the audio element with ms-appdata:/// to run under Windows 10 UWP (Desktop) but no luck so far. Tried the temp and the local folder. Has this feature made it into the release build? Is there a limit to the allowed length of the audio? Are there any special requirements with regards to the uri that don't exist with a MediaElement?

@Harald – Looks like you're right, custom audio isn't working. We're investigating this issue. As of now, both ms-appx and ms-appdata don't work on Desktop, and only ms-appdata works on Mobile. Thanks for reporting this!

I am using the adaptive toast with a Win32 app, and I cannot manage to get my toast to stay in the action center when it timed out. If i close it with the close button, it goes in the action center but when let it time out, it just disappear.

With the same toast (i used your first sample) in an Universal app, the toast stay in the action center when it timed out.

@Keuvain Thanks for trying the new toast features. The default behavior for win32 apps should be the same in which the toast notifications are persisted in action center. We will investigate in the false behavior you are observing currently. Also, we will have some guidance and sample published soon on how to handle application activation from toast once it's inside action center using COM activation.

How do you get a larger inline image like the reminder example? I am unable to get anything other than a small cropped image like the first example. I'm sending the toast from a desktop program if that makes a difference.

@Adrian – For an inline image to display full width, the scenario attribute on the <toast> element needs to be set to either "reminder", "alarm", or "incomingCall".

<toast scenario="reminder"> ….</toast>

However, do realize that the scenario changes other things. Those three scenarios will all force the notification to stay on screen until the user does something with it. Don't pick a scenario that conflicts with what your user expects (for example if a new text message used the reminder scenario, users would be annoyed that they're forced to dismiss the text message to continue doing anything on their device).

Hi, when i am trying to open the Background task from the action button in toast, but i am getting an compilation error "the type or namespace "NotificationActionTriggerDetails" could not be found". Am i doing it in the right way.

One problem I'm seeing is that my notifications sometimes don't show up in the UI, but rather are sent to the Action Center. How can we avoid this and *always* show the Toast UI?? For example, I'd like to alert the user to the fact that a refresh has completed in my app via a toast notification

@Suresh – Ah I see you did comment over here originally, great! Ok, so Windows 8 app running on Windows 10 no longer receives the LaunchActivatedEventArgs inside OnLaunched for toasts… That definitely sounds like a bug. Probably due to the fact that we've switched to using OnActivated as documented in this blog post… but Windows 8 apps SHOULD be grandfathered in… We'll investigate it. Thank you for reporting it!

@Brandon – Toasts should always show up on-screen first before going into action center, unless the user changed their settings and disabled banners. You can check your settings on your PC by opening Settings -> System -> Notifications & Actions, and then clicking on your app, and confirming that "Show notification banners" is enabled. If it's enabled and toasts are still inconsistently appearing, please give us more info (sample app if you have one) and we can investigate further.

@Suresh – I just tested a Windows 8.1 app on Windows 10 and the OnLaunched got triggered correctly, with the toast launch args. You're still having issues with that?

@Abdusamad – Custom audio… We incorrectly thought that we supported custom audio on Desktop. Turns out that was cut, so audio has remained unchanged from Windows 8.1 (only mobile supports ms-appx and ms-appdata). However, there's new bugs affecting the mobile custom audio (ms-appx doesn't work, and also on "alarm" or "incomingCall" scenarios, neither ms-appdata nor ms-appx work). We're still working on fixing them, no update yet.

Thank you for the replie(s on your blog). That's too bad. I have an app in the Windows Phone 8.1 store with almost 700 downloads and lots of users requesting a custom long notification sound (non looping). I'm in the process of porting the app to UWP Desktop/Tablet and Mobile and I'm a bit disappointed it still hasn't been implemented on the Windows platform.

I hope it will be implemented soon because I think there's lots of developers and users who'd like that feature and it's basically the #1 requested feature for my app.

The longest was 3:20. Duration="long" works doesn't work on WP 8.1. And on UWP I can't test with custom sound because it's buggy/not implemented yet, so that's my dilemma. Is there a different way to set source for custom sound other than ms-appx or ms-appdata?

ms-appdata works on Windows 10 Mobile, as long as you're not also using it while specifying "incomingCall" or "alarm". So you could try that.

So you theoretically should be able to achieve it right now, assuming duration="long" works on Mobile now? I haven't tried that, as Lei's article says, we really were only keeping the "long" option around for app compat, so it's possible we didn't bring it to mobile.

I have done a small mistake too. i solved the problem my self. Like in the blog he said toast launch args will be received in OnActivatedEvent i did the same in my app and we need to update the toast payload(toast xml) too. This toast payload will not work in windows 8 machine. it only works in windows 10 machines.

In windows 10 machine toast notifications will be received even though the app in running in the foreground.

@leixu2046 "The default behavior for win32 apps should be the same in which the toast notifications are persisted in action center."

I've implemented usage of new toast notifications in Telegram Desktop messaging app and the notifications disappear from Action Center as soon as they disappear from screen (or as soon as the action center is closed, if it was opened while the notification was still on the screen). It is a bad behavior and many users have complained about this.

May I have any information about that issue? Was it reproduced in MS? Will it be fixed by a Windows Update, or it will persist that way much longer? I'm interested in any information about that.

Also I've got some problems with per-app notification settings, there are no apps listed, but I use one my own custom app with notifications and one downloaded from the Store, both sending notifications, which could be seen here: updates.tdesktop.com/…/noapps.png

How can I get my win32 app to that list? Why I don't have any apps there and how this could be fixed?

@Lindsay – The available URI launch protocols can be seen here: msdn.microsoft.com/…/mt228340.aspx They're the same that are supported with LaunchUriAsync. Launching websites works, just tested it on my personal RTM laptop. Make sure that you're setting activationType="protocol". Tell us what's happening and maybe we can help you. For example, the following payload generates a toast with a button that, when clicked, opens Slashdot.

How do I send a toast notification that works on both Windows 10 and Windows/WP 8.1? I've tried adding two <visual> elements, but this leads to Win10 just displaying "New notification" and not any of the actual notification content. If I send just the 8.1 or just the Win10 <visual> it works. But I need to send both because users may be using a mix of devices (especially Win10 PCs with 8.1 phones since Win10 Mobile isn't out yet).

There is ToastNotification.Activated event which provides ToastActivatedEventArgs and it does not contains UserInput property while Application.OnActivated event provides ToastNotificationActivatedEventArgs which contains UserInput property. Why windows is losing information in ToastNotificationActivated event?

Is there a way i can get the UserInput property in ToastNotification.Activated event?

@Half baked toast – Is there a reason you're using the Activated event on the toast object instead of the OnActivated method? Please tell us your scenario so you can help. If the user taps on your toast from within action center, that Activated event will NOT fire.

We recommend using the OnActivated method, since the Activated event isn't useful for most scenarios. For example, what happens when the user clicks on your toast after they've closed your app? The Activated event won't be able to trigger. But OnActivated method does.

@andrewbares7 – I'm raising the toast notification from a dll and want to handle the toast events in that dll only. The application is not a UWP app and I don't want any event if the application is closed. Since there is no Application class so I don't have the Application.OnActivated method.

When the ToastNotification.Activated event can handle the most of the scenarios of toast notification like button click on notification, cancel and timeout, why UserInput is not available in that event?

@Brandon – Unfortunately there's no good solution for sending a single payload that supports both 8.1 and the new features of 10. You would have to store on your server what OS the device is on, and then send the correct payload.

@Half baked – I've told Lei to follow up with you about Win32 apps. He's working on a blog post that covers this.

@andrewbares7 – Is there any update on ms-appx support for custom audio? Or custom audio for Desktop?

I've implemented custom audio for Windows 10 Mobile using ms-appdata, but it doesn't work on my Lumia 520 with Insider Preview. I have a method (in app.xaml.cs) that fires after first install or an update, which copies the sound file to the appdata folder so I can use it for custom audio, but when I launch the app the first time, it gets to the splashscreen and closes. So I think something goes wrong when copying the file. I haven't been able to reproduce this on the emulators, it works fine there. I dont know if it's a Insider Preview issue or what. Still trying to figure it out. Being able to use ms-appx would be a lot more efficient, since I won't have to copy the file.

You'll have to set up a COM server, as that article describes, so that your app can be activated from toasts persisted in Action Center. Otherwise, if you didn't have that COM server, and the user closed your app, and then the user clicked the persisted toast, the toast wouldn't do anything (your Activated event that was registered as a callback is no longer active since your code isn't running).

Sorry for not replying to your comment. Thanks for nagging us, we're happy to help!

@Methew – How are you referencing your local images? Are you using ms-appx:/// with three slashes? A copy of the XML you're using, in addition to a screenshot of your Visual Studio project's file structure (specifically showing the path of the image you're referencing) would be helpful. Local images definitely work, we've used them before.

Hey, Andrew, thanks for your swift reply. Yes, I am talking about Win32 apps. The blog post you gave me unfortunately does not solve my problem. I've already left some comments there as well. Can we find out what are the "open issues" that Lei is trying to address? This would be extremely helpful.

I second the comments here about the UserInput missing in ToastActivatedEventArgs . Most of us gets that indeed without the Activate event we won’t be able to have persistent notifications working in the notification center but right now in order for us to move slowly to full UWP apps we have to extract and put as much as possible into a DLL with .NET code that is used by the old school app to slowly port the code base. Notifications is a must have these days and really have the UserInput field would already be a good step to have good notifications support. Then of course in the future we can have full persistent notifications with activations that launch the app. The fact that some of us uses .NET in that secondary DLL library is https://github.com/WindowsNotifications/NotificationsExtensions which is pretty good to construct the notifications.

I remember I was really happy to see your post because I’ve been looking for how to get user input from toast notification.
Thanks for this post.

But I have a big problem with getting user input from toast notification when user types text in Korean.
I’m showing user toast notification including input and User may type their reply to the toast input box and click reply action button then my background task receives ToastNotificationActionTriggerDetail.
But the UserInput value set in ToastNotificationActionTriggerDetail includes only empty string, “”, if the input text is “ㅋㅋ”, “ㅎㅎ” or “ㅇㅇ” those are the most popular abbreviations used on chat message in Korea.
They are similar “kk”, “hh” or “IC” in English.

It seemed the toast input box cannot get these Korean text above because it recognizes text input is not completed yet.
It’s just my opinion from my experience and I’d like to hear your advice.

Our current balloon notification implementation is WPF, and the issue we are observing is that when the user uses Win 10 where they automatically get converted to Toast Notification (OS Controls it) is text is cut for some languages in the desktop environment. If we use the legacy (Win 7) balloon notification in Windows 10, there is no as such character limitation in the balloon pop-up. What is the character limitation for toast in the desktop environment?

There’s no specific character limit on toasts, since different devices might be able to display different amounts of text (and also different languages have different character sizes). Also, we’re slightly changing how toast notifications look and feel in new versions of Windows 10, which affects how many characters would be displayed.

For your scenario, you should make sure that the user can click the toast to read the full content, so that if the content couldn’t all fit, when they click the toast, they can see everything.

I am facing two issues with Toast notification with Desktop application on Windows 10

1) When user does nothing with the toast, it simply disappear without going to the action center (ToastNotification.Dismissed is ToastDismissalReason.TimedOut). It is not sticky, how do I make it work?

2) Chasing the notification is also not working, I have Activated event, tapping on the toast notification does not do anything. Consider after generating notification my application will not be running. But I have created a shortcut under Users Start menu Program using AppuserModelID concept, and It is the same AppID used while creating the notification.

When the number of notifications in Action Center exceeds 20, I get an extra notification saying “More notifications”. If I click on it, my app opens and all the other 20 toasts from Action Center disappear. I wasn’t able to find any documentation on this. Can you please tell me if this is expected behavior?

The MSDN documentation regarding the src attribute of the image element says that among other protocols both the http:// and the https:// protocol are supported. However, when using such an URI (example: src=”https://en.wikipedia.org/static/apple-touch/wikipedia.png”), the image is not displayed in the toast. Downloading the same file locally and using the file:///-protocol (like “file:///C:\images\wikipedia.png”) works as expected.

Is the MSDN documentation outdated regarding the supported protocols? Was the http://- and https:// protocol support dropped from Windows 8(.1) to Windows 10? If so, was this done on purpose? Or is that a bug? Do Windows 10 toasts still support images from foreign http:// or https:// sources?

Hey Charly, sorry for the late reply, I think email notifications once again were turned off for some reason :/

http:// and https:// images are supported for UWP’s. Sounds like maybe you’re writing a Win32 app? Win32 apps do not support http images, since they do not have the package manifest like a UWP containing the internet capability. Hence for Win32 apps, you need to download the image and then reference it via file://.

I have a question related to ToastGeneric template “Text” element.
Is there a character size limit for each “text” element only 40 , 60 etc.
If there is any how to increase this limit ?
Please give any pointers or details on this.
Thanks Rajesh

Hey Rajesh! Nope, there’s no limits on the character lengths of elements (nor are there limits on URI’s, etc).

However, the entire XML payload must be less than 5 KB. Therefore, you’ll want to make sure to trim your strings at reasonable lengths. Maybe 500 chars max of text on the toast? Or if you’re using multiple text elements, maybe 200 chars per each text element? You’ll want to take into consideration other parts of your payload too, like the launch args, buttons, etc… everything adds up, and you’ll need to keep it under 5 KB.

I have a Win32 application and I’ve noticed that when I tap/click the toast to acknowledge it, the focus doesn’t get properly set to my main application (in my toast handler I say MainWindow.Activate() or something similar). I see my application come up, but keyboard focus is not on it. Should i be doing something different?

Well for what it’s worth I’ve filed a connect bug with a patch file to apply to the github project to reproduce the issue. I’m pretty sure it’s a Win10 bug as on 8.1 this same type of behaviour of putting focus on an element after toast click works fine.

Hello. I wonder if there is a simpler way to just handle the dismiss eventhandler for a particular notification? I noticied that the regular ToastNotification has that eventhandler, but ScheduledNotifications does not. I am using the UWP Community Toolkit. Thanks.