java.lang.Object | |
↳ | android.content.pm.PackageInfo |
Overall information about the contents of a package. This corresponds to all of the information collected from AndroidManifest.xml.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | INSTALL_LOCATION_AUTO |
Constant corresponding to auto in the
installLocation attribute.
|
|||||||||
int | INSTALL_LOCATION_INTERNAL_ONLY |
Constant corresponding to internalOnly in the
installLocation attribute.
|
|||||||||
int | INSTALL_LOCATION_PREFER_EXTERNAL |
Constant corresponding to preferExternal in the
installLocation attribute.
|
|||||||||
int | REQUESTED_PERMISSION_GRANTED |
Flag for requestedPermissionsFlags : the requested permission
is currently granted to the application.
|
|||||||||
int | REQUESTED_PERMISSION_REQUIRED |
Flag for requestedPermissionsFlags : the requested permission
is required for the application to run; the user can not optionally
disable it.
|
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR | |||||||||||
activities |
Array of all <activity> tags included under <application>,
or null if there were none.
|
||||||||||
applicationInfo | Information collected from the <application> tag, or null if there was none. | ||||||||||
baseRevisionCode |
The revision number of the base APK for this package, as specified by the
<manifest> tag's
revisionCode
attribute.
|
||||||||||
configPreferences |
Application specified preferred configuration
<uses-configuration> tags included under <manifest>,
or null if there were none.
|
||||||||||
featureGroups | Groups of features that this application has requested. | ||||||||||
firstInstallTime | The time at which the app was first installed. | ||||||||||
gids | All kernel group-IDs that have been assigned to this package. | ||||||||||
installLocation | The install location requested by the package. | ||||||||||
instrumentation |
Array of all <instrumentation> tags included under <manifest>,
or null if there were none.
|
||||||||||
lastUpdateTime | The time at which the app was last updated. | ||||||||||
packageName | The name of this package. | ||||||||||
permissions |
Array of all <permission> tags included under <manifest>,
or null if there were none.
|
||||||||||
providers |
Array of all <provider> tags included under <application>,
or null if there were none.
|
||||||||||
receivers |
Array of all <receiver> tags included under <application>,
or null if there were none.
|
||||||||||
reqFeatures | Features that this application has requested. | ||||||||||
requestedPermissions |
Array of all <uses-permission> tags included under <manifest>,
or null if there were none.
|
||||||||||
requestedPermissionsFlags |
Array of flags of all <uses-permission> tags included under <manifest>,
or null if there were none.
|
||||||||||
services |
Array of all <service> tags included under <application>,
or null if there were none.
|
||||||||||
sharedUserId |
The shared user ID name of this package, as specified by the <manifest>
tag's sharedUserId
attribute.
|
||||||||||
sharedUserLabel |
The shared user ID label of this package, as specified by the <manifest>
tag's sharedUserLabel
attribute.
|
||||||||||
signatures | Array of all signatures read from the package file. | ||||||||||
splitNames | The names of any installed split APKs for this package. | ||||||||||
splitRevisionCodes |
The revision number of any split APKs for this package, as specified by
the <manifest> tag's
revisionCode
attribute.
|
||||||||||
versionCode |
The version number of this package, as specified by the <manifest>
tag's versionCode
attribute.
|
||||||||||
versionName |
The version name of this package, as specified by the <manifest>
tag's versionName
attribute.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Constant corresponding to auto
in the
installLocation
attribute.
Constant corresponding to internalOnly
in the
installLocation
attribute.
Constant corresponding to preferExternal
in the
installLocation
attribute.
Flag for requestedPermissionsFlags
: the requested permission
is currently granted to the application.
Flag for requestedPermissionsFlags
: the requested permission
is required for the application to run; the user can not optionally
disable it. Currently all permissions are required.
Array of all <activity>
tags included under <application>,
or null if there were none. This is only filled in if the flag
GET_ACTIVITIES
was set.
Information collected from the <application> tag, or null if there was none.
The revision number of the base APK for this package, as specified by the
<manifest> tag's
revisionCode
attribute.
Application specified preferred configuration
<uses-configuration>
tags included under <manifest>,
or null if there were none. This is only filled in if the flag
GET_CONFIGURATIONS
was set.
Groups of features that this application has requested.
Each group contains a set of features that are required.
A device must match the features listed in reqFeatures
and one
or more FeatureGroups in order to have satisfied the feature requirement.
The time at which the app was first installed. Units are as
per currentTimeMillis()
.
All kernel group-IDs that have been assigned to this package.
This is only filled in if the flag GET_GIDS
was set.
The install location requested by the package. From the
installLocation
attribute, one of
INSTALL_LOCATION_AUTO
, INSTALL_LOCATION_INTERNAL_ONLY
,
INSTALL_LOCATION_PREFER_EXTERNAL
Array of all <instrumentation>
tags included under <manifest>,
or null if there were none. This is only filled in if the flag
GET_INSTRUMENTATION
was set.
The time at which the app was last updated. Units are as
per currentTimeMillis()
.
The name of this package. From the <manifest> tag's "name" attribute.
Array of all <permission>
tags included under <manifest>,
or null if there were none. This is only filled in if the flag
GET_PERMISSIONS
was set.
Array of all <provider>
tags included under <application>,
or null if there were none. This is only filled in if the flag
GET_PROVIDERS
was set.
Array of all <receiver>
tags included under <application>,
or null if there were none. This is only filled in if the flag
GET_RECEIVERS
was set.
Features that this application has requested.
Array of all <uses-permission>
tags included under <manifest>,
or null if there were none. This is only filled in if the flag
GET_PERMISSIONS
was set. This list includes
all permissions requested, even those that were not granted or known
by the system at install time.
Array of flags of all <uses-permission>
tags included under <manifest>,
or null if there were none. This is only filled in if the flag
GET_PERMISSIONS
was set. Each value matches
the corresponding entry in requestedPermissions
, and will have
the flags REQUESTED_PERMISSION_REQUIRED
and
REQUESTED_PERMISSION_GRANTED
set as appropriate.
Array of all <service>
tags included under <application>,
or null if there were none. This is only filled in if the flag
GET_SERVICES
was set.
The shared user ID name of this package, as specified by the <manifest>
tag's sharedUserId
attribute.
The shared user ID label of this package, as specified by the <manifest>
tag's sharedUserLabel
attribute.
Array of all signatures read from the package file. This is only filled
in if the flag GET_SIGNATURES
was set.
The names of any installed split APKs for this package.
The revision number of any split APKs for this package, as specified by
the <manifest> tag's
revisionCode
attribute. Indexes are a 1:1 mapping against splitNames
.
The version number of this package, as specified by the <manifest>
tag's versionCode
attribute.
The version name of this package, as specified by the <manifest>
tag's versionName
attribute.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
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.
Flatten this object in to a Parcel.
dest | The Parcel in which the object should be written. |
---|---|
parcelableFlags | Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|