次の方法で共有


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

戻り値

属性

注釈

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

指定されたユーザーの通知にアクセスできない場合、このメソッドはセキュリティ例外をスローします。

このメソッドを使用するには、呼び出し元が または である必要がありますCompanionDeviceManager#getAssociations() an associated deviceNotificationAssistantService notification assistant

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

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象