<instrumentation android:functionalTest=["true" | "false"] android:handleProfiling=["true" | "false"] android:icon="drawable resource" android:label="string resource" android:name="string" android:targetPackage="string" android:targetProcesses="string" />
- contained in:
- Declares an
Instrumentationclass that lets you monitor an application's interaction with the system. The
Instrumentationobject is instantiated before any of the application's components.
- Whether the
Instrumentationclass runs as a functional test. This is
trueif it does and
falseif not. The default value is
- Whether the
Instrumentationobject turns profiling on and off. This is
trueif it determines when profiling starts and stops and
falseif profiling continues the entire time it is running. A value of
trueenables the object to target profiling at a specific set of operations. The default value is
- An icon that represents the
Instrumentationclass. This attribute must be set as a reference to a drawable resource.
- A user-readable label for the
Instrumentationclass. The label can be set as a raw string or a reference to a string resource.
- The name of the
Instrumentationsubclass. Use a fully qualified class name, such as
com.example.project.StringInstrumentation. However, as a shorthand, if the first character of the name is a period, it is appended to the package name specified in the
There is no default. The name must be specified.
- The application that the
Instrumentationobject runs against. An application is identified by the package name assigned in its manifest file by the
The processes that the
Instrumentationobject runs against. A comma-separated list indicates that the instrumentation runs against those specific processes. A value of
"*"indicates that the instrumentation runs against all processes of the app defined in
If this value isn't provided in the manifest, the instrumentation runs only against the main process of the app defined in
This attribute was added in API level 26.
- introduced in:
- API level 1
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-22 UTC.