I am stuck with a toast notification issue in Windows phone 8.1. (Exact version: 8.10.14157.200). I have an application that sends toast notification to the phone. I want to play a custom sound with this toast notification. However windows phone just plays its default notification sound and not my own that I am specifying in the toast XML.
<?xml version="1.0" encoding="UTF-8"?>
<toast duration="long">
<visual>
<binding template="ToastText02">
<text id="1">Kainat</text>
<text id="2">Hi</text>
</binding>
</visual>
<audio src="/Assets/hodor.wav" />
</toast>
I have tried the following audio elements with no success.
<audio src="hodor.wav" />
<audio src="/hodor.wav" />
<audio src="/Assets/hodor.wav" />
<audio src="ms-appx:///Assets/hodor.wav" />
<audio src="ms-appx:///hodor.wav" />
I have also tried muting (just to verify that the audio element in the XML works)
<audio silent="true"/>
This worked and sound was suppressed.
I have added hodor.wav in my project as well as the Assets folder in my visual studio project. Also have set the "Copy to output directory" option of this wav resource to "Copy always".
Is there anything I am missing?