NotificationListenerService.GetNotificationChannels 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.
Returns all notification channels belonging to the given package for a given user.
[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>
Parameters
- pkg
- String
The package to retrieve channels for.
- user
- UserHandle
Returns
- Attributes
Remarks
Returns all notification channels belonging to the given package for a given user.
This method will throw a security exception if you don't have access to notifications for the given user.
The caller must have CompanionDeviceManager#getAssociations() an associated device
or be the NotificationAssistantService notification assistant
in order to use this method.
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.