다음을 통해 공유


NotificationListenerService.OnNotificationChannelModified Method

Definition

Implement this method to learn about notification channel modifications.

[Android.Runtime.Register("onNotificationChannelModified", "(Ljava/lang/String;Landroid/os/UserHandle;Landroid/app/NotificationChannel;I)V", "GetOnNotificationChannelModified_Ljava_lang_String_Landroid_os_UserHandle_Landroid_app_NotificationChannel_IHandler", ApiSince=26)]
public virtual void OnNotificationChannelModified (string? pkg, Android.OS.UserHandle? user, Android.App.NotificationChannel? channel, Android.Service.Notification.NotificationChannelOrGroupEventType modificationType);
[<Android.Runtime.Register("onNotificationChannelModified", "(Ljava/lang/String;Landroid/os/UserHandle;Landroid/app/NotificationChannel;I)V", "GetOnNotificationChannelModified_Ljava_lang_String_Landroid_os_UserHandle_Landroid_app_NotificationChannel_IHandler", ApiSince=26)>]
abstract member OnNotificationChannelModified : string * Android.OS.UserHandle * Android.App.NotificationChannel * Android.Service.Notification.NotificationChannelOrGroupEventType -> unit
override this.OnNotificationChannelModified : string * Android.OS.UserHandle * Android.App.NotificationChannel * Android.Service.Notification.NotificationChannelOrGroupEventType -> unit

Parameters

pkg
String

The package the channel belongs to.

user
UserHandle

The user on which the change was made.

channel
NotificationChannel

The channel that has changed.

modificationType
NotificationChannelOrGroupEventType

One of #NOTIFICATION_CHANNEL_OR_GROUP_ADDED, #NOTIFICATION_CHANNEL_OR_GROUP_UPDATED, #NOTIFICATION_CHANNEL_OR_GROUP_DELETED.

Attributes

Remarks

Implement this method to learn about notification channel modifications.

The caller must have CompanionDeviceManager#getAssociations() an associated device in order to receive this callback.

Java documentation for android.service.notification.NotificationListenerService.onNotificationChannelModified(java.lang.String, android.os.UserHandle, android.app.NotificationChannel, int).

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.

Applies to