Skip to content

Custom audio for toast notification is not working for desktop bridge application #2

Open
@AmolGuldagad

Description

@AmolGuldagad

Custom audio for toast notification is not working for desktop bridge application

  • We have desktop bridge app

  • Trying to set custom audio for toast notification
    `ToastContent toastContent = new ToastContent()

          {
              Visual = new ToastVisual()
              {
                  BindingGeneric = new ToastBindingGeneric()
                  {
                      Children =
                      {
                          new AdaptiveText()
                          {
                              Text = title
                          }
                      }
                  }
              }
          };
    toastContent.Audio = new ToastAudio()
    {
        Src = new Uri("ms-appx:///Assets/Audio/sound.m4a")
    };`
    
  • we tried with more options with creating URI object like below:
    `Src = new Uri("ms-appx:///Asset/sound.wav")

    Src = new Uri(@"ms-appx:///Asset/sound.wav")
    Src = new Uri("ms-appx:///xx/Asset/sound.wav")
    Src = new Uri("pack://application:,,,/LibraryName;component/Asset/sound.wav")
    Src = new Uri("pack://application:,,,/Asset/sound.wav")
    Src = new Uri("ms-appdata:///local/sound.wav")
    Src = new Uri("ms-appdata:///temp/sound.wav")
    Src = new Uri(@"C:\Final\sound.wav")
    Src = new Uri("ms-appdata:///local/sound.wav")
    Src = new Uri($"pack://ms-appx:///Asset/sound.wav")`

with all options - its not working
Also we tried with creating Appx package with above URI but still same problem.
We are getting default sound or invalid URI errors

Note: It works properly with core UWP application

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions