Partager via


NotificationListenerService.SetNotificationsShown(String[]) Method

Definition

Inform the notification manager that these notifications have been viewed by the user.

[Android.Runtime.Register("setNotificationsShown", "([Ljava/lang/String;)V", "", ApiSince=23)]
public void SetNotificationsShown (string[]? keys);
[<Android.Runtime.Register("setNotificationsShown", "([Ljava/lang/String;)V", "", ApiSince=23)>]
member this.SetNotificationsShown : string[] -> unit

Parameters

keys
String[]

Notifications to mark as seen.

Attributes

Remarks

Inform the notification manager that these notifications have been viewed by the user. This should only be called when there is sufficient confidence that the user is looking at the notifications, such as when the notifications appear on the screen due to an explicit user interaction.

The service should wait for the #onListenerConnected() event before performing this operation.

Java documentation for android.service.notification.NotificationListenerService.setNotificationsShown(java.lang.String[]).

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