NotificationListenerService.GetNotificationChannels メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
特定のユーザーの特定のパッケージに属するすべての通知チャネルを返します。
[Android.Runtime.Register("getNotificationChannels", "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;", "", ApiSince=26)]
public System.Collections.Generic.IList<Android.App.NotificationChannel>? GetNotificationChannels (string pkg, Android.OS.UserHandle user);
[<Android.Runtime.Register("getNotificationChannels", "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;", "", ApiSince=26)>]
member this.GetNotificationChannels : string * Android.OS.UserHandle -> System.Collections.Generic.IList<Android.App.NotificationChannel>
パラメーター
- pkg
- String
チャネルを取得するパッケージ。
- user
- UserHandle
戻り値
- 属性
注釈
特定のユーザーの特定のパッケージに属するすべての通知チャネルを返します。
指定されたユーザーの通知にアクセスできない場合、このメソッドはセキュリティ例外をスローします。
このメソッドを使用するには、呼び出し元がNotificationAssistantService notification assistant
持っているかCompanionDeviceManager#getAssociations() an associated device
、その呼び出し元である必要があります。
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。