NotificationChannel.SetSound(Uri, AudioAttributes) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
このチャネルに投稿された通知とそのオーディオ属性に対して再生するサウンドを設定します。
[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
パラメーター
- sound
- Uri
- audioAttributes
- AudioAttributes
- 属性
注釈
このチャネルに投稿された通知とそのオーディオ属性に対して再生するサウンドを設定します。 の通知チャネルには #getImportance() importance
、少なくとも NotificationManager#IMPORTANCE_DEFAULT
サウンドが必要です。
チャネルが に NotificationManager#createNotificationChannel(NotificationChannel)
送信される前にのみ変更可能です。
このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。