NotificationListenerService.UpdateNotificationChannel 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.
Updates a notification channel for a given package for a given user.
[Android.Runtime.Register("updateNotificationChannel", "(Ljava/lang/String;Landroid/os/UserHandle;Landroid/app/NotificationChannel;)V", "", ApiSince=26)]
public void UpdateNotificationChannel (string pkg, Android.OS.UserHandle user, Android.App.NotificationChannel channel);
[<Android.Runtime.Register("updateNotificationChannel", "(Ljava/lang/String;Landroid/os/UserHandle;Landroid/app/NotificationChannel;)V", "", ApiSince=26)>]
member this.UpdateNotificationChannel : string * Android.OS.UserHandle * Android.App.NotificationChannel -> unit
Parameters
- pkg
- String
The package the channel belongs to.
- user
- UserHandle
The user the channel belongs to.
- channel
- NotificationChannel
the channel to update.
- Attributes
Remarks
Updates a notification channel for a given package for a given user. This should only be used to reflect changes a user has made to the channel via the listener's user interface.
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
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.