# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Fields | Ctors | Protected Ctors | Methods | Protected Methods | Inherited Methods

# PackageItemInfo

`public class PackageItemInfo`
`extends Object` ``

java.lang.Object
↳ | android.content.pm.PackageItemInfo

Known direct subclasses ApplicationInfo, ComponentInfo, InstrumentationInfo, PermissionGroupInfo, PermissionInfo
ApplicationInfo | Information you can retrieve about a particular application.
ComponentInfo | Base class containing information common to all application components (`ActivityInfo`, `ServiceInfo`).
InstrumentationInfo | Information you can retrieve about a particular piece of test instrumentation.
PermissionGroupInfo | Information you can retrieve about a particular security permission group known to the system.
PermissionInfo | Information you can retrieve about a particular security permission known to the system.

Known indirect subclasses ActivityInfo, ProviderInfo, ServiceInfo
ActivityInfo | Information you can retrieve about a particular application activity or receiver.
ProviderInfo | Holds information about a specific `content provider`.
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` | `PackageItemInfo.DisplayNameComparator`

### Fields
`public int` | `banner` A drawable resource identifier (in the package's resources) of this component's banner.
`public int` | `icon` A drawable resource identifier (in the package's resources) of this component's icon.
`public int` | `labelRes` A string resource identifier (in the package's resources) of this component's label.
`public int` | `logo` A drawable resource identifier (in the package's resources) of this component's logo.
`public Bundle` | `metaData` Additional meta-data associated with this component.
`public String` | `name` Public name of this item.
`public CharSequence` | `nonLocalizedLabel` The string provided in the AndroidManifest file, if any.
`public String` | `packageName` Name of the package that this item is in.

### Public constructors
`PackageItemInfo()`
`PackageItemInfo(PackageItemInfo orig)`

### Protected constructors
`PackageItemInfo(Parcel source)`

### Public methods
`Drawable` | `loadBanner(PackageManager pm)` Retrieve the current graphical banner associated with this item.
`Drawable` | `loadIcon(PackageManager pm)` Retrieve the current graphical icon associated with this item.
`CharSequence` | `loadLabel(PackageManager pm)` Retrieve the current textual label associated with this item.
`Drawable` | `loadLogo(PackageManager pm)` Retrieve the current graphical logo associated with this item.
`Drawable` | `loadUnbadgedIcon(PackageManager pm)` Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable.
`XmlResourceParser` | `loadXmlMetaData(PackageManager pm, String name)` Load an XML resource attached to the meta-data of this item.
`void` | `writeToParcel(Parcel dest, int parcelableFlags)`

### Protected methods
`void` | `dumpBack(Printer pw, String prefix)`
`void` | `dumpFront(Printer pw, String prefix)`

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Fields

### banner

    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.

### icon

    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.

### labelRes

    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.

### logo

    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.

### metaData

    public Bundle metaData

Additional meta-data associated with this component. This field will only be filled in if you set the `PackageManager#GET_META_DATA` flag when requesting the info.

### name

    public String name

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

### nonLocalizedLabel

    public CharSequence nonLocalizedLabel

The string provided in the AndroidManifest file, if any. You probably don't want to use this. You probably want `PackageManager#getApplicationLabel`

### packageName

    public String packageName

Name of the package that this item is in.

## Public constructors

### PackageItemInfo

    public PackageItemInfo ()

### PackageItemInfo

    public PackageItemInfo (PackageItemInfo orig)

Parameters
`orig` | `PackageItemInfo`

## Protected constructors

### PackageItemInfo

    protected PackageItemInfo (Parcel source)

Parameters
`source` | `Parcel`

## Public methods

### loadBanner

    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.

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

Returns
`Drawable` | Returns a Drawable containing the item's banner. If the item does not have a banner, this method will return null.

### loadIcon

    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.

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

Returns
`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.

### loadLabel

    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.

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

Returns
`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`.

### loadLogo

    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.

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

Returns
`Drawable` | Returns a Drawable containing the item's logo. If the item does not have a logo, this method will return null.

### loadUnbadgedIcon

    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.

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

Returns
`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.

### loadXmlMetaData

    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.

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

Returns
`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.

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int parcelableFlags)

Parameters
`dest` | `Parcel`
`parcelableFlags` | `int`

## Protected methods

### dumpBack

    protected void dumpBack (Printer pw,
                    String prefix)

Parameters
`pw` | `Printer`
`prefix` | `String`

### dumpFront

    protected void dumpFront (Printer pw,
                    String prefix)

Parameters
`pw` | `Printer`
`prefix` | `String`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*