public abstract class PackageManager extends Object
Context.getPackageManager().| Modifier and Type | Class and Description |
|---|---|
static class |
PackageManager.NameNotFoundException
This exception is thrown when a given package, application, or component
name cannot be found.
|
static interface |
PackageManager.OnPermissionsChangedListener
Listener for changes in permissions granted to a UID.
|
static interface |
PackageManager.PermissionResult |
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_CLEAN_EXTERNAL_STORAGE
Action to external storage service to clean out removed apps.
|
static String |
ACTION_REQUEST_PERMISSIONS
The action used to request that the user approve a permission request
from the application.
|
static int |
COMPONENT_ENABLED_STATE_DEFAULT
Flag for
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application is in its default enabled state (as specified
in its manifest). |
static int |
COMPONENT_ENABLED_STATE_DISABLED
Flag for
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application has been explicitly disabled, regardless of
what it has specified in its manifest. |
static int |
COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
Flag for
#setApplicationEnabledSetting(String, int, int) only: This
application should be considered, until the point where the user actually
wants to use it. |
static int |
COMPONENT_ENABLED_STATE_DISABLED_USER
Flag for
#setApplicationEnabledSetting(String, int, int) only: The
user has explicitly disabled the application, regardless of what it has
specified in its manifest. |
static int |
COMPONENT_ENABLED_STATE_ENABLED
Flag for
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application has been explictily enabled, regardless of
what it has specified in its manifest. |
static int |
DELETE_ALL_USERS
Flag parameter for
#deletePackage to indicate that you want the
package deleted for all users. |
static int |
DELETE_FAILED_ABORTED |
static int |
DELETE_FAILED_DEVICE_POLICY_MANAGER
Deletion failed return code: this is passed to the
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package because it is the active DevicePolicy
manager. |
static int |
DELETE_FAILED_INTERNAL_ERROR
Deletion failed return code: this is passed to the
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package for an unspecified reason. |
static int |
DELETE_FAILED_OWNER_BLOCKED
Deletion failed return code: this is passed to the
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package because a profile
or device owner has marked the package as uninstallable. |
static int |
DELETE_FAILED_USER_RESTRICTED
Deletion failed return code: this is passed to the
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package since the user is restricted. |
static int |
DELETE_KEEP_DATA
Flag parameter for
#deletePackage to indicate that you don't want to delete the
package's data directory. |
static int |
DELETE_SUCCEEDED
Return code for when package deletion succeeds.
|
static int |
DELETE_SYSTEM_APP
Flag parameter for
#deletePackage to indicate that, if you are calling
uninstall on a system that has been updated, then don't do the normal process
of uninstalling the update and rolling back to the older system version (which
needs to happen for all users); instead, just mark the app as uninstalled for
the current user. |
static int |
DONT_KILL_APP
Flag parameter for
#setComponentEnabledSetting(android.content.ComponentName, int, int) to indicate
that you don't want to kill the app containing the component. |
static String |
EXTRA_FAILURE_EXISTING_PACKAGE
String extra for
PackageInstallObserver in the 'extras' Bundle in case of
INSTALL_FAILED_DUPLICATE_PERMISSION. |
static String |
EXTRA_FAILURE_EXISTING_PERMISSION
String extra for
PackageInstallObserver in the 'extras' Bundle in case of
INSTALL_FAILED_DUPLICATE_PERMISSION. |
static String |
EXTRA_INTENT_FILTER_VERIFICATION_HOSTS
Extra field name for the host names to be used for an intent filter pending verification.
|
static String |
EXTRA_INTENT_FILTER_VERIFICATION_ID
Extra field name for the ID of a intent filter pending verification.
|
static String |
EXTRA_INTENT_FILTER_VERIFICATION_PACKAGE_NAME
Extra field name for the package name to be used for an intent filter pending verification.
|
static String |
EXTRA_INTENT_FILTER_VERIFICATION_URI_SCHEME
Extra field name for the scheme used for an intent filter pending verification.
|
static String |
EXTRA_MOVE_ID |
static String |
EXTRA_REQUEST_PERMISSIONS_NAMES
The names of the requested permissions.
|
static String |
EXTRA_REQUEST_PERMISSIONS_RESULTS
The results from the permissions request.
|
static String |
EXTRA_VERIFICATION_ID
Extra field name for the ID of a package pending verification.
|
static String |
EXTRA_VERIFICATION_INSTALL_FLAGS
Extra field name for the requested install flags for a package pending
verification.
|
static String |
EXTRA_VERIFICATION_INSTALLER_PACKAGE
Extra field name for the package identifier which is trying to install
the package.
|
static String |
EXTRA_VERIFICATION_INSTALLER_UID
Extra field name for the uid of who is requesting to install
the package.
|
static String |
EXTRA_VERIFICATION_PACKAGE_NAME
Extra field name for the package name of a package pending verification.
|
static String |
EXTRA_VERIFICATION_RESULT
Extra field name for the result of a verification, either
VERIFICATION_ALLOW, or VERIFICATION_REJECT. |
static String |
EXTRA_VERIFICATION_URI
Extra field name for the URI to a verification file.
|
static String |
EXTRA_VERIFICATION_VERSION_CODE
Extra field name for the version code of a package pending verification.
|
static String |
FEATURE_APP_WIDGETS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports app widgets. |
static String |
FEATURE_AUDIO_LOW_LATENCY
Feature for
#getSystemAvailableFeatures and #hasSystemFeature: The device's
audio pipeline is low-latency, more suitable for audio applications sensitive to delays or
lag in sound input or output. |
static String |
FEATURE_AUDIO_OUTPUT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes at least one form of audio
output, such as speakers, audio jack or streaming over bluetooth |
static String |
FEATURE_AUDIO_PRO
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device has professional audio level of functionality, performance, and acoustics. |
static String |
FEATURE_AUTOMOTIVE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: This is a device dedicated to showing UI
on a vehicle headunit. |
static String |
FEATURE_BACKUP
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device can perform backup and restore operations on installed applications. |
static String |
FEATURE_BLUETOOTH
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
other devices via Bluetooth. |
static String |
FEATURE_BLUETOOTH_LE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
other devices via Bluetooth Low Energy radio. |
static String |
FEATURE_CAMERA
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a camera facing away
from the screen. |
static String |
FEATURE_CAMERA_ANY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has at least one camera pointing in
some direction, or can support an external camera being connected to it. |
static String |
FEATURE_CAMERA_AUTOFOCUS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's camera supports auto-focus. |
static String |
FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING
Feature for
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
manual post-processing
capability level. |
static String |
FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR
Feature for
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
manual sensor
capability level. |
static String |
FEATURE_CAMERA_CAPABILITY_RAW
Feature for
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
RAW
capability level. |
static String |
FEATURE_CAMERA_EXTERNAL
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device can support having an external camera connected to it. |
static String |
FEATURE_CAMERA_FLASH
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's camera supports flash. |
static String |
FEATURE_CAMERA_FRONT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a front facing camera. |
static String |
FEATURE_CAMERA_LEVEL_FULL
Feature for
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
full hardware
capability level. |
static String |
FEATURE_CONNECTION_SERVICE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The Connection Service API is enabled on the device. |
static String |
FEATURE_CONSUMER_IR
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
consumer IR devices. |
static String |
FEATURE_DEVICE_ADMIN
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports device policy enforcement via device admins. |
static String |
FEATURE_ETHERNET
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: This device supports ethernet. |
static String |
FEATURE_FAKETOUCH
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events. |
static String |
FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events that supports distinct
tracking of two or more fingers. |
static String |
FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events that supports tracking
a hand of fingers (5 or more fingers) fully independently. |
static String |
FEATURE_FINGERPRINT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has biometric hardware to detect a fingerprint. |
static String |
FEATURE_GAMEPAD
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device has all of the inputs necessary to be considered a compatible game controller, or
includes a compatible game controller in the box. |
static String |
FEATURE_HDMI_CEC
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: This device supports HDMI-CEC. |
static String |
FEATURE_HIFI_SENSORS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports high fidelity sensor processing
capabilities. |
static String |
FEATURE_HOME_SCREEN
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports a home screen that is replaceable
by third party applications. |
static String |
FEATURE_INPUT_METHODS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports adding new input methods implemented
with the android.inputmethodservice.InputMethodService API. |
static String |
FEATURE_LEANBACK
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports leanback UI. |
static String |
FEATURE_LEANBACK_ONLY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports only leanback UI. |
static String |
FEATURE_LIVE_TV
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports live TV and can display
contents from TV inputs implemented with the
android.media.tv.TvInputService API. |
static String |
FEATURE_LIVE_WALLPAPER
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports live wallpapers. |
static String |
FEATURE_LOCATION
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports one or more methods of
reporting current location. |
static String |
FEATURE_LOCATION_GPS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a Global Positioning System
receiver and can report precise location. |
static String |
FEATURE_LOCATION_NETWORK
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device can report location with coarse
accuracy using a network-based geolocation system. |
static String |
FEATURE_MANAGED_PROFILES |
static String |
FEATURE_MANAGED_USERS
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports creating secondary users and managed profiles via
DevicePolicyManager. |
static String |
FEATURE_MICROPHONE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device can record audio via a
microphone. |
static String |
FEATURE_MIDI
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device has a full implementation of the android.media.midi.* APIs. |
static String |
FEATURE_NFC
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device can communicate using Near-Field
Communications (NFC). |
static String |
FEATURE_NFC_HCE
Deprecated.
|
static String |
FEATURE_NFC_HOST_CARD_EMULATION
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports host-
based NFC card emulation. |
static String |
FEATURE_OPENGLES_EXTENSION_PACK
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports the OpenGL ES
Android Extension Pack. |
static String |
FEATURE_PRINTING
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports printing. |
static String |
FEATURE_SCREEN_LANDSCAPE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports landscape orientation
screens. |
static String |
FEATURE_SCREEN_PORTRAIT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports portrait orientation
screens. |
static String |
FEATURE_SECURELY_REMOVES_USERS
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports secure removal of users. |
static String |
FEATURE_SENSOR_ACCELEROMETER
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes an accelerometer. |
static String |
FEATURE_SENSOR_AMBIENT_TEMPERATURE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes an ambient temperature sensor. |
static String |
FEATURE_SENSOR_BAROMETER
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a barometer (air
pressure sensor.) |
static String |
FEATURE_SENSOR_COMPASS
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a magnetometer (compass). |
static String |
FEATURE_SENSOR_GYROSCOPE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a gyroscope. |
static String |
FEATURE_SENSOR_HEART_RATE
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a heart rate monitor. |
static String |
FEATURE_SENSOR_HEART_RATE_ECG
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The heart rate sensor on this device is an Electrocargiogram. |
static String |
FEATURE_SENSOR_LIGHT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a light sensor. |
static String |
FEATURE_SENSOR_PROXIMITY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a proximity sensor. |
static String |
FEATURE_SENSOR_RELATIVE_HUMIDITY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a relative humidity sensor. |
static String |
FEATURE_SENSOR_STEP_COUNTER
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a hardware step counter. |
static String |
FEATURE_SENSOR_STEP_DETECTOR
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a hardware step detector. |
static String |
FEATURE_SIP
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The SIP API is enabled on the device. |
static String |
FEATURE_SIP_VOIP
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports SIP-based VOIP. |
static String |
FEATURE_TELEPHONY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a telephony radio with data
communication support. |
static String |
FEATURE_TELEPHONY_CDMA
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a CDMA telephony stack. |
static String |
FEATURE_TELEPHONY_GSM
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a GSM telephony stack. |
static String |
FEATURE_TELEVISION
Deprecated.
use
FEATURE_LEANBACK instead. |
static String |
FEATURE_TOUCHSCREEN
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's display has a touch screen. |
static String |
FEATURE_TOUCHSCREEN_MULTITOUCH
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen supports
multitouch sufficient for basic two-finger gesture detection. |
static String |
FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen is capable of
tracking two or more fingers fully independently. |
static String |
FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen is capable of
tracking a full hand of fingers fully independently -- that is, 5 or
more simultaneous independent pointers. |
static String |
FEATURE_USB_ACCESSORY
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports connecting to USB accessories. |
static String |
FEATURE_USB_HOST
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports connecting to USB devices
as the USB host. |
static String |
FEATURE_VERIFIED_BOOT
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports verified boot. |
static String |
FEATURE_VOICE_RECOGNIZERS |
static String |
FEATURE_WATCH
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: This is a device dedicated to showing UI
on a watch. |
static String |
FEATURE_WEBVIEW
Feature for
#getSystemAvailableFeatures and #hasSystemFeature:
The device has a full implementation of the android.webkit.* APIs. |
static String |
FEATURE_WIFI
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports WiFi (802.11) networking. |
static String |
FEATURE_WIFI_DIRECT
Feature for
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports Wi-Fi Direct networking. |
static int |
FLAG_PERMISSION_GRANTED_BY_DEFAULT
Permission flag: The permission is granted by default because it
enables app functionality that is expected to work out-of-the-box
for providing a smooth user experience.
|
static int |
FLAG_PERMISSION_POLICY_FIXED
Permission flag: The permission is set in its current state
by device policy and neither apps nor the user can change
its state.
|
static int |
FLAG_PERMISSION_REVOKE_ON_UPGRADE
Permission flag: The permission is set in a granted state but
access to resources it guards is restricted by other means to
enable revoking a permission on legacy apps that do not support
runtime permissions.
|
static int |
FLAG_PERMISSION_SYSTEM_FIXED
Permission flag: The permission is set in its current state
because the app is a component that is a part of the system.
|
static int |
FLAG_PERMISSION_USER_FIXED
Permission flag: The permission is set in its current state
by the user and it is fixed, i.e.
|
static int |
FLAG_PERMISSION_USER_SET
Permission flag: The permission is set in its current state
by the user and apps can still request it at runtime.
|
static int |
GET_ACTIVITIES
PackageInfo flag: return information about
activities in the package in PackageInfo#activities. |
static int |
GET_CONFIGURATIONS
PackageInfo flag: return information about
hardware preferences in
PackageInfo.configPreferences,
and requested features in PackageInfo#reqFeatures and
PackageInfo#featureGroups. |
static int |
GET_DISABLED_COMPONENTS
PackageInfo flag: include disabled components in the returned info. |
static int |
GET_DISABLED_UNTIL_USED_COMPONENTS
PackageInfo flag: include disabled components which are in
that state only because of COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
in the returned info. |
static int |
GET_GIDS
PackageInfo flag: return the
group ids that are associated with an
application. |
static int |
GET_INSTRUMENTATION
PackageInfo flag: return information about
instrumentation in the package in
PackageInfo#instrumentation. |
static int |
GET_INTENT_FILTERS
PackageInfo flag: return information about the
intent filters supported by the activity. |
static int |
GET_META_DATA
ComponentInfo flag: return the ComponentInfo#metaData
data Bundles that are associated with a component. |
static int |
GET_PERMISSIONS
PackageInfo flag: return information about
permissions in the package in
PackageInfo#permissions. |
static int |
GET_PROVIDERS
PackageInfo flag: return information about
content providers in the package in
PackageInfo#providers. |
static int |
GET_RECEIVERS
PackageInfo flag: return information about
intent receivers in the package in
PackageInfo#receivers. |
static int |
GET_RESOLVED_FILTER
ResolveInfo flag: return the IntentFilter that
was matched for a particular ResolveInfo in
ResolveInfo#filter. |
static int |
GET_SERVICES
PackageInfo flag: return information about
services in the package in PackageInfo#services. |
static int |
GET_SHARED_LIBRARY_FILES
ApplicationInfo flag: return the
paths to the shared libraries
that are associated with an application. |
static int |
GET_SIGNATURES
PackageInfo flag: return information about the
signatures included in the package. |
static int |
GET_UNINSTALLED_PACKAGES
Flag parameter to retrieve some information about all applications (even
uninstalled ones) which have data directories.
|
static int |
GET_URI_PERMISSION_PATTERNS
ProviderInfo flag: return the
URI permission patterns
that are associated with a content provider. |
static int |
INSTALL_ALL_USERS
Flag parameter for
#installPackage to indicate that this install
should immediately be visible to all users. |
static int |
INSTALL_ALLOW_DOWNGRADE
Flag parameter for
#installPackage to indicate that it is okay
to install an update to an app where the newly installed app has a lower
version code than the currently installed app. |
static int |
INSTALL_ALLOW_TEST
Flag parameter for
#installPackage to indicate that you want to
allow test packages (those that have set android:testOnly in their
manifest) to be installed. |
static int |
INSTALL_EXTERNAL
Flag parameter for
#installPackage to indicate that this package
must be installed to an ASEC on a VolumeInfo#TYPE_PUBLIC. |
static int |
INSTALL_FAILED_ABORTED |
static int |
INSTALL_FAILED_ALREADY_EXISTS
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package is
already installed. |
static int |
INSTALL_FAILED_CONFLICTING_PROVIDER
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because it contains a content provider with the
same authority as a provider already installed in the system. |
static int |
INSTALL_FAILED_CONTAINER_ERROR
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
a secure container mount point couldn't be accessed on external media. |
static int |
INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the package being installed contains native code, but none that is
compatible with the device's CPU_ABI. |
static int |
INSTALL_FAILED_DEXOPT
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed while optimizing and validating its dex files,
either because there was not enough storage or the validation failed. |
static int |
INSTALL_FAILED_DUPLICATE_PACKAGE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if a
package is already installed with the same name. |
static int |
INSTALL_FAILED_DUPLICATE_PERMISSION
Installation failed return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because it is attempting to define a
permission that is already defined by some existing package. |
static int |
INSTALL_FAILED_INSUFFICIENT_STORAGE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package manager
service found that the device didn't have enough storage space to install the app. |
static int |
INSTALL_FAILED_INTERNAL_ERROR
Installation failed return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because of system issues. |
static int |
INSTALL_FAILED_INVALID_APK
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package archive
file is invalid. |
static int |
INSTALL_FAILED_INVALID_INSTALL_LOCATION
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed in the specified install
location. |
static int |
INSTALL_FAILED_INVALID_URI
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the URI passed in
is invalid. |
static int |
INSTALL_FAILED_MEDIA_UNAVAILABLE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed in the specified install
location because the media is not available. |
static int |
INSTALL_FAILED_MISSING_FEATURE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a feature that is not available. |
static int |
INSTALL_FAILED_MISSING_SHARED_LIBRARY
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a shared library that is not available. |
static int |
INSTALL_FAILED_NEWER_SDK
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because the current SDK version is newer than
that required by the package. |
static int |
INSTALL_FAILED_NO_MATCHING_ABIS
Installation failed return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because its packaged native code did not
match any of the ABIs supported by the system. |
static int |
INSTALL_FAILED_NO_SHARED_USER
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the requested shared user does not exist. |
static int |
INSTALL_FAILED_OLDER_SDK
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because the current SDK version is older than
that required by the package. |
static int |
INSTALL_FAILED_PACKAGE_CHANGED
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the package changed from what the calling program expected. |
static int |
INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the old package has target SDK high enough to support runtime permission and
the new package has target SDK low enough to not support runtime permissions. |
static int |
INSTALL_FAILED_REPLACE_COULDNT_DELETE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a shared library that is not available. |
static int |
INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package is requested a shared user which is already installed on the
device and does not have matching signature. |
static int |
INSTALL_FAILED_TEST_ONLY
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because it has specified that it is a test-only
package and the caller has not supplied the INSTALL_ALLOW_TEST
flag. |
static int |
INSTALL_FAILED_UID_CHANGED
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package is assigned a different UID than it previously held. |
static int |
INSTALL_FAILED_UPDATE_INCOMPATIBLE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
a previously installed package of the same name has a different signature
than the new package (and the old package's data was not removed). |
static int |
INSTALL_FAILED_USER_RESTRICTED
Installation failed return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because the user is restricted from installing
apps. |
static int |
INSTALL_FAILED_VERIFICATION_FAILURE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed because the verification did not succeed. |
static int |
INSTALL_FAILED_VERIFICATION_TIMEOUT
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed because the verification timed out. |
static int |
INSTALL_FAILED_VERSION_DOWNGRADE
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package has an older version code than the currently installed package. |
static int |
INSTALL_FORCE_VOLUME_UUID |
static int |
INSTALL_FORWARD_LOCK
Flag parameter for
#installPackage(android.net.Uri, IPackageInstallObserver, int) to
indicate that this package should be installed as forward locked, i.e. |
static int |
INSTALL_FROM_ADB
Flag parameter for
#installPackage to indicate that this install
was initiated via ADB. |
static int |
INSTALL_GRANT_RUNTIME_PERMISSIONS
Flag parameter for
#installPackage to indicate that all runtime
permissions should be granted to the package. |
static int |
INSTALL_INTERNAL
Flag parameter for
#installPackage to indicate that this package
must be installed to internal storage. |
static int |
INSTALL_PARSE_FAILED_BAD_MANIFEST
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser was unable to retrieve the AndroidManifest.xml file. |
static int |
INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a bad or missing package name in the manifest. |
static int |
INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a bad shared user id name in the manifest. |
static int |
INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a CertificateEncodingException in one of the
files in the .apk. |
static int |
INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser found inconsistent certificates on the files in the .apk. |
static int |
INSTALL_PARSE_FAILED_MANIFEST_EMPTY
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser did not find any actionable tags (instrumentation or application)
in the manifest. |
static int |
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered some structural problem in the manifest. |
static int |
INSTALL_PARSE_FAILED_NO_CERTIFICATES
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser did not find any certificates in the .apk. |
static int |
INSTALL_PARSE_FAILED_NOT_APK
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser was given a path that is not a file, or does not end with the expected
'.apk' extension. |
static int |
INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
Installation parse return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered an unexpected exception. |
static int |
INSTALL_REPLACE_EXISTING
Flag parameter for
#installPackage to indicate that you want to replace an already
installed package, if one exists. |
static int |
INSTALL_SUCCEEDED
Installation return code: this is passed to the
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) on success. |
static int |
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS
Used as the
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User will never be prompted the Intent Disambiguation Dialog if there
are two or more resolution of the Intent. |
static int |
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK
Used as the
status argument for PackageManager#updateIntentVerificationStatus
to indicate that this app should always be considered as an ambiguous candidate for
handling the matching Intent even if there are other candidate apps in the "always"
state. |
static int |
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK
Used as the
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User will always be prompted the Intent Disambiguation Dialog if there
are two or more Intent resolved for the IntentFilter's domain(s). |
static int |
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER
Used as the
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User may be prompted the Intent Disambiguation Dialog if there
are two or more Intent resolved. |
static int |
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED
Internal status code to indicate that an IntentFilter verification result is not specified.
|
static int |
INTENT_FILTER_VERIFICATION_FAILURE
Used as the
verificationCode argument for
PackageManager#verifyIntentFilter to indicate that the calling
IntentFilter Verifier confirms that the IntentFilter is NOT verified. |
static int |
INTENT_FILTER_VERIFICATION_SUCCESS
Used as the
verificationCode argument for
PackageManager#verifyIntentFilter to indicate that the calling
IntentFilter Verifier confirms that the IntentFilter is verified. |
static int |
MASK_PERMISSION_FLAGS
Mask for all permission flags.
|
static int |
MATCH_ALL
Querying flag: if set and if the platform is doing any filtering of the results, then
the filtering will not happen.
|
static int |
MATCH_DEFAULT_ONLY
Resolution and querying flag: if set, only filters that support the
android.content.Intent#CATEGORY_DEFAULT will be considered for
matching. |
static long |
MAXIMUM_VERIFICATION_TIMEOUT
Can be used as the
millisecondsToDelay argument for
PackageManager#extendVerificationTimeout. |
static int |
MOVE_EXTERNAL_MEDIA
Deprecated.
|
static int |
MOVE_FAILED_DOESNT_EXIST
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package doesn't exist. |
static int |
MOVE_FAILED_FORWARD_LOCKED
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved since its forward locked. |
static int |
MOVE_FAILED_INSUFFICIENT_STORAGE
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
when the package hasn't been successfully moved by the system
because of insufficient memory on specified media. |
static int |
MOVE_FAILED_INTERNAL_ERROR
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved to the specified location. |
static int |
MOVE_FAILED_INVALID_LOCATION
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved to the specified location. |
static int |
MOVE_FAILED_OPERATION_PENDING
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver) if the
specified package already has an operation pending in the
PackageHandler queue. |
static int |
MOVE_FAILED_SYSTEM_PACKAGE
Error code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved since its a system package. |
static int |
MOVE_INTERNAL
Deprecated.
|
static int |
MOVE_SUCCEEDED
Return code that is passed to the
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver) when the
package has been successfully moved by the system. |
static int |
NO_NATIVE_LIBRARIES
Internal return code for NativeLibraryHelper methods to indicate that the package
being processed did not contain any native code.
|
static int |
PERMISSION_DENIED
Permission check result: this is returned by
#checkPermission
if the permission has not been granted to the given package. |
static int |
PERMISSION_GRANTED
Permission check result: this is returned by
#checkPermission
if the permission has been granted to the given package. |
static int |
SIGNATURE_FIRST_NOT_SIGNED
Signature check result: this is returned by
#checkSignatures
if the first package is not signed but the second is. |
static int |
SIGNATURE_MATCH
Signature check result: this is returned by
#checkSignatures
if all signatures on the two packages match. |
static int |
SIGNATURE_NEITHER_SIGNED
Signature check result: this is returned by
#checkSignatures
if neither of the two packages is signed. |
static int |
SIGNATURE_NO_MATCH
Signature check result: this is returned by
#checkSignatures
if not all signatures on both packages match. |
static int |
SIGNATURE_SECOND_NOT_SIGNED
Signature check result: this is returned by
#checkSignatures
if the second package is not signed but the first is. |
static int |
SIGNATURE_UNKNOWN_PACKAGE
Signature check result: this is returned by
#checkSignatures
if either of the packages are not valid. |
static int |
SKIP_CURRENT_PROFILE
Flag for
addCrossProfileIntentFilter: if this flag is set:
when resolving an intent that matches the CrossProfileIntentFilter, the current
profile will be skipped. |
static int |
VERIFICATION_ALLOW
Used as the
verificationCode argument for
PackageManager#verifyPendingInstall to indicate that the calling
package verifier allows the installation to proceed. |
static int |
VERIFICATION_ALLOW_WITHOUT_SUFFICIENT
Usable by the required verifier as the
verificationCode argument
for PackageManager#verifyPendingInstall to indicate that it will
allow the installation to proceed without any of the optional verifiers
needing to vote. |
static int |
VERIFICATION_REJECT
Used as the
verificationCode argument for
PackageManager#verifyPendingInstall to indicate the calling
package verifier does not vote to allow the installation to proceed. |
| Constructor and Description |
|---|
PackageManager() |
| Modifier and Type | Method and Description |
|---|---|
abstract PackageInfo |
getPackageInfo(String packageName,
int flags)
Retrieve overall information about an application package that is
installed on the system.
|
public static final int GET_ACTIVITIES
PackageInfo flag: return information about
activities in the package in PackageInfo#activities.public static final int GET_RECEIVERS
PackageInfo flag: return information about
intent receivers in the package in
PackageInfo#receivers.public static final int GET_SERVICES
PackageInfo flag: return information about
services in the package in PackageInfo#services.public static final int GET_PROVIDERS
PackageInfo flag: return information about
content providers in the package in
PackageInfo#providers.public static final int GET_INSTRUMENTATION
PackageInfo flag: return information about
instrumentation in the package in
PackageInfo#instrumentation.public static final int GET_INTENT_FILTERS
PackageInfo flag: return information about the
intent filters supported by the activity.public static final int GET_SIGNATURES
PackageInfo flag: return information about the
signatures included in the package.public static final int GET_RESOLVED_FILTER
ResolveInfo flag: return the IntentFilter that
was matched for a particular ResolveInfo in
ResolveInfo#filter.public static final int GET_META_DATA
ComponentInfo flag: return the ComponentInfo#metaData
data Bundles that are associated with a component.
This applies for any API returning a ComponentInfo subclass.public static final int GET_GIDS
PackageInfo flag: return the
group ids that are associated with an
application.
This applies for any API returning a PackageInfo class, either
directly or nested inside of another.public static final int GET_DISABLED_COMPONENTS
PackageInfo flag: include disabled components in the returned info.public static final int GET_SHARED_LIBRARY_FILES
ApplicationInfo flag: return the
paths to the shared libraries
that are associated with an application.
This applies for any API returning an ApplicationInfo class, either
directly or nested inside of another.public static final int GET_URI_PERMISSION_PATTERNS
ProviderInfo flag: return the
URI permission patterns
that are associated with a content provider.
This applies for any API returning a ProviderInfo class, either
directly or nested inside of another.public static final int GET_PERMISSIONS
PackageInfo flag: return information about
permissions in the package in
PackageInfo#permissions.public static final int GET_UNINSTALLED_PACKAGES
DONT_DELETE_DATA with a possibility of being replaced or
reinstalled in future.
Note: this flag may cause less information about currently installed applications to be returned.
public static final int GET_CONFIGURATIONS
PackageInfo flag: return information about
hardware preferences in
PackageInfo.configPreferences,
and requested features in PackageInfo#reqFeatures and
PackageInfo#featureGroups.public static final int GET_DISABLED_UNTIL_USED_COMPONENTS
PackageInfo flag: include disabled components which are in
that state only because of COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
in the returned info. Note that if you set this flag, applications
that are in this disabled state will be reported as enabled.public static final int MATCH_DEFAULT_ONLY
android.content.Intent#CATEGORY_DEFAULT will be considered for
matching. This is a synonym for including the CATEGORY_DEFAULT in your
supplied Intent.public static final int MATCH_ALL
public static final int SKIP_CURRENT_PROFILE
addCrossProfileIntentFilter: if this flag is set:
when resolving an intent that matches the CrossProfileIntentFilter, the current
profile will be skipped.
Only activities in the target user can respond to the intent.public static final int PERMISSION_GRANTED
#checkPermission
if the permission has been granted to the given package.public static final int PERMISSION_DENIED
#checkPermission
if the permission has not been granted to the given package.public static final int SIGNATURE_MATCH
#checkSignatures
if all signatures on the two packages match.public static final int SIGNATURE_NEITHER_SIGNED
#checkSignatures
if neither of the two packages is signed.public static final int SIGNATURE_FIRST_NOT_SIGNED
#checkSignatures
if the first package is not signed but the second is.public static final int SIGNATURE_SECOND_NOT_SIGNED
#checkSignatures
if the second package is not signed but the first is.public static final int SIGNATURE_NO_MATCH
#checkSignatures
if not all signatures on both packages match.public static final int SIGNATURE_UNKNOWN_PACKAGE
#checkSignatures
if either of the packages are not valid.public static final int COMPONENT_ENABLED_STATE_DEFAULT
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application is in its default enabled state (as specified
in its manifest).public static final int COMPONENT_ENABLED_STATE_ENABLED
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application has been explictily enabled, regardless of
what it has specified in its manifest.public static final int COMPONENT_ENABLED_STATE_DISABLED
#setApplicationEnabledSetting(String, int, int)
and #setComponentEnabledSetting(ComponentName, int, int): This
component or application has been explicitly disabled, regardless of
what it has specified in its manifest.public static final int COMPONENT_ENABLED_STATE_DISABLED_USER
#setApplicationEnabledSetting(String, int, int) only: The
user has explicitly disabled the application, regardless of what it has
specified in its manifest. Because this is due to the user's request,
they may re-enable it if desired through the appropriate system UI. This
option currently cannot be used with
#setComponentEnabledSetting(ComponentName, int, int).public static final int COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
#setApplicationEnabledSetting(String, int, int) only: This
application should be considered, until the point where the user actually
wants to use it. This means that it will not normally show up to the user
(such as in the launcher), but various parts of the user interface can
use GET_DISABLED_UNTIL_USED_COMPONENTS to still see it and allow
the user to select it (as for example an IME, device admin, etc). Such code,
once the user has selected the app, should at that point also make it enabled.
This option currently can not be used with
#setComponentEnabledSetting(ComponentName, int, int).public static final int INSTALL_FORWARD_LOCK
#installPackage(android.net.Uri, IPackageInstallObserver, int) to
indicate that this package should be installed as forward locked, i.e. only the app itself
should have access to its code and non-resource assets.public static final int INSTALL_REPLACE_EXISTING
#installPackage to indicate that you want to replace an already
installed package, if one exists.public static final int INSTALL_ALLOW_TEST
#installPackage to indicate that you want to
allow test packages (those that have set android:testOnly in their
manifest) to be installed.public static final int INSTALL_EXTERNAL
#installPackage to indicate that this package
must be installed to an ASEC on a VolumeInfo#TYPE_PUBLIC.public static final int INSTALL_INTERNAL
#installPackage to indicate that this package
must be installed to internal storage.public static final int INSTALL_FROM_ADB
#installPackage to indicate that this install
was initiated via ADB.public static final int INSTALL_ALL_USERS
#installPackage to indicate that this install
should immediately be visible to all users.public static final int INSTALL_ALLOW_DOWNGRADE
#installPackage to indicate that it is okay
to install an update to an app where the newly installed app has a lower
version code than the currently installed app.public static final int INSTALL_GRANT_RUNTIME_PERMISSIONS
#installPackage to indicate that all runtime
permissions should be granted to the package. If INSTALL_ALL_USERS
is set the runtime permissions will be granted to all users, otherwise
only to the owner.public static final int INSTALL_FORCE_VOLUME_UUID
public static final int DONT_KILL_APP
#setComponentEnabledSetting(android.content.ComponentName, int, int) to indicate
that you don't want to kill the app containing the component. Be careful when you set this
since changing component states can make the containing application's behavior unpredictable.public static final int INSTALL_SUCCEEDED
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) on success.public static final int INSTALL_FAILED_ALREADY_EXISTS
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package is
already installed.public static final int INSTALL_FAILED_INVALID_APK
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package archive
file is invalid.public static final int INSTALL_FAILED_INVALID_URI
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the URI passed in
is invalid.public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if the package manager
service found that the device didn't have enough storage space to install the app.public static final int INSTALL_FAILED_DUPLICATE_PACKAGE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if a
package is already installed with the same name.public static final int INSTALL_FAILED_NO_SHARED_USER
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the requested shared user does not exist.public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
a previously installed package of the same name has a different signature
than the new package (and the old package's data was not removed).public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package is requested a shared user which is already installed on the
device and does not have matching signature.public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a shared library that is not available.public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a shared library that is not available.public static final int INSTALL_FAILED_DEXOPT
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed while optimizing and validating its dex files,
either because there was not enough storage or the validation failed.public static final int INSTALL_FAILED_OLDER_SDK
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because the current SDK version is older than
that required by the package.public static final int INSTALL_FAILED_CONFLICTING_PROVIDER
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because it contains a content provider with the
same authority as a provider already installed in the system.public static final int INSTALL_FAILED_NEWER_SDK
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because the current SDK version is newer than
that required by the package.public static final int INSTALL_FAILED_TEST_ONLY
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package failed because it has specified that it is a test-only
package and the caller has not supplied the INSTALL_ALLOW_TEST
flag.public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the package being installed contains native code, but none that is
compatible with the device's CPU_ABI.public static final int INSTALL_FAILED_MISSING_FEATURE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package uses a feature that is not available.public static final int INSTALL_FAILED_CONTAINER_ERROR
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
a secure container mount point couldn't be accessed on external media.public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed in the specified install
location.public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed in the specified install
location because the media is not available.public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed because the verification timed out.public static final int INSTALL_FAILED_VERIFICATION_FAILURE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package couldn't be installed because the verification did not succeed.public static final int INSTALL_FAILED_PACKAGE_CHANGED
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the package changed from what the calling program expected.public static final int INSTALL_FAILED_UID_CHANGED
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package is assigned a different UID than it previously held.public static final int INSTALL_FAILED_VERSION_DOWNGRADE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the new package has an older version code than the currently installed package.public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int) if
the old package has target SDK high enough to support runtime permission and
the new package has target SDK low enough to not support runtime permissions.public static final int INSTALL_PARSE_FAILED_NOT_APK
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser was given a path that is not a file, or does not end with the expected
'.apk' extension.public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser was unable to retrieve the AndroidManifest.xml file.public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered an unexpected exception.public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser did not find any certificates in the .apk.public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser found inconsistent certificates on the files in the .apk.public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a CertificateEncodingException in one of the
files in the .apk.public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a bad or missing package name in the manifest.public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered a bad shared user id name in the manifest.public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser encountered some structural problem in the manifest.public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the parser did not find any actionable tags (instrumentation or application)
in the manifest.public static final int INSTALL_FAILED_INTERNAL_ERROR
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because of system issues.public static final int INSTALL_FAILED_USER_RESTRICTED
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because the user is restricted from installing
apps.public static final int INSTALL_FAILED_DUPLICATE_PERMISSION
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because it is attempting to define a
permission that is already defined by some existing package.
The package name of the app which has already defined the permission is passed to
a PackageInstallObserver, if any, as the #EXTRA_EXISTING_PACKAGE
string extra; and the name of the permission being redefined is passed in the
#EXTRA_EXISTING_PERMISSION string extra.
public static final int INSTALL_FAILED_NO_MATCHING_ABIS
IPackageInstallObserver by
#installPackage(android.net.Uri, IPackageInstallObserver, int)
if the system failed to install the package because its packaged native code did not
match any of the ABIs supported by the system.public static final int NO_NATIVE_LIBRARIES
public static final int INSTALL_FAILED_ABORTED
public static final int DELETE_KEEP_DATA
#deletePackage to indicate that you don't want to delete the
package's data directory.public static final int DELETE_ALL_USERS
#deletePackage to indicate that you want the
package deleted for all users.public static final int DELETE_SYSTEM_APP
#deletePackage to indicate that, if you are calling
uninstall on a system that has been updated, then don't do the normal process
of uninstalling the update and rolling back to the older system version (which
needs to happen for all users); instead, just mark the app as uninstalled for
the current user.public static final int DELETE_SUCCEEDED
IPackageDeleteObserver by #deletePackage() if the system
succeeded in deleting the package.public static final int DELETE_FAILED_INTERNAL_ERROR
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package for an unspecified reason.public static final int DELETE_FAILED_DEVICE_POLICY_MANAGER
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package because it is the active DevicePolicy
manager.public static final int DELETE_FAILED_USER_RESTRICTED
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package since the user is restricted.public static final int DELETE_FAILED_OWNER_BLOCKED
IPackageDeleteObserver by #deletePackage() if the system
failed to delete the package because a profile
or device owner has marked the package as uninstallable.public static final int DELETE_FAILED_ABORTED
public static final int MOVE_SUCCEEDED
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver) when the
package has been successfully moved by the system.public static final int MOVE_FAILED_INSUFFICIENT_STORAGE
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
when the package hasn't been successfully moved by the system
because of insufficient memory on specified media.public static final int MOVE_FAILED_DOESNT_EXIST
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package doesn't exist.public static final int MOVE_FAILED_SYSTEM_PACKAGE
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved since its a system package.public static final int MOVE_FAILED_FORWARD_LOCKED
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved since its forward locked.public static final int MOVE_FAILED_INVALID_LOCATION
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved to the specified location.public static final int MOVE_FAILED_INTERNAL_ERROR
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver)
if the specified package cannot be moved to the specified location.public static final int MOVE_FAILED_OPERATION_PENDING
IPackageMoveObserver by
#movePackage(android.net.Uri, IPackageMoveObserver) if the
specified package already has an operation pending in the
PackageHandler queue.@Deprecated public static final int MOVE_INTERNAL
#movePackage to indicate that
the package should be moved to internal storage if its
been installed on external media.@Deprecated public static final int MOVE_EXTERNAL_MEDIA
#movePackage to indicate that
the package should be moved to external media.public static final String EXTRA_MOVE_ID
public static final int VERIFICATION_ALLOW_WITHOUT_SUFFICIENT
verificationCode argument
for PackageManager#verifyPendingInstall to indicate that it will
allow the installation to proceed without any of the optional verifiers
needing to vote.public static final int VERIFICATION_ALLOW
verificationCode argument for
PackageManager#verifyPendingInstall to indicate that the calling
package verifier allows the installation to proceed.public static final int VERIFICATION_REJECT
verificationCode argument for
PackageManager#verifyPendingInstall to indicate the calling
package verifier does not vote to allow the installation to proceed.public static final int INTENT_FILTER_VERIFICATION_SUCCESS
verificationCode argument for
PackageManager#verifyIntentFilter to indicate that the calling
IntentFilter Verifier confirms that the IntentFilter is verified.public static final int INTENT_FILTER_VERIFICATION_FAILURE
verificationCode argument for
PackageManager#verifyIntentFilter to indicate that the calling
IntentFilter Verifier confirms that the IntentFilter is NOT verified.public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED
public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User will always be prompted the Intent Disambiguation Dialog if there
are two or more Intent resolved for the IntentFilter's domain(s).public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User will never be prompted the Intent Disambiguation Dialog if there
are two or more resolution of the Intent. The default App for the domain(s) specified in the
IntentFilter will also ALWAYS be used.public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER
status argument for PackageManager#updateIntentVerificationStatus
to indicate that the User may be prompted the Intent Disambiguation Dialog if there
are two or more Intent resolved. The default App for the domain(s) specified in the
IntentFilter will also NEVER be presented to the User.public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK
status argument for PackageManager#updateIntentVerificationStatus
to indicate that this app should always be considered as an ambiguous candidate for
handling the matching Intent even if there are other candidate apps in the "always"
state. Put another way: if there are any 'always ask' apps in a set of more than
one candidate app, then a disambiguation is *always* presented even if there is
another candidate app with the 'always' state.public static final long MAXIMUM_VERIFICATION_TIMEOUT
millisecondsToDelay argument for
PackageManager#extendVerificationTimeout. This is the
maximum time PackageManager waits for the verification
agent to return (in milliseconds).public static final String FEATURE_AUDIO_LOW_LATENCY
#getSystemAvailableFeatures and #hasSystemFeature: The device's
audio pipeline is low-latency, more suitable for audio applications sensitive to delays or
lag in sound input or output.public static final String FEATURE_AUDIO_OUTPUT
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes at least one form of audio
output, such as speakers, audio jack or streaming over bluetoothpublic static final String FEATURE_AUDIO_PRO
#getSystemAvailableFeatures and #hasSystemFeature:
The device has professional audio level of functionality, performance, and acoustics.public static final String FEATURE_BLUETOOTH
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
other devices via Bluetooth.public static final String FEATURE_BLUETOOTH_LE
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
other devices via Bluetooth Low Energy radio.public static final String FEATURE_CAMERA
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a camera facing away
from the screen.public static final String FEATURE_CAMERA_AUTOFOCUS
#getSystemAvailableFeatures and
#hasSystemFeature: The device's camera supports auto-focus.public static final String FEATURE_CAMERA_ANY
#getSystemAvailableFeatures and
#hasSystemFeature: The device has at least one camera pointing in
some direction, or can support an external camera being connected to it.public static final String FEATURE_CAMERA_EXTERNAL
#getSystemAvailableFeatures and
#hasSystemFeature: The device can support having an external camera connected to it.
The external camera may not always be connected or available to applications to use.public static final String FEATURE_CAMERA_FLASH
#getSystemAvailableFeatures and
#hasSystemFeature: The device's camera supports flash.public static final String FEATURE_CAMERA_FRONT
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a front facing camera.public static final String FEATURE_CAMERA_LEVEL_FULL
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
full hardware
capability level.public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
manual sensor
capability level.public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
manual post-processing
capability level.public static final String FEATURE_CAMERA_CAPABILITY_RAW
#getSystemAvailableFeatures and #hasSystemFeature: At least one
of the cameras on the device supports the
RAW
capability level.public static final String FEATURE_CONSUMER_IR
#getSystemAvailableFeatures and
#hasSystemFeature: The device is capable of communicating with
consumer IR devices.public static final String FEATURE_LOCATION
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports one or more methods of
reporting current location.public static final String FEATURE_LOCATION_GPS
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a Global Positioning System
receiver and can report precise location.public static final String FEATURE_LOCATION_NETWORK
#getSystemAvailableFeatures and
#hasSystemFeature: The device can report location with coarse
accuracy using a network-based geolocation system.public static final String FEATURE_MICROPHONE
#getSystemAvailableFeatures and
#hasSystemFeature: The device can record audio via a
microphone.public static final String FEATURE_NFC
#getSystemAvailableFeatures and
#hasSystemFeature: The device can communicate using Near-Field
Communications (NFC).@Deprecated public static final String FEATURE_NFC_HCE
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports host-
based NFC card emulation.
TODO remove when depending apps have moved to new constant.public static final String FEATURE_NFC_HOST_CARD_EMULATION
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports host-
based NFC card emulation.public static final String FEATURE_OPENGLES_EXTENSION_PACK
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports the OpenGL ES
Android Extension Pack.public static final String FEATURE_SENSOR_ACCELEROMETER
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes an accelerometer.public static final String FEATURE_SENSOR_BAROMETER
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a barometer (air
pressure sensor.)public static final String FEATURE_SENSOR_COMPASS
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a magnetometer (compass).public static final String FEATURE_SENSOR_GYROSCOPE
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a gyroscope.public static final String FEATURE_SENSOR_LIGHT
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a light sensor.public static final String FEATURE_SENSOR_PROXIMITY
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a proximity sensor.public static final String FEATURE_SENSOR_STEP_COUNTER
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a hardware step counter.public static final String FEATURE_SENSOR_STEP_DETECTOR
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a hardware step detector.public static final String FEATURE_SENSOR_HEART_RATE
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a heart rate monitor.public static final String FEATURE_SENSOR_HEART_RATE_ECG
#getSystemAvailableFeatures and
#hasSystemFeature: The heart rate sensor on this device is an Electrocargiogram.public static final String FEATURE_SENSOR_RELATIVE_HUMIDITY
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes a relative humidity sensor.public static final String FEATURE_SENSOR_AMBIENT_TEMPERATURE
#getSystemAvailableFeatures and
#hasSystemFeature: The device includes an ambient temperature sensor.public static final String FEATURE_HIFI_SENSORS
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports high fidelity sensor processing
capabilities.public static final String FEATURE_TELEPHONY
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a telephony radio with data
communication support.public static final String FEATURE_TELEPHONY_CDMA
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a CDMA telephony stack.public static final String FEATURE_TELEPHONY_GSM
#getSystemAvailableFeatures and
#hasSystemFeature: The device has a GSM telephony stack.public static final String FEATURE_USB_HOST
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports connecting to USB devices
as the USB host.public static final String FEATURE_USB_ACCESSORY
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports connecting to USB accessories.public static final String FEATURE_SIP
#getSystemAvailableFeatures and
#hasSystemFeature: The SIP API is enabled on the device.public static final String FEATURE_SIP_VOIP
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports SIP-based VOIP.public static final String FEATURE_CONNECTION_SERVICE
#getSystemAvailableFeatures and
#hasSystemFeature: The Connection Service API is enabled on the device.public static final String FEATURE_TOUCHSCREEN
#getSystemAvailableFeatures and
#hasSystemFeature: The device's display has a touch screen.public static final String FEATURE_TOUCHSCREEN_MULTITOUCH
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen supports
multitouch sufficient for basic two-finger gesture detection.public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen is capable of
tracking two or more fingers fully independently.public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND
#getSystemAvailableFeatures and
#hasSystemFeature: The device's touch screen is capable of
tracking a full hand of fingers fully independently -- that is, 5 or
more simultaneous independent pointers.public static final String FEATURE_FAKETOUCH
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events. For instance, the
device might use a mouse or remote control to drive a cursor, and
emulate basic touch pointer events like down, up, drag, etc. All
devices that support android.hardware.touchscreen or a sub-feature are
presumed to also support faketouch.public static final String FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events that supports distinct
tracking of two or more fingers. This is an extension of
FEATURE_FAKETOUCH for input devices with this capability. Note
that unlike a distinct multitouch screen as defined by
FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT, these kinds of input
devices will not actually provide full two-finger gestures since the
input is being transformed to cursor movement on the screen. That is,
single finger gestures will move a cursor; two-finger swipes will
result in single-finger touch events; other two-finger gestures will
result in the corresponding two-finger touch event.public static final String FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND
#getSystemAvailableFeatures and
#hasSystemFeature: The device does not have a touch screen, but
does support touch emulation for basic events that supports tracking
a hand of fingers (5 or more fingers) fully independently.
This is an extension of
FEATURE_FAKETOUCH for input devices with this capability. Note
that unlike a multitouch screen as defined by
FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND, not all two finger
gestures can be detected due to the limitations described for
FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT.public static final String FEATURE_FINGERPRINT
#getSystemAvailableFeatures and
#hasSystemFeature: The device has biometric hardware to detect a fingerprint.public static final String FEATURE_SCREEN_PORTRAIT
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports portrait orientation
screens. For backwards compatibility, you can assume that if neither
this nor FEATURE_SCREEN_LANDSCAPE is set then the device supports
both portrait and landscape.public static final String FEATURE_SCREEN_LANDSCAPE
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports landscape orientation
screens. For backwards compatibility, you can assume that if neither
this nor FEATURE_SCREEN_PORTRAIT is set then the device supports
both portrait and landscape.public static final String FEATURE_LIVE_WALLPAPER
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports live wallpapers.public static final String FEATURE_APP_WIDGETS
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports app widgets.public static final String FEATURE_VOICE_RECOGNIZERS
public static final String FEATURE_HOME_SCREEN
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports a home screen that is replaceable
by third party applications.public static final String FEATURE_INPUT_METHODS
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports adding new input methods implemented
with the android.inputmethodservice.InputMethodService API.public static final String FEATURE_DEVICE_ADMIN
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports device policy enforcement via device admins.public static final String FEATURE_LEANBACK
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports leanback UI. This is
typically used in a living room television experience, but is a software
feature unlike FEATURE_TELEVISION. Devices running with this
feature will use resources associated with the "television" UI mode.public static final String FEATURE_LEANBACK_ONLY
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports only leanback UI. Only
applications designed for this experience should be run, though this is
not enforced by the system.public static final String FEATURE_LIVE_TV
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports live TV and can display
contents from TV inputs implemented with the
android.media.tv.TvInputService API.public static final String FEATURE_WIFI
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports WiFi (802.11) networking.public static final String FEATURE_WIFI_DIRECT
#getSystemAvailableFeatures and
#hasSystemFeature: The device supports Wi-Fi Direct networking.public static final String FEATURE_AUTOMOTIVE
#getSystemAvailableFeatures and
#hasSystemFeature: This is a device dedicated to showing UI
on a vehicle headunit. A headunit here is defined to be inside a
vehicle that may or may not be moving. A headunit uses either a
primary display in the center console and/or additional displays in
the instrument cluster or elsewhere in the vehicle. Headunit display(s)
have limited size and resolution. The user will likely be focused on
driving so limiting driver distraction is a primary concern. User input
can be a variety of hard buttons, touch, rotary controllers and even mouse-
like interfaces.@Deprecated public static final String FEATURE_TELEVISION
FEATURE_LEANBACK instead.#getSystemAvailableFeatures and
#hasSystemFeature: This is a device dedicated to showing UI
on a television. Television here is defined to be a typical living
room television experience: displayed on a big screen, where the user
is sitting far away from it, and the dominant form of input will be
something like a DPAD, not through touch or mouse.public static final String FEATURE_WATCH
#getSystemAvailableFeatures and
#hasSystemFeature: This is a device dedicated to showing UI
on a watch. A watch here is defined to be a device worn on the body, perhaps on
the wrist. The user is very close when interacting with the device.public static final String FEATURE_PRINTING
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports printing.public static final String FEATURE_BACKUP
#getSystemAvailableFeatures and #hasSystemFeature:
The device can perform backup and restore operations on installed applications.public static final String FEATURE_MANAGED_USERS
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports creating secondary users and managed profiles via
DevicePolicyManager.public static final String FEATURE_MANAGED_PROFILES
public static final String FEATURE_VERIFIED_BOOT
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports verified boot.public static final String FEATURE_SECURELY_REMOVES_USERS
#getSystemAvailableFeatures and #hasSystemFeature:
The device supports secure removal of users. When a user is deleted the data associated
with that user is securely deleted and no longer available.public static final String FEATURE_WEBVIEW
#getSystemAvailableFeatures and #hasSystemFeature:
The device has a full implementation of the android.webkit.* APIs. Devices
lacking this feature will not have a functioning WebView implementation.public static final String FEATURE_ETHERNET
#getSystemAvailableFeatures and
#hasSystemFeature: This device supports ethernet.public static final String FEATURE_HDMI_CEC
#getSystemAvailableFeatures and
#hasSystemFeature: This device supports HDMI-CEC.public static final String FEATURE_GAMEPAD
#getSystemAvailableFeatures and #hasSystemFeature:
The device has all of the inputs necessary to be considered a compatible game controller, or
includes a compatible game controller in the box.public static final String FEATURE_MIDI
#getSystemAvailableFeatures and #hasSystemFeature:
The device has a full implementation of the android.media.midi.* APIs.public static final String ACTION_CLEAN_EXTERNAL_STORAGE
public static final String EXTRA_VERIFICATION_URI
public static final String EXTRA_VERIFICATION_ID
PackageManager#verifyPendingInstall(int, int)public static final String EXTRA_VERIFICATION_INSTALLER_PACKAGE
public static final String EXTRA_VERIFICATION_INSTALL_FLAGS
public static final String EXTRA_VERIFICATION_INSTALLER_UID
public static final String EXTRA_VERIFICATION_PACKAGE_NAME
public static final String EXTRA_VERIFICATION_RESULT
VERIFICATION_ALLOW, or VERIFICATION_REJECT.
Passed to package verifiers after a package is verified.public static final String EXTRA_VERIFICATION_VERSION_CODE
public static final String EXTRA_INTENT_FILTER_VERIFICATION_ID
PackageManager#verifyIntentFilter(int, int)public static final String EXTRA_INTENT_FILTER_VERIFICATION_URI_SCHEME
public static final String EXTRA_INTENT_FILTER_VERIFICATION_HOSTS
public static final String EXTRA_INTENT_FILTER_VERIFICATION_PACKAGE_NAME
public static final String ACTION_REQUEST_PERMISSIONS
public static final String EXTRA_REQUEST_PERMISSIONS_NAMES
Type: String[]
public static final String EXTRA_REQUEST_PERMISSIONS_RESULTS
Type: int[] of #PermissionResult
public static final String EXTRA_FAILURE_EXISTING_PACKAGE
PackageInstallObserver in the 'extras' Bundle in case of
INSTALL_FAILED_DUPLICATE_PERMISSION. This extra names the package which provides
the existing definition for the permission.public static final String EXTRA_FAILURE_EXISTING_PERMISSION
PackageInstallObserver in the 'extras' Bundle in case of
INSTALL_FAILED_DUPLICATE_PERMISSION. This extra names the permission that is
being redundantly defined by the package being installed.public static final int FLAG_PERMISSION_USER_SET
public static final int FLAG_PERMISSION_USER_FIXED
public static final int FLAG_PERMISSION_POLICY_FIXED
public static final int FLAG_PERMISSION_REVOKE_ON_UPGRADE
public static final int FLAG_PERMISSION_SYSTEM_FIXED
public static final int FLAG_PERMISSION_GRANTED_BY_DEFAULT
public static final int MASK_PERMISSION_FLAGS
public abstract PackageInfo getPackageInfo(String packageName, int flags) throws PackageManager.NameNotFoundException
Throws PackageManager.NameNotFoundException if a package with the given name can
not be found on the system.
packageName - The full name (i.e. com.google.apps.contacts) of the
desired package.flags - Additional option flags. Use any combination of
GET_ACTIVITIES, GET_GIDS,
GET_CONFIGURATIONS, GET_INSTRUMENTATION,
GET_PERMISSIONS, GET_PROVIDERS,
GET_RECEIVERS, GET_SERVICES,
GET_SIGNATURES, GET_UNINSTALLED_PACKAGES to
modify the data returned.DONT_DELETE_DATA flag set).PackageManager.NameNotFoundExceptionGET_ACTIVITIES,
GET_GIDS,
GET_CONFIGURATIONS,
GET_INSTRUMENTATION,
GET_PERMISSIONS,
GET_PROVIDERS,
GET_RECEIVERS,
GET_SERVICES,
GET_SIGNATURES,
GET_UNINSTALLED_PACKAGES