I am in dire need of your help. I am a Windows app developer and I need my app to play an alarm sound when a toast notification is received. I have tried many different loadouts and everything works fine (Even applying silent='true' in the audio tag), except, ofcourse, for the custom sound.
I have tried my dev server and I have tried with a local toast sent from the app, and nothing seems to work.
My current XML loadout is as follows (I got it from an example in MSDN):
string audio = "ms-winsoundevent:Notification.Mail";
string toastXmlString = "<toast duration='long'>"
+ "<visual version='1'>"
+ "<binding template='ToastText02'>"
+ "<text id='1'>Sound:</text>"
+ "<text id='2'>" + audio + "</text>"
+ "</binding>"
+ "</visual>"
+ "<audio src='" + audio + "' />"
+ "</toast>";
The only sound I ever managed to play was the default windows sound. No 'ms-winsoundevent' sounds, no 'ms-appx' or 'ms-appdata' sounds, nothing.
I have checked the headers and XML loadout and compared them to the MSDN documentation. I have tried different formats (mp3 and wav) and different audio clip lengths (18secs, 5secs, 10secs, etc...)
My experience tells me that if there was a problem with the XML loadout or the headers the toast would either not arrive or the text would not show. Other than the sound however, everything works fine.
Thanks in advance for all the help you may offer.