UsageEventType Enum
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.
Enumerates values returned by several types.
public enum UsageEventType
type UsageEventType =
- Inheritance
-
UsageEventType
Fields
| Name | Value | Description |
|---|---|---|
| None | 0 | No event type. Android reference for 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. |
| ActivityResumed | 1 | An event type denoting that an Activity moved to the foreground. This event has a package name and class name associated with it and can be retrieved using getPackageName() and getClassName(). If a package has multiple activities, this event is reported for each activity that moves to foreground. This event is corresponding to Activity.onResume() of the activity's lifecycle. Android reference for 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. |
| MoveToForeground | 1 | This constant was deprecated in API level 29. by ACTIVITY_RESUMED Android reference for 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. |
| ActivityPaused | 2 | An event type denoting that an Activity moved to the background. This event has a package name and class name associated with it and can be retrieved using getPackageName() and getClassName(). If a package has multiple activities, this event is reported for each activity that moves to background. This event is corresponding to Activity.onPause() of the activity's lifecycle. Android reference for 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. |
| MoveToBackground | 2 | This constant was deprecated in API level 29. by ACTIVITY_PAUSED Android reference for 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. |
| ConfigurationChange | 5 | An event type denoting that the device configuration has changed. Android reference for 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. |
| UserInteraction | 7 | An event type denoting that a package was interacted with in some way by the user. Android reference for 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. |
| ShortcutInvocation | 8 | An event type denoting that an action equivalent to a ShortcutInfo is taken by the user. Android reference for 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. |
| StandbyBucketChanged | 11 | An event type denoting a change in App Standby Bucket. The new bucket can be retrieved by calling getAppStandbyBucket(). Android reference for 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. |
| ScreenInteractive | 15 | An event type denoting that the screen has gone in to an interactive state (turned on for full user interaction, not ambient display or other non-interactive state). Android reference for 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. |
| ScreenNonInteractive | 16 | An event type denoting that the screen has gone in to a non-interactive state (completely turned off or turned on only in a non-interactive state like ambient display). Android reference for 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. |
| KeyguardShown | 17 | An event type denoting that the screen's keyguard has been shown, whether or not the screen is off. Android reference for 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. |
| 18 | An event type denoting that the screen's keyguard has been hidden. This typically happens when the user unlocks their phone after turning it on. Android reference for 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. |
|
| ForegroundServiceStart | 19 | An event type denoting start of a foreground service. This event has a package name and class name associated with it and can be retrieved using getPackageName() and getClassName(). If a package has multiple foreground services, this event is reported for each service that is started. Android reference for 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. |
| ForegroundServiceStop | 20 | An event type denoting stop of a foreground service. This event has a package name and class name associated with it and can be retrieved using getPackageName() and getClassName(). If a package has multiple foreground services, this event is reported for each service that is stopped. Android reference for 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. |
| ActivityStopped | 23 | An activity becomes invisible on the UI, corresponding to Activity.onStop() of the activity's lifecycle. Android reference for 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. |
| DeviceShutdown | 26 | An event type denoting that the Android runtime underwent a shutdown process. A DEVICE_SHUTDOWN event should be treated as if all started activities and foreground services are now stopped and no explicit ACTIVITY_STOPPED and FOREGROUND_SERVICE_STOP events will be generated for them. The DEVICE_SHUTDOWN timestamp is actually the last time UsageStats database is persisted before the actual shutdown. Events (if there are any) between this timestamp and the actual shutdown is not persisted in the database. So any open events without matching close events between DEVICE_SHUTDOWN and DEVICE_STARTUP should be ignored because the closing time is unknown. Android reference for 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. |
| DeviceStartup | 27 | An event type denoting that the Android runtime started up. This could be after a shutdown or a runtime restart. Any open events without matching close events between DEVICE_SHUTDOWN and DEVICE_STARTUP should be ignored because the closing time is unknown. Android reference for 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. |
Remarks
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.