UsageStatsManager.QueryAndAggregateUsageStats(Int64, Int64) 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.
A convenience method that queries for all stats in the given range (using the best interval for that range), merges the resulting data, and keys it by package name.
[Android.Runtime.Register("queryAndAggregateUsageStats", "(JJ)Ljava/util/Map;", "")]
public System.Collections.Generic.IDictionary<string,Android.App.Usage.UsageStats>? QueryAndAggregateUsageStats (long beginTime, long endTime);
[<Android.Runtime.Register("queryAndAggregateUsageStats", "(JJ)Ljava/util/Map;", "")>]
member this.QueryAndAggregateUsageStats : int64 * int64 -> System.Collections.Generic.IDictionary<string, Android.App.Usage.UsageStats>
Parameters
- beginTime
- Int64
The inclusive beginning of the range of stats to include in the results.
Defined in terms of "Unix time", see
java.lang.System#currentTimeMillis
.
- endTime
- Int64
The exclusive end of the range of stats to include in the results. Defined
in terms of "Unix time", see java.lang.System#currentTimeMillis
.
Returns
A java.util.Map
keyed by package name
- Attributes
Remarks
A convenience method that queries for all stats in the given range (using the best interval for that range), merges the resulting data, and keys it by package name. See #queryUsageStats(int, long, long)
.
The caller must have android.Manifest.permission#PACKAGE_USAGE_STATS
Java documentation for android.app.usage.UsageStatsManager.queryAndAggregateUsageStats(long, long)
.
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.