次の方法で共有


NotificationListenerService.GetNotificationChannels メソッド

定義

特定のユーザーの特定のパッケージに属するすべての通知チャネルを返します。

[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、その呼び出し元である必要があります。

の Java ドキュメントandroid.service.notification.NotificationListenerService.getNotificationChannels(java.lang.String, android.os.UserHandle)

このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。

適用対象