共用方式為


UsageEventsQuery.PackageNames Property

Definition

Retrieves a Set of package names for the query.

public System.Collections.Generic.ICollection<string> PackageNames { [Android.Runtime.Register("getPackageNames", "()Ljava/util/Set;", "", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getPackageNames", "()Ljava/util/Set;", "", ApiSince=35)>]
member this.PackageNames : System.Collections.Generic.ICollection<string>

Property Value

a Set contains the package names that was previously set through Builder#setPackageNames(String...) or an empty set if no value has been set.

Attributes

Remarks

Retrieves a Set of package names for the query.

Note that an empty set indicates querying usage events for all packages, and it may cause additional system overhead when calling UsageStatsManager#queryEvents(UsageEventsQuery). Apps are encouraged to provide a list of package names via Builder#setPackageNames(String...)

Java documentation for android.app.usage.UsageEventsQuery.getPackageNames().

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