Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in API level 21

android.app.usage

Classes

ConfigurationStats Represents the usage statistics of a device Configuration for a specific time range. 
EventStats Contains usage statistics for an event type for a specific time range. 
ExternalStorageStats Shared/external storage statistics for a UserHandle on a single storage volume. 
NetworkStats Class providing enumeration over buckets of network usage statistics. 
NetworkStats.Bucket Buckets are the smallest elements of a query result. 
NetworkStatsManager Provides access to network usage history and statistics. 
NetworkStatsManager.UsageCallback Base class for usage callbacks. 
StorageStats Storage statistics for a UID, package, or UserHandle on a single storage volume. 
StorageStatsManager Access to detailed storage statistics. 
UsageEvents A result returned from UsageStatsManager.queryEvents(long, long) from which to read UsageEvents.Event objects. 
UsageEvents.Event An event representing a state change for a component. 
UsageStats Contains usage statistics for an app package for a specific time range. 
UsageStatsManager Provides access to device usage history and statistics.