Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#lfields) \| [Inherited Fields](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#inhfields) \| [Ctors](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/pm/InstrumentationInfo#inhmethods)

# InstrumentationInfo

*** ** * ** ***

` public class InstrumentationInfo `   
` ` ` extends https://developer.android.com/reference/android/content/pm/PackageItemInfo ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.content.pm.PackageItemInfo](https://developer.android.com/reference/android/content/pm/PackageItemInfo) ||
|   | ↳ | android.content.pm.InstrumentationInfo |

<br />

*** ** * ** ***

Information you can retrieve about a particular piece of test instrumentation. This corresponds to information collected from the AndroidManifest.xml's \<instrumentation\> tag.

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/content/pm/InstrumentationInfo>` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#CREATOR` <br /> |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#dataDir` Full path to a directory assigned to the package for its persistent data. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#functionalTest` Specifies whether or not to run this instrumentation as a functional test |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#handleProfiling` Specifies whether or not this instrumentation will handle profiling. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#publicSourceDir` Full path to the publicly available parts of `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#sourceDir`, including resources and manifest. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#sourceDir` Full path to the base APK for this application. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitNames` The names of all installed split APKs, ordered lexicographically. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitPublicSourceDirs` Full path to the publicly available parts of `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitSourceDirs`, including resources and manifest. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitSourceDirs` Full paths to zero or more split APKs, indexed by the same order as `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitNames`. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#targetPackage` The name of the application package being instrumented. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#targetProcesses` Names of the process(es) this instrumentation will run in. |

### Inherited fields

From class `https://developer.android.com/reference/android/content/pm/PackageItemInfo` ` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#banner`

A drawable resource identifier (in the package's resources) of this component's banner.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#icon`

A drawable resource identifier (in the package's resources) of this component's icon.
` public boolean` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#isArchived`

Whether the package is currently in an archived state.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#labelRes`

A string resource identifier (in the package's resources) of this component's label.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#logo`

A drawable resource identifier (in the package's resources) of this component's logo.
` public https://developer.android.com/reference/android/os/Bundle` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#metaData`

Additional meta-data associated with this component.
` public https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#name`

Public name of this item.
` public https://developer.android.com/reference/java/lang/CharSequence` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#nonLocalizedLabel`

The string provided in the AndroidManifest file, if any.
` public https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#packageName`

Name of the package that this item is in.

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/pm/InstrumentationInfo#InstrumentationInfo()() ` |
| ` https://developer.android.com/reference/android/content/pm/InstrumentationInfo#InstrumentationInfo(android.content.pm.InstrumentationInfo)(https://developer.android.com/reference/android/content/pm/InstrumentationInfo orig) ` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/content/pm/InstrumentationInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/pm/InstrumentationInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/InstrumentationInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` <br /> |

### Inherited methods

From class ` https://developer.android.com/reference/android/content/pm/PackageItemInfo ` ` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpBack(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` ` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpFront(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` ` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadBanner(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical banner associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical icon associated with this item.
` https://developer.android.com/reference/java/lang/CharSequence` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current textual label associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLogo(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical logo associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadUnbadgedIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable.
` https://developer.android.com/reference/android/content/res/XmlResourceParser` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadXmlMetaData(android.content.pm.PackageManager,%20java.lang.String)(https://developer.android.com/reference/android/content/pm/PackageManager pm, https://developer.android.com/reference/java/lang/String name) `

Load an XML resource attached to the meta-data of this item.
` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<InstrumentationInfo> CREATOR
```

<br />

<br />

### dataDir

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String dataDir
```

Full path to a directory assigned to the package for its persistent data.

<br />

### functionalTest

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean functionalTest
```

Specifies whether or not to run this instrumentation as a functional test

<br />

### handleProfiling

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean handleProfiling
```

Specifies whether or not this instrumentation will handle profiling.

<br />

### publicSourceDir

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String publicSourceDir
```

Full path to the publicly available parts of `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#sourceDir`, including resources and manifest. This may be different from `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#sourceDir` if an application is forward locked.

<br />

### sourceDir

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String sourceDir
```

Full path to the base APK for this application.

<br />

### splitNames

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] splitNames
```

The names of all installed split APKs, ordered lexicographically.

<br />

### splitPublicSourceDirs

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] splitPublicSourceDirs
```

Full path to the publicly available parts of `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitSourceDirs`, including resources and manifest. This may be different from `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitSourceDirs` if an application is forward locked.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitSourceDirs`

### splitSourceDirs

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] splitSourceDirs
```

Full paths to zero or more split APKs, indexed by the same order as `https://developer.android.com/reference/android/content/pm/InstrumentationInfo#splitNames`.

<br />

### targetPackage

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String targetPackage
```

The name of the application package being instrumented. From the "package" attribute.

<br />

### targetProcesses

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String targetProcesses
```

Names of the process(es) this instrumentation will run in. If not specified, only runs in the main process of the targetPackage. Can either be a comma-separated list of process names or '\*' for any process that launches to run targetPackage code.

<br />

## Public constructors

### InstrumentationInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InstrumentationInfo ()
```

<br />

<br />

### InstrumentationInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InstrumentationInfo (InstrumentationInfo orig)
```

<br />

<br />

| Parameters ||
|---|---|
| `orig` | `InstrumentationInfo` <br /> |

## Public methods

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int parcelableFlags)
```

<br />

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel` <br /> |
| `parcelableFlags` | `int` <br /> |