Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
App notifications can use custom audio, which lets your app express your brand's unique sound effects. For example, a messaging app can use its own messaging sound on app notifications so that the user can instantly know the notification came from that app, rather than hearing the generic notification sound.
For more information about app notifications, see App notifications overview.
Add custom audio
Use AppNotificationBuilder.SetAudioUri to specify a custom audio file for your notification.
using Microsoft.Windows.AppNotifications;
using Microsoft.Windows.AppNotifications.Builder;
var notification = new AppNotificationBuilder()
.AddText("New message")
.SetAudioUri(new Uri("ms-appx:///Assets/Audio/CustomToastAudio.m4a"))
.BuildNotification();
AppNotificationManager.Default.Show(notification);
Supported audio file types:
- .aac
- .flac
- .m4a
- .mp3
- .wav
- .wma
Supported audio file sources:
- ms-appx:///
- ms-resource
Unsupported file sources:
- ms-appdata
- http://, https://
- C:/, F:/, etc.
See also
Windows developer