Android.App.Usage Namespace

Provides app usage events and time measurements, app standby categories, and network and storage usage statistics.

Classes

Name Description
AppUsageDuration

Contains usage statistics for a single app package.

AppUsageDuration.InterfaceConsts

Exposes the constants inherited from IParcelable by AppUsageDuration.

AppUsageDurationQuery

Represents a query for application usage duration statistics.

AppUsageDurationQuery.Builder

Builder for AppUsageDurationQuery.

AppUsageDurationQuery.InterfaceConsts

Exposes the constants inherited from IParcelable by AppUsageDurationQuery.

ConfigurationStats

Represents the usage statistics of a device android.content.res.Configuration for a specific time range.

ConfigurationStats.InterfaceConsts

Exposes the constants inherited from IParcelable by ConfigurationStats.

EventStats

Contains usage statistics for an event type for a specific time range.

EventStats.InterfaceConsts

Exposes the constants inherited from IParcelable by EventStats.

ExternalStorageStats

Shared/external storage statistics for a UserHandle on a single storage volume.

ExternalStorageStats.InterfaceConsts

Exposes the constants inherited from IParcelable by ExternalStorageStats.

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.

StorageStats.InterfaceConsts

Exposes the constants inherited from IParcelable by StorageStats.

StorageStatsManager

Access to detailed storage statistics.

UsageEvents

A result returned from android.app.usage.UsageStatsManager#queryEvents(long, long) from which to read android.app.usage.UsageEvents.Event objects.

UsageEvents.Event

An event representing a state change for a component.

UsageEvents.InterfaceConsts

Exposes the constants inherited from IParcelable by UsageEvents.

UsageEventsQuery

An Object-Oriented representation for a UsageEvents query.

UsageEventsQuery.Builder

Builder for UsageEventsQuery.

UsageEventsQuery.InterfaceConsts

Exposes the constants inherited from IParcelable by UsageEventsQuery.

UsageStats

Contains usage statistics for an app package for a specific time range.

UsageStats.InterfaceConsts

Exposes the constants inherited from IParcelable by UsageStats.

UsageStatsManager

Provides access to device usage history and statistics.

Enums

Name Description
MeteredStates

Identifies whether network usage was metered, unmetered, or combined across both categories.

NetworkStatsDefault

Identifies whether usage occurred on a default network or combines usage across default network states.

NetworkUsageRoaming

Identifies whether network usage occurred while roaming, without roaming, or across both categories.

NetworkUsageState

Identifies network usage attributed to the foreground state, the default state, or all states combined.

StandbyBucket

Identifies the app standby category used to limit background work according to app usage.

StorageStatsAppDataType

Identifies the app file category whose size is requested from GetAppBytesByDataType(StorageStatsAppDataType).

UsageEventType

Enumerates values returned by several types.

UsageStatsInterval

Selects the time interval used to group app usage and configuration statistics.