NotificationChannel.SetSound(Uri, AudioAttributes) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the sound that should be played for notifications posted to this channel and its audio attributes.
[Android.Runtime.Register("setSound", "(Landroid/net/Uri;Landroid/media/AudioAttributes;)V", "", ApiSince=26)]
public void SetSound (Android.Net.Uri? sound, Android.Media.AudioAttributes? audioAttributes);
[<Android.Runtime.Register("setSound", "(Landroid/net/Uri;Landroid/media/AudioAttributes;)V", "", ApiSince=26)>]
member this.SetSound : Android.Net.Uri * Android.Media.AudioAttributes -> unit
Parameters
- sound
- Uri
- audioAttributes
- AudioAttributes
- Attributes
Remarks
Sets the sound that should be played for notifications posted to this channel and its audio attributes. Notification channels with an #getImportance() importance
of at least NotificationManager#IMPORTANCE_DEFAULT
should have a sound.
Only modifiable before the channel is submitted to NotificationManager#createNotificationChannel(NotificationChannel)
.
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.