| java.lang.Object | ||
| ↳ | android.content.pm.PackageItemInfo | |
| ↳ | android.content.pm.ApplicationInfo | |
Information you can retrieve about a particular application. This corresponds to information collected from the AndroidManifest.xml's <application> tag.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ApplicationInfo.DisplayNameComparator | |||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | FLAG_ALLOW_BACKUP | Value for flags: set tofalseif the application does not wish
 to permit any OS-driven backups of its data;trueotherwise. | |||||||||
| int | FLAG_ALLOW_CLEAR_USER_DATA | Value for flags: default value for the corresponding ActivityInfo flag. | |||||||||
| int | FLAG_ALLOW_TASK_REPARENTING | Value for flags: default value for the corresponding ActivityInfo flag. | |||||||||
| int | FLAG_DEBUGGABLE | Value for flags: set to true if this application would like to
 allow debugging of its
 code, even when installed on a non-development system. | |||||||||
| int | FLAG_EXTERNAL_STORAGE | Value for flags: Set to true if the application is
 currently installed on external/removable/unprotected storage. | |||||||||
| int | FLAG_FACTORY_TEST | Value for flags: set to true if this application holds theFACTORY_TESTpermission and the
 device is running in factory test mode. | |||||||||
| int | FLAG_HAS_CODE | Value for flags: set to true if this application has code
 associated with it. | |||||||||
| int | FLAG_INSTALLED | Value for flags: true if the application is currently
 installed for the calling user. | |||||||||
| int | FLAG_IS_DATA_ONLY | Value for flags: true if the application only has its
 data installed; the application package itself does not currently
 exist on the device. | |||||||||
| int | FLAG_IS_GAME | Value for flags: true if the application was declared to be a game, or
 false if it is a non-game application. | |||||||||
| int | FLAG_KILL_AFTER_RESTORE | Value for flags: set tofalseif the application must be kept
 in memory following a full-system restore operation;trueotherwise. | |||||||||
| int | FLAG_LARGE_HEAP | Value for flags: true when the application has requested a
 large heap for its processes. | |||||||||
| int | FLAG_PERSISTENT | Value for flags: set to true if this application is persistent. | |||||||||
| int | FLAG_RESIZEABLE_FOR_SCREENS | Value for flags: true when the application knows how to adjust
 its UI for different screen sizes. | |||||||||
| int | FLAG_RESTORE_ANY_VERSION | Value for flags: Set totrueif the application's backup
 agent claims to be able to handle restore data even "from the future,"
 i.e. | |||||||||
| int | FLAG_STOPPED | Value for flags: true if this application's package is in
 the stopped state. | |||||||||
| int | FLAG_SUPPORTS_LARGE_SCREENS | Value for flags: true when the application's window can be
 increased in size for larger screens. | |||||||||
| int | FLAG_SUPPORTS_NORMAL_SCREENS | Value for flags: true when the application's window can be
 displayed on normal screens. | |||||||||
| int | FLAG_SUPPORTS_RTL | Value for flags: true  when the application is willing to support
 RTL (right to left). | |||||||||
| int | FLAG_SUPPORTS_SCREEN_DENSITIES | Value for flags: true when the application knows how to
 accomodate different screen densities. | |||||||||
| int | FLAG_SUPPORTS_SMALL_SCREENS | Value for flags: true when the application's window can be
 reduced in size for smaller screens. | |||||||||
| int | FLAG_SUPPORTS_XLARGE_SCREENS | Value for flags: true when the application's window can be
 increased in size for extra large screens. | |||||||||
| int | FLAG_SYSTEM | Value for flags: if set, this application is installed in the
 device's system image. | |||||||||
| int | FLAG_TEST_ONLY | Value for flags: this is set of the application has specifiedandroid:testOnlyto be true. | |||||||||
| int | FLAG_UPDATED_SYSTEM_APP | Value for flags: this is set if this application has been
 install as an update to a built-in system application. | |||||||||
| int | FLAG_VM_SAFE_MODE | Value for flags: set to true if this application would like to
 request the VM to operate under the safe mode. | |||||||||
| [Expand] Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From interface
android.os.Parcelable | |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CREATOR | |||||||||||
| backupAgentName | Class implementing the Application's backup functionality. | ||||||||||
| className | Class implementing the Application object. | ||||||||||
| compatibleWidthLimitDp | The maximum smallest screen width the application is designed for. | ||||||||||
| dataDir | Full path to a directory assigned to the package for its persistent data. | ||||||||||
| descriptionRes | A style resource identifier (in the package's resources) of the description of an application. | ||||||||||
| enabled | When false, indicates that all components within this application are considered disabled, regardless of their individually set enabled status. | ||||||||||
| flags | Flags associated with the application. | ||||||||||
| largestWidthLimitDp | The maximum smallest screen width the application will work on. | ||||||||||
| manageSpaceActivityName | Class implementing the Application's manage space functionality. | ||||||||||
| nativeLibraryDir | Full path to the directory where native JNI libraries are stored. | ||||||||||
| permission | Optional name of a permission required to be able to access this application's components. | ||||||||||
| processName | The name of the process this application should run in. | ||||||||||
| publicSourceDir | Full path to the location of the publicly available parts of this package (i.e. | ||||||||||
| requiresSmallestWidthDp | The required smallest screen width the application can run on. | ||||||||||
| sharedLibraryFiles | Paths to all shared libraries this application is linked against. | ||||||||||
| sourceDir | Full path to the location of this package. | ||||||||||
| targetSdkVersion | The minimum SDK version this application targets. | ||||||||||
| taskAffinity | Default task affinity of all activities in this application. | ||||||||||
| theme | A style resource identifier (in the package's resources) of the default visual theme of the application. | ||||||||||
| uiOptions | The default extra UI options for activities in this application. | ||||||||||
| uid | The kernel user-ID that has been assigned to this application; currently this is not a unique ID (multiple applications can have the same uid). | ||||||||||
| [Expand] Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
android.content.pm.PackageItemInfo | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Describe the kinds of special objects contained in this Parcelable's
 marshalled representation. | |||||||||||
| Retrieve the textual description of the application. | |||||||||||
| Returns a string containing a concise, human-readable description of this
 object. | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  android.content.pm.PackageItemInfo | |||||||||||
|  From class
  java.lang.Object | |||||||||||
|  From interface
  android.os.Parcelable | |||||||||||
Value for flags: set to false if the application does not wish
 to permit any OS-driven backups of its data; true otherwise.
 
 
Comes from the
 android:allowBackup
 attribute of the <application> tag.
Value for flags: default value for the corresponding ActivityInfo flag.
 Comes from android:allowClearUserData of the <application> tag.
Value for flags: default value for the corresponding ActivityInfo flag.
 Comes from android:allowTaskReparenting of the <application> tag.
Value for flags: set to true if this application would like to
 allow debugging of its
 code, even when installed on a non-development system.  Comes
 from android:debuggable of the <application> tag.
Value for flags: Set to true if the application is
 currently installed on external/removable/unprotected storage.  Such
 applications may not be available if their storage is not currently
 mounted.  When the storage it is on is not available, it will look like
 the application has been uninstalled (its .apk is no longer available)
 but its persistent data is not removed.
Value for flags: set to true if this application holds the
 FACTORY_TEST permission and the
 device is running in factory test mode.
Value for flags: set to true if this application has code
 associated with it.  Comes
 from android:hasCode of the <application> tag.
Value for flags: true if the application is currently
 installed for the calling user.
Value for flags: true if the application only has its
 data installed; the application package itself does not currently
 exist on the device.
Value for flags: true if the application was declared to be a game, or
 false if it is a non-game application.
Value for flags: set to false if the application must be kept
 in memory following a full-system restore operation; true otherwise.
 Ordinarily, during a full system restore operation each application is shut down
 following execution of its agent's onRestore() method.  Setting this attribute to
 false prevents this.  Most applications will not need to set this attribute.
 
If
 android:allowBackup
 is set to false or no
 android:backupAgent
 is specified, this flag will be ignored.
 
Comes from the
 android:killAfterRestore
 attribute of the <application> tag.
Value for flags: true when the application has requested a
 large heap for its processes.  Corresponds to
 android:largeHeap.
Value for flags: set to true if this application is persistent.
 Comes from android:persistent of the <application> tag.
Value for flags: true when the application knows how to adjust
 its UI for different screen sizes.  Corresponds to
 android:resizeable.
Value for flags: Set to true if the application's backup
 agent claims to be able to handle restore data even "from the future,"
 i.e. from versions of the application with a versionCode greater than
 the one currently installed on the device.  Use with caution!  By default
 this attribute is false and the Backup Manager will ensure that data
 from "future" versions of the application are never supplied during a restore operation.
 
If
 android:allowBackup
 is set to false or no
 android:backupAgent
 is specified, this flag will be ignored.
 
Comes from the
 android:restoreAnyVersion
 attribute of the <application> tag.
Value for flags: true if this application's package is in
 the stopped state.
Value for flags: true when the application's window can be
 increased in size for larger screens.  Corresponds to
 android:largeScreens.
Value for flags: true when the application's window can be
 displayed on normal screens.  Corresponds to
 android:normalScreens.
Value for flags: true  when the application is willing to support
 RTL (right to left). All activities will inherit this value.
 Set from the supportsRtl attribute in the
 activity's manifest.
 Default value is false (no support for RTL).
Value for flags: true when the application knows how to
 accomodate different screen densities.  Corresponds to
 android:anyDensity.
Value for flags: true when the application's window can be
 reduced in size for smaller screens.  Corresponds to
 android:smallScreens.
Value for flags: true when the application's window can be
 increased in size for extra large screens.  Corresponds to
 android:xlargeScreens.
Value for flags: if set, this application is installed in the
 device's system image.
Value for flags: this is set of the application has specified
 android:testOnly to be true.
Value for flags: this is set if this application has been
 install as an update to a built-in system application.
Value for flags: set to true if this application would like to
 request the VM to operate under the safe mode. Comes from
 android:vmSafeMode of the <application> tag.
Class implementing the Application's backup functionality. From the "backupAgent" attribute. This is an optional attribute and will be null if the application does not specify it in its manifest.
If android:allowBackup is set to false, this attribute is ignored.
Class implementing the Application object. From the "class" attribute.
The maximum smallest screen width the application is designed for.  If 0,
 nothing has been specified.  Comes from
 android:compatibleWidthLimitDp attribute of the <supports-screens> tag.
Full path to a directory assigned to the package for its persistent data.
A style resource identifier (in the package's resources) of the description of an application. From the "description" attribute or, if not set, 0.
When false, indicates that all components within this application are considered disabled, regardless of their individually set enabled status.
Flags associated with the application.  Any combination of
 FLAG_SYSTEM, FLAG_DEBUGGABLE, FLAG_HAS_CODE,
 FLAG_PERSISTENT, FLAG_FACTORY_TEST, and
 FLAG_ALLOW_TASK_REPARENTING
 FLAG_ALLOW_CLEAR_USER_DATA, FLAG_UPDATED_SYSTEM_APP,
 FLAG_TEST_ONLY, FLAG_SUPPORTS_SMALL_SCREENS,
 FLAG_SUPPORTS_NORMAL_SCREENS,
 FLAG_SUPPORTS_LARGE_SCREENS, FLAG_SUPPORTS_XLARGE_SCREENS,
 FLAG_RESIZEABLE_FOR_SCREENS,
 FLAG_SUPPORTS_SCREEN_DENSITIES, FLAG_VM_SAFE_MODE,
 FLAG_INSTALLED, FLAG_IS_GAME.
The maximum smallest screen width the application will work on.  If 0,
 nothing has been specified.  Comes from
 android:largestWidthLimitDp attribute of the <supports-screens> tag.
Class implementing the Application's manage space functionality. From the "manageSpaceActivity" attribute. This is an optional attribute and will be null if applications don't specify it in their manifest
Full path to the directory where native JNI libraries are stored.
Optional name of a permission required to be able to access this application's components. From the "permission" attribute.
The name of the process this application should run in. From the "process" attribute or, if not set, the same as packageName.
Full path to the location of the publicly available parts of this package (i.e. the primary resource package and manifest). For non-forward-locked apps this will be the same as {@link #sourceDir).
The required smallest screen width the application can run on.  If 0,
 nothing has been specified.  Comes from
 android:requiresSmallestWidthDp attribute of the <supports-screens> tag.
Paths to all shared libraries this application is linked against.  This
 field is only set if the PackageManager.GET_SHARED_LIBRARY_FILES flag was used when retrieving
 the structure.
The minimum SDK version this application targets.  It may run on earlier
 versions, but it knows how to work with any new behavior added at this
 version.  Will be CUR_DEVELOPMENT
 if this is a development build and the app is targeting that.  You should
 compare that this number is >= the SDK version number at which your
 behavior was introduced.
Default task affinity of all activities in this application. See 
 taskAffinity for more information.  This comes 
 from the "taskAffinity" attribute. 
A style resource identifier (in the package's resources) of the default visual theme of the application. From the "theme" attribute or, if not set, 0.
The default extra UI options for activities in this application.
 Set from the uiOptions attribute in the
 activity's manifest.
The kernel user-ID that has been assigned to this application; currently this is not a unique ID (multiple applications can have the same uid).
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Retrieve the textual description of the application. This will call back on the given PackageManager to load the description from the application.
| pm | A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item. | 
|---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
 toString method
 if you intend implementing your own toString method.