NotificationListenerService.MigrateNotificationFilter Method

Definition

Lets an app migrate notification filters from its app into the OS.

[Android.Runtime.Register("migrateNotificationFilter", "(ILjava/util/List;)V", "", ApiSince=31)]
public void MigrateNotificationFilter (int defaultTypes, System.Collections.Generic.IList<string>? disallowedPkgs);
[<Android.Runtime.Register("migrateNotificationFilter", "(ILjava/util/List;)V", "", ApiSince=31)>]
member this.MigrateNotificationFilter : int * System.Collections.Generic.IList<string> -> unit

Parameters

defaultTypes
Int32

A value representing the types of notifications that this listener should receive by default

disallowedPkgs
IList<String>

A list of package names whose notifications should not be seen by this listener, by default, because the listener does not process or display them, or because a user had previously disallowed these packages in the listener app's UI

Attributes

Remarks

Lets an app migrate notification filters from its app into the OS.

This call will be ignored if the app has already migrated these settings or the user has set filters in the UI. This method is intended for user specific settings; if an app has already specified defaults types in its manifest with #META_DATA_DEFAULT_FILTER_TYPES, the defaultTypes option will be ignored.

Java documentation for android.service.notification.NotificationListenerService.migrateNotificationFilter(int, java.util.List<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