2
votes

This is Windows Phone 8.1 (WinRT flavor) toast push notification scheme.
If there is an audio source, WP8.1 plays some specific Microsoft audio sounds even if the application is not running.

<toast>
    <audio src="ms-winsoundevent:Notification.IM"/>
    <visual>
        <binding template="ToastText02">
            <text id="1">headlineText</text>
            <text id="2">bodyText</text>
        </binding>  
    </visual>
</toast>

Though, I want to use my custom sound as audio src.

<audio src="ms-appx:///Assets/MySound.mp3"/>
<audio src="/Assets/MySound.mp3"/>

But this way doesn't seem to work.
Is there something wrong among what I tried, or is that even possible thing?

1

1 Answers

2
votes
<toast>
  <audio src="ms-appx:///Assets/sound.wav"/>
  <visual>
    <binding template="ToastText02">
      <text id="1">headlineText</text>
      <text id="2">bodyText</text>
    </binding>  
  </visual>
</toast>

.mp3 can not be played. I tested it wav file again, and it works.