Notification.Builder.SetSound Notification.Builder.SetSound Method

Definition

Overloads

SetSound(Uri) SetSound(Uri)

Set the alert sound to play.

SetSound(Uri, AudioAttributes) SetSound(Uri, AudioAttributes)

Set the alert sound to play, along with sound attributes to use during playback.

SetSound(Uri, Stream) SetSound(Uri, Stream)

Set the sound to play, along with a specific stream on which to play it.

SetSound(Uri) SetSound(Uri)

Warning

This API is now obsolete.

Set the alert sound to play.

[Android.Runtime.Register("setSound", "(Landroid/net/Uri;)Landroid/app/Notification$Builder;", "GetSetSound_Landroid_net_Uri_Handler")]
[System.Obsolete("deprecated")]
public virtual Android.App.Notification.Builder SetSound (Android.Net.Uri sound);
abstract member SetSound : Android.Net.Uri -> Android.App.Notification.Builder
override this.SetSound : Android.Net.Uri -> Android.App.Notification.Builder

Parameters

sound
Uri Uri

The URI for the sound to be played when the notification is posted.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

SetSound(Uri, AudioAttributes) SetSound(Uri, AudioAttributes)

Warning

This API is now obsolete.

Set the alert sound to play, along with sound attributes to use during playback.

[Android.Runtime.Register("setSound", "(Landroid/net/Uri;Landroid/media/AudioAttributes;)Landroid/app/Notification$Builder;", "GetSetSound_Landroid_net_Uri_Landroid_media_AudioAttributes_Handler", ApiSince=21)]
[System.Obsolete("deprecated")]
public virtual Android.App.Notification.Builder SetSound (Android.Net.Uri sound, Android.Media.AudioAttributes audioAttributes);
abstract member SetSound : Android.Net.Uri * Android.Media.AudioAttributes -> Android.App.Notification.Builder
override this.SetSound : Android.Net.Uri * Android.Media.AudioAttributes -> Android.App.Notification.Builder

Parameters

sound
Uri Uri

The URI for the sound to be played when the notification is posted.

audioAttributes
AudioAttributes AudioAttributes

A collection of AudioAttributes that specifies the characteristics of the audio stream during playback.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SetSound(Uri, Stream) SetSound(Uri, Stream)

Warning

This API is now obsolete.

Set the sound to play, along with a specific stream on which to play it.

[Android.Runtime.Register("setSound", "(Landroid/net/Uri;I)Landroid/app/Notification$Builder;", "GetSetSound_Landroid_net_Uri_IHandler")]
[System.Obsolete("deprecated")]
public virtual Android.App.Notification.Builder SetSound (Android.Net.Uri sound, Android.Media.Stream streamType);
abstract member SetSound : Android.Net.Uri * Android.Media.Stream -> Android.App.Notification.Builder
override this.SetSound : Android.Net.Uri * Android.Media.Stream -> Android.App.Notification.Builder

Parameters

sound
Uri Uri

The URI for the sound to be played when the notification is posted.

streamType
Stream Stream

The stream on which to play the sound.

Returns

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to