Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/content/pm/PackageItemInfo#nestedclasses) \| [Fields](https://developer.android.com/reference/android/content/pm/PackageItemInfo#lfields) \| [Ctors](https://developer.android.com/reference/android/content/pm/PackageItemInfo#pubctors) \| [Protected Ctors](https://developer.android.com/reference/android/content/pm/PackageItemInfo#proctors) \| [Methods](https://developer.android.com/reference/android/content/pm/PackageItemInfo#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/content/pm/PackageItemInfo#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/pm/PackageItemInfo#inhmethods)

# PackageItemInfo

*** ** * ** ***


`
public


class
PackageItemInfo
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

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

Known direct subclasses [ApplicationInfo](https://developer.android.com/reference/android/content/pm/ApplicationInfo), [ComponentInfo](https://developer.android.com/reference/android/content/pm/ComponentInfo), [InstrumentationInfo](https://developer.android.com/reference/android/content/pm/InstrumentationInfo), [PermissionGroupInfo](https://developer.android.com/reference/android/content/pm/PermissionGroupInfo), [PermissionInfo](https://developer.android.com/reference/android/content/pm/PermissionInfo) [ApplicationInfo](https://developer.android.com/reference/android/content/pm/ApplicationInfo) Information you can retrieve about a particular application. [ComponentInfo](https://developer.android.com/reference/android/content/pm/ComponentInfo) Base class containing information common to all application components (`https://developer.android.com/reference/android/content/pm/ActivityInfo`, `https://developer.android.com/reference/android/content/pm/ServiceInfo`). [InstrumentationInfo](https://developer.android.com/reference/android/content/pm/InstrumentationInfo) Information you can retrieve about a particular piece of test instrumentation. [PermissionGroupInfo](https://developer.android.com/reference/android/content/pm/PermissionGroupInfo) Information you can retrieve about a particular security permission group known to the system. [PermissionInfo](https://developer.android.com/reference/android/content/pm/PermissionInfo) Information you can retrieve about a particular security permission known to the system. Known indirect subclasses [ActivityInfo](https://developer.android.com/reference/android/content/pm/ActivityInfo), [ProviderInfo](https://developer.android.com/reference/android/content/pm/ProviderInfo), [ServiceInfo](https://developer.android.com/reference/android/content/pm/ServiceInfo) [ActivityInfo](https://developer.android.com/reference/android/content/pm/ActivityInfo) Information you can retrieve about a particular application activity or receiver. [ProviderInfo](https://developer.android.com/reference/android/content/pm/ProviderInfo) Holds information about a specific `https://developer.android.com/reference/android/content/ContentProvider`. [ServiceInfo](https://developer.android.com/reference/android/content/pm/ServiceInfo) Information you can retrieve about a particular application service.   

*** ** * ** ***

Base class containing information common to all package items held by
the package manager. This provides a very common basic set of attributes:
a label, icon, and meta-data. This class is not intended
to be used by itself; it is simply here to share common definitions
between all items returned by the package manager. As such, it does not
itself implement Parcelable, but does provide convenience methods to assist
in the implementation of Parcelable in subclasses.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo.DisplayNameComparator` |

| ### Fields ||
|---|---|
| ` 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/PackageItemInfo#PackageItemInfo()() ` |
| ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#PackageItemInfo(android.content.pm.PackageItemInfo)(https://developer.android.com/reference/android/content/pm/PackageItemInfo orig) ` |

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#PackageItemInfo(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel source) ` |

| ### Public methods ||
|---|---|
| ` 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) ` |

| ### Protected methods ||
|---|---|
| ` 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) ` |

### Inherited methods

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*.


## Fields

### banner

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

```
public int banner
```

A drawable resource identifier (in the package's resources) of this
component's banner. From the "banner" attribute or, if not set, 0.

<br />

### icon

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

```
public int icon
```

A drawable resource identifier (in the package's resources) of this
component's icon. From the "icon" attribute or, if not set, 0.

<br />

### isArchived

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

```
public boolean isArchived
```

Whether the package is currently in an archived state.

Packages can be archived through `https://developer.android.com/reference/android/content/pm/PackageInstaller#requestArchive(java.lang.String,%20android.content.IntentSender)` and do not have
any APKs stored on the device, but do keep the data directory.

<br />

### labelRes

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

```
public int labelRes
```

A string resource identifier (in the package's resources) of this
component's label. From the "label" attribute or, if not set, 0.

<br />

### logo

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

```
public int logo
```

A drawable resource identifier (in the package's resources) of this
component's logo. Logos may be larger/wider than icons and are
displayed by certain UI elements in place of a name or name/icon
combination. From the "logo" attribute or, if not set, 0.

<br />

### metaData

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

```
public Bundle metaData
```

Additional meta-data associated with this component. This field
will only be filled in if you set the
`https://developer.android.com/reference/android/content/pm/PackageManager#GET_META_DATA` flag when requesting the info.

<br />

### name

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

```
public String name
```

Public name of this item. From the "android:name" attribute.

<br />

### nonLocalizedLabel

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

```
public CharSequence nonLocalizedLabel
```

The string provided in the AndroidManifest file, if any. You
probably don't want to use this. You probably want
`https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationLabel(android.content.pm.ApplicationInfo)`

<br />

### packageName

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

```
public String packageName
```

Name of the package that this item is in.

<br />

## Public constructors

### PackageItemInfo

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

```
public PackageItemInfo ()
```

<br />

<br />

### PackageItemInfo

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

```
public PackageItemInfo (PackageItemInfo orig)
```

<br />

<br />

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

## Protected constructors

### PackageItemInfo

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

```
protected PackageItemInfo (Parcel source)
```

<br />

<br />

| Parameters ||
|---|---|
| `source` | `Parcel` <br /> |

## Public methods

### loadBanner

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

```
public Drawable loadBanner (PackageManager pm)
```

Retrieve the current graphical banner associated with this item. This
will call back on the given PackageManager to load the banner from
the application.

The returned drawable is subject to the same size capping limits as described
in `https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationIcon(android.content.pm.ApplicationInfo)`.

<br />

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the banner can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | Returns a Drawable containing the item's banner. If the item does not have a banner, this method will return null. <br /> |

### loadIcon

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

```
public Drawable loadIcon (PackageManager pm)
```

Retrieve the current graphical icon associated with this item. This
will call back on the given PackageManager to load the icon from
the application.

The returned drawable is subject to the same size capping limits as described
in `https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationIcon(android.content.pm.ApplicationInfo)`.

<br />

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | Returns a Drawable containing the item's icon. If the item does not have an icon, the item's default icon is returned such as the default activity icon. <br /> |

### loadLabel

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

```
public CharSequence loadLabel (PackageManager pm)
```

Retrieve the current textual label associated with this item. This
will call back on the given PackageManager to load the label from
the application.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | Returns a CharSequence containing the item's label. If the item does not have a label, its name is returned. This value cannot be `null`. <br /> |

### loadLogo

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

```
public Drawable loadLogo (PackageManager pm)
```

Retrieve the current graphical logo associated with this item. This
will call back on the given PackageManager to load the logo from
the application.

The returned drawable is subject to the same size capping limits as described
in `https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationIcon(android.content.pm.ApplicationInfo)`.

<br />

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the logo can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | Returns a Drawable containing the item's logo. If the item does not have a logo, this method will return null. <br /> |

### loadUnbadgedIcon

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

```
public Drawable loadUnbadgedIcon (PackageManager pm)
```

Retrieve the current graphical icon associated with this item without
the addition of a work badge if applicable.
This will call back on the given PackageManager to load the icon from
the application.

The returned drawable is subject to the same size capping limits as described
in `https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationIcon(android.content.pm.ApplicationInfo)`.

<br />

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | Returns a Drawable containing the item's icon. If the item does not have an icon, the item's default icon is returned such as the default activity icon. <br /> |

### loadXmlMetaData

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

```
public XmlResourceParser loadXmlMetaData (PackageManager pm, 
                String name)
```

Load an XML resource attached to the meta-data of this item. This will
retrieved the name meta-data entry, and if defined call back on the
given PackageManager to load its XML file from the application.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the XML can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |
| `name` | `String`: Name of the meta-date you would like to load. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/XmlResourceParser` | Returns an XmlPullParser you can use to parse the XML file assigned as the given meta-data. If the meta-data name is not defined or the XML resource could not be found, null is returned. <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 /> |

## Protected methods

### dumpBack

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

```
protected void dumpBack (Printer pw, 
                String prefix)
```

<br />

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |

### dumpFront

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

```
protected void dumpFront (Printer pw, 
                String prefix)
```

<br />

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |