public
static
final
class
UsageEvents.Event
extends Object
| java.lang.Object | |
| ↳ | android.app.usage.UsageEvents.Event |
An event representing a state change for a component.
Constants | |
|---|---|
int |
CONFIGURATION_CHANGE
An event type denoting that the device configuration has changed. |
int |
MOVE_TO_BACKGROUND
An event type denoting that a component moved to the background. |
int |
MOVE_TO_FOREGROUND
An event type denoting that a component moved to the foreground. |
int |
NONE
No event type. |
int |
USER_INTERACTION
An event type denoting that a package was interacted with in some way by the user. |
Public constructors | |
|---|---|
UsageEvents.Event()
|
|
Public methods | |
|---|---|
String
|
getClassName()
The class name of the source of this event. |
Configuration
|
getConfiguration()
Returns a |
int
|
getEventType()
The event type. |
String
|
getPackageName()
The package name of the source of this event. |
long
|
getTimeStamp()
The time at which this event occurred, measured in milliseconds since the epoch. |
Inherited methods | |
|---|---|
java.lang.Object
| |
int CONFIGURATION_CHANGE
An event type denoting that the device configuration has changed.
Constant Value: 5 (0x00000005)
int MOVE_TO_BACKGROUND
An event type denoting that a component moved to the background.
Constant Value: 2 (0x00000002)
int MOVE_TO_FOREGROUND
An event type denoting that a component moved to the foreground.
Constant Value: 1 (0x00000001)
int USER_INTERACTION
An event type denoting that a package was interacted with in some way by the user.
Constant Value: 7 (0x00000007)
String getClassName ()
The class name of the source of this event. This may be null for certain events.
| Returns | |
|---|---|
String |
|
Configuration getConfiguration ()
Returns a Configuration for this event if the event is of type
CONFIGURATION_CHANGE, otherwise it returns null.
| Returns | |
|---|---|
Configuration |
|
int getEventType ()
The event type.
See MOVE_TO_BACKGROUND
See MOVE_TO_FOREGROUND
| Returns | |
|---|---|
int |
|
String getPackageName ()
The package name of the source of this event.
| Returns | |
|---|---|
String |
|
long getTimeStamp ()
The time at which this event occurred, measured in milliseconds since the epoch.
SeecurrentTimeMillis().
| Returns | |
|---|---|
long |
|