0

I have this toast to show up and everything is fine except audio. I was trying to put toast.mp3 in different locations like projects main folder, Assets etc. and even used path like D:/MyProjectPath/Assets/toast.mp3 and still notification is silent. I am a beginner so maybe I miss something... And of course I've looked for solution but nothing has been helpful.Here is my code:

string xml = $@"<toast scenario=""reminder"">
        <visual>
        <binding template=""ToastGeneric"">
            <text>{name}</text>
            <text>{quantity} {unit}</text>
            <text>{beforeorafter}</text>

        </binding>
        </visual>
        <actions>
        <input id=""snoozeTime"" type=""selection"" defaultInput=""10"">
            <selection id=""5"" content=""5 minutes""/>
            <selection id=""10"" content=""10 minutes""/>
            <selection id=""15"" content=""15 minutes""/>
        </input>
        <action activationType=""system"" arguments=""snooze"" hint-inputId=""snoozeTime"" content=""""/>
        <action activationType=""system"" arguments=""dismiss"" content=""""/>
        </actions>
        <audio src = ""ms-appx:///Assets/toast.mp3"" loop = ""true""></audio>
        </toast>";
Yoki
  • 13
  • 1
  • 6

1 Answers1

0

See below Tutorial on MSDN. I tried this with a sample and it worked exactly as intended.

Quickstart: Sending a Toast notification with custom audio

Also see below

Known Issue: If you’re using Desktop Version 1511, the custom toast audio will only work if your app is installed via the Store. That means you cannot locally test your custom audio on Desktop before submitting to the Store – but the audio will work fine once installed from the Store. We fixed this in the Anniversary Update, so that custom audio from your locally deployed app will work correctly.

So that might be your problem. This is fixed in Anniversary update.

AVK
  • 3,893
  • 1
  • 22
  • 31
  • Just updated to version 1607 (14393.51) and still toast is using default sound. – Yoki Aug 17 '16 at 22:11
  • It was silent before now it plays default sound. Si that's a good start. Now in the example above you can see that audio is added in backend. Try that and see if your audio plays. – AVK Aug 17 '16 at 22:37