Added in API level 21

UsageEvents


class UsageEvents : Parcelable
kotlin.Any
   ↳ android.app.usage.UsageEvents

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

Summary

Nested classes

An event representing a state change for a component.

Inherited constants
Public methods
Int

Boolean

Retrieve the next android.app.usage.UsageEvents.Event from the collection and put the resulting data into eventOut.

Boolean

Returns whether or not there are more events to read using getNextEvent(android.app.usage.UsageEvents.Event).

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<UsageEvents!>

Public methods

describeContents

Added in API level 21
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getNextEvent

Added in API level 21
fun getNextEvent(eventOut: UsageEvents.Event!): Boolean

Retrieve the next android.app.usage.UsageEvents.Event from the collection and put the resulting data into eventOut.

Parameters
eventOut UsageEvents.Event!: The android.app.usage.UsageEvents.Event object that will receive the next event data.
Return
Boolean true if an event was available, false if there are no more events.

hasNextEvent

Added in API level 21
fun hasNextEvent(): Boolean

Returns whether or not there are more events to read using getNextEvent(android.app.usage.UsageEvents.Event).

Return
Boolean true if there are more events, false otherwise.

writeToParcel

Added in API level 21
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 21
static val CREATOR: Parcelable.Creator<UsageEvents!>