Android
android.content.pm
public class

android.content.pm.ApplicationInfo

java.lang.Object
android.content.pm.PackageItemInfo
android.content.pm.ApplicationInfo Parcelable

Information you can retrieve about a particular application. This corresponds to information collected from the AndroidManifest.xml's <application> tag.

Nested Classes

Summary

Constants

      Value  
Creator<ApplicationInfo CREATOR       
int  FLAG_ALLOW_CLEAR_USER_DATA  Value for flags: default value for the corresponding ActivityInfo flag.  64  0x00000040 
int  FLAG_ALLOW_TASK_REPARENTING  Value for flags: default value for the corresponding ActivityInfo flag.  32  0x00000020 
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.  0x00000002 
int  FLAG_FACTORY_TEST  Value for flags: set to true iif this application holds the FACTORY_TEST permission and the device is running in factory test mode.  16  0x00000010 
int  FLAG_HAS_CODE  Value for flags: set to true if this application has code associated with it.  0x00000004 
int  FLAG_PERSISTENT  Value for flags: set to true if this application is persistent.  0x00000008 
int  FLAG_SYSTEM  Value for flags: if set, this application is installed in the device's system image.  0x00000001 
Constants inherited from interface android.os.Parcelable

Fields

public      String  className  Java class implementing the Application object. 
public      String  dataDir  Full path to a directory assigned to the package for its persistent data. 
public      int  descriptionRes  A style resource identifier (in the package's resources) of the description of an application. 
public      boolean  enabled  When false, indicates that all components within this application are considered disabled, regardless of their individually set enabled status. 
public      int  flags  Flags associated with the application. 
public      String  manageSpaceActivityName  Java class implementing the Application's manage space functionality. 
public      String  permission  Optional name of a permission required to be able to access this application's components. 
public      String  processName  The name of the process this application should run in. 
public      String  publicSourceDir  Full path to the location of the publicly available parts of this package (i.e. 
public      String[]  sharedLibraryFiles  Paths to all shared libraries this application is linked against. 
public      String  sourceDir  Full path to the location of this package. 
public      String  taskAffinity  Default task affinity of all activities in this application. 
public      int  theme  A style resource identifier (in the package's resources) of the default visual theme of the application. 
public      int  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). 
Fields inherited from class android.content.pm.PackageItemInfo

Public Constructors

            ApplicationInfo()
            ApplicationInfo(ApplicationInfo orig)

Public Methods

          int  describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
          void  dump(Printer pw, String prefix)
          CharSequence  loadDescription(PackageManager pm)
Retrieve the textual description of the application.
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
          void  writeToParcel(Parcel dest, int parcelableFlags)
Methods inherited from class android.content.pm.PackageItemInfo
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final Creator<ApplicationInfo> CREATOR

public static final int FLAG_ALLOW_CLEAR_USER_DATA

Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowClearUserData of the <application> tag.
Constant Value: 64 (0x00000040)

public static final int FLAG_ALLOW_TASK_REPARENTING

Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowTaskReparenting of the <application> tag.
Constant Value: 32 (0x00000020)

public static final 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. Comes from android:debuggable of the <application> tag.
Constant Value: 2 (0x00000002)

public static final int FLAG_FACTORY_TEST

Value for flags: set to true iif this application holds the FACTORY_TEST permission and the device is running in factory test mode.
Constant Value: 16 (0x00000010)

public static final int FLAG_HAS_CODE

Value for flags: set to true if this application has code associated with it. Comes from android:hasCode of the <application> tag.
Constant Value: 4 (0x00000004)

public static final int FLAG_PERSISTENT

Value for flags: set to true if this application is persistent. Comes from android:persistent of the <application> tag.
Constant Value: 8 (0x00000008)

public static final int FLAG_SYSTEM

Value for flags: if set, this application is installed in the device's system image.
Constant Value: 1 (0x00000001)

Fields

public String className

Java class implementing the Application object. From the "class" attribute.

public String dataDir

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

public int descriptionRes

A style resource identifier (in the package's resources) of the description of an application. From the "description" attribute or, if not set, 0.

public boolean enabled

When false, indicates that all components within this application are considered disabled, regardless of their individually set enabled status.

public int flags

public String manageSpaceActivityName

Java class implementing the Application's manage space functionality. From the "manageSpaceActivity" attribute. This is an optional attribute and will be null if application's dont specify it in their manifest

public String permission

Optional name of a permission required to be able to access this application's components. From the "permission" attribute.

public String processName

The name of the process this application should run in. From the "process" attribute or, if not set, the same as packageName.

public String publicSourceDir

Full path to the location of the publicly available parts of this package (i.e. the resources and manifest). For non-forward-locked apps this will be the same as {@link #sourceDir).

public String[] sharedLibraryFiles

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.

public String sourceDir

Full path to the location of this package.

public String taskAffinity

Default task affinity of all activities in this application. See taskAffinity for more information. This comes from the "taskAffinity" attribute.

public int theme

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.

public int 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).

Public Constructors

public ApplicationInfo()

public ApplicationInfo(ApplicationInfo orig)

Public Methods

public int describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

public void dump(Printer pw, String prefix)

public CharSequence loadDescription(PackageManager pm)

Retrieve the textual description of the application. This will call back on the given PackageManager to load the description from the application.

Parameters

pm A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.

Returns

  • Returns a CharSequence containing the application's description. If there is no description, null is returned.

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.

public void writeToParcel(Parcel dest, int parcelableFlags)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56