Android

Android Attributes

The Android platform on which the Android application is running.

AttributeTypeDescriptionExamplesStability
android.app.statestringThis attribute represents the state of the application. [1]createdDevelopment
android.os.api_levelstringUniquely identifies the framework API revision offered by a version (os.version) of the android operating system. More information can be found here.33; 32Development

[1] android.app.state: The Android lifecycle states are defined in Activity lifecycle callbacks, and from which the OS identifiers are derived.


android.app.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
backgroundAny time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state.Development
createdAny time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time.Development
foregroundAny time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states.Development

Deprecated Android Attributes

This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform.

AttributeTypeDescriptionExamplesStability
android.statestringDeprecated. Use android.app.state instead. [2]created; background; foregroundDeprecated
Renamed to android.app.state

[2] android.state: The Android lifecycle states are defined in Activity lifecycle callbacks, and from which the OS identifiers are derived.


android.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
backgroundAny time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state.Development
createdAny time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time.Development
foregroundAny time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states.Development