次の方法で共有


PackageManager Class

Definition

Class for retrieving various kinds of information related to the application packages that are currently installed on the device.

[Android.Runtime.Register("android/content/pm/PackageManager", DoNotGenerateAcw=true)]
public abstract class PackageManager : Java.Lang.Object
[<Android.Runtime.Register("android/content/pm/PackageManager", DoNotGenerateAcw=true)>]
type PackageManager = class
    inherit Object
Inheritance
PackageManager
Derived
Attributes

Remarks

Class for retrieving various kinds of information related to the application packages that are currently installed on the device.

You can find this class through Context#getPackageManager.

<p class="note"><strong>Note: </strong>If your app targets Android 11 (API level 30) or higher, the methods in this class each return a filtered list of apps. Learn more about how to manage package visibility. </p>

Java documentation for android.content.pm.PackageManager.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

PackageManager()

This member is deprecated.

PackageManager(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

CertInputRawX509
Obsolete.

Certificate input bytes: the input bytes represent an encoded X.

CertInputSha256
Obsolete.

Certificate input bytes: the input bytes represent the SHA256 output of an encoded X.

DontKillApp
Obsolete.

Flag parameter for #setComponentEnabledSetting(android.content.ComponentName, int, int) to indicate that you don't want to kill the app containing the component.

ExtraVerificationId

Extra field name for the ID of a package pending verification.

ExtraVerificationResult

Extra field name for the result of a verification, either #VERIFICATION_ALLOW, or #VERIFICATION_REJECT.

FeatureActivitiesOnSecondaryDisplays

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports running activities on secondary displays.

FeatureAppWidgets

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports app widgets.

FeatureAudioLowLatency

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.

FeatureAudioOutput

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes at least one form of audio output, as defined in the Android Compatibility Definition Document (CDD) section 7.8 Audio.

FeatureAudioPro

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has professional audio level of functionality and performance.

FeatureAutofill

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports autofill of user credentials, addresses, credit cards, etc via integration with android.service.autofill.AutofillService autofill providers.

FeatureAutomotive

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This is a device dedicated to showing UI on a vehicle headunit.

FeatureBackup

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device can perform backup and restore operations on installed applications.

FeatureBluetooth

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device is capable of communicating with other devices via Bluetooth.

FeatureBluetoothLe

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device is capable of communicating with other devices via Bluetooth Low Energy radio.

FeatureCamera

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a camera facing away from the screen.

FeatureCameraAny

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.

FeatureCameraAr

Feature for #getSystemAvailableFeatures and #hasSystemFeature: At least one of the cameras on the device supports the android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING capability level.

FeatureCameraAutofocus

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's camera supports auto-focus.

FeatureCameraCapabilityManualPostProcessing

Feature for #getSystemAvailableFeatures and #hasSystemFeature: At least one of the cameras on the device supports the android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING manual post-processing capability level.

FeatureCameraCapabilityManualSensor

Feature for #getSystemAvailableFeatures and #hasSystemFeature: At least one of the cameras on the device supports the android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR manual sensor capability level.

FeatureCameraCapabilityRaw

Feature for #getSystemAvailableFeatures and #hasSystemFeature: At least one of the cameras on the device supports the android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW RAW capability level.

FeatureCameraConcurrent

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's main front and back cameras can stream concurrently as described in android.hardware.camera2.CameraManager#getConcurrentCameraIds().

FeatureCameraExternal

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device can support having an external camera connected to it.

FeatureCameraFlash

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's camera supports flash.

FeatureCameraFront

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a front facing camera.

FeatureCameraLevelFull

Feature for #getSystemAvailableFeatures and #hasSystemFeature: At least one of the cameras on the device supports the android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL full hardware capability level.

FeatureCantSaveState

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports the android.R.attr#cantSaveState API.

FeatureCompanionDeviceSetup

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports android.companion.CompanionDeviceManager#associate associating with devices via android.companion.CompanionDeviceManager.

FeatureConnectionService

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The Connection Service API is enabled on the device.

FeatureConsumerIr

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device is capable of communicating with consumer IR devices.

FeatureControls

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports a system interface for the user to select and bind device control services provided by applications.

FeatureCredentials

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports retrieval of user credentials, via integration with credential providers.

FeatureDeviceAdmin

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports device policy enforcement via device admins.

FeatureDeviceLock

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports locking (for example, by a financing provider in case of a missed payment).

FeatureEmbedded

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This is a device for IoT and may not have an UI.

FeatureEthernet

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This device supports ethernet.

FeatureExpandedPictureInPicture

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports expanded picture-in-picture multi-window mode.

FeatureFace

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has biometric hardware to perform face authentication.

FeatureFaketouch

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device does not have a touch screen, but does support touch emulation for basic events.

FeatureFaketouchMultitouchDistinct

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.

FeatureFaketouchMultitouchJazzhand

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.

FeatureFingerprint

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has biometric hardware to detect a fingerprint.

FeatureFreeformWindowManagement

As a guiding principle:

FeatureGamepad

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.

FeatureHardwareKeystore

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the device implements the Android Keystore backed by an isolated execution environment.

FeatureHifiSensors

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports high fidelity sensor processing capabilities.

FeatureHomeScreen

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports a home screen that is replaceable by third party applications.

FeatureIdentityCredentialHardware

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the device supports android.security.identity.IdentityCredentialStore implemented in secure hardware at the given feature version.

FeatureIdentityCredentialHardwareDirectAccess

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the device supports android.security.identity.IdentityCredentialStore implemented in secure hardware with direct access at the given feature version.

FeatureInputMethods

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports adding new input methods implemented with the android.inputmethodservice.InputMethodService API.

FeatureIpsecTunnelMigration

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has the requisite kernel support for migrating IPsec tunnels to new source/destination addresses.

FeatureIpsecTunnels

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has the requisite kernel support for multinetworking-capable IPsec tunnels.

FeatureIris

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has biometric hardware to perform iris authentication.

FeatureKeystoreAppAttestKey

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a Keystore implementation that can create application-specific attestation keys.

FeatureKeystoreLimitedUseKey

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a Keystore implementation that can enforce limited use key in hardware with any max usage count (including count equals to 1).

FeatureKeystoreSingleUseKey

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a Keystore implementation that can only enforce limited use key in hardware with max usage count equals to 1.

FeatureLeanback

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports leanback UI.

FeatureLeanbackOnly

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports only leanback UI.

FeatureLiveTv

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.

FeatureLiveWallpaper

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports live wallpapers.

FeatureLocation

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports one or more methods of reporting current location.

FeatureLocationGps

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a Global Positioning System receiver and can report precise location.

FeatureLocationNetwork

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device can report location with coarse accuracy using a network-based geolocation system.

FeatureManagedUsers

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports creating secondary users and managed profiles via DevicePolicyManager.

FeatureMicrophone

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device can record audio via a microphone.

FeatureMidi

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a full implementation of the android.

FeatureNfc

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device can communicate using Near-Field Communications (NFC).

FeatureNfcBeam

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The Beam API is enabled on the device.

FeatureNfcHostCardEmulation

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports host- based NFC card emulation.

FeatureNfcHostCardEmulationNfcf

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports host- based NFC-F card emulation.

FeatureNfcOffHostCardEmulationEse

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports eSE- based NFC card emulation.

FeatureNfcOffHostCardEmulationUicc

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports uicc- based NFC card emulation.

FeatureOpenglesDeqpLevel

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the feature version specifies a date such that the device is known to pass the OpenGLES dEQP test suite associated with that date.

FeatureOpenglesExtensionPack

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports the OpenGL ES Android Extension Pack.

FeaturePc

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This is a device dedicated to be primarily used with keyboard, mouse or touchpad.

FeaturePictureInPicture

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports picture-in-picture multi-window mode.

FeaturePrinting

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports printing.

FeatureRamLow

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's ActivityManager#isLowRamDevice() ActivityManager.isLowRamDevice() method returns true.

FeatureRamNormal

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's ActivityManager#isLowRamDevice() ActivityManager.isLowRamDevice() method returns false.

FeatureScreenLandscape

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports landscape orientation screens.

FeatureScreenPortrait

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports portrait orientation screens.

FeatureSecureLockScreen

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a secure implementation of keyguard, meaning the device supports PIN, pattern and password as defined in Android CDD

FeatureSecurelyRemovesUsers

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports secure removal of users.

FeatureSecurityModelCompatible

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device is compatible with Android’s security model.

FeatureSensorAccelerometer

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes an accelerometer.

FeatureSensorAccelerometerLimitedAxes

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a limited axes accelerometer.

FeatureSensorAccelerometerLimitedAxesUncalibrated

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes an uncalibrated limited axes accelerometer.

FeatureSensorAmbientTemperature

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes an ambient temperature sensor.

FeatureSensorBarometer

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a barometer (air pressure sensor.

FeatureSensorCompass

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a magnetometer (compass).

FeatureSensorDynamicHeadTracker

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports exposing head tracker sensors from peripheral devices via the dynamic sensors API.

FeatureSensorGyroscope

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a gyroscope.

FeatureSensorGyroscopeLimitedAxes

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a limited axes gyroscope.

FeatureSensorGyroscopeLimitedAxesUncalibrated

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes an uncalibrated limited axes gyroscope.

FeatureSensorHeading

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a heading sensor.

FeatureSensorHeartRate

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a heart rate monitor.

FeatureSensorHeartRateEcg

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The heart rate sensor on this device is an Electrocardiogram.

FeatureSensorHingeAngle

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a hinge angle sensor.

FeatureSensorLight

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a light sensor.

FeatureSensorProximity

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a proximity sensor.

FeatureSensorRelativeHumidity

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a relative humidity sensor.

FeatureSensorStepCounter

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a hardware step counter.

FeatureSensorStepDetector

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device includes a hardware step detector.

FeatureSeOmapiEse

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Open Mobile API capable eSE-based secure elements.

FeatureSeOmapiSd

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Open Mobile API capable SD-based secure elements.

FeatureSeOmapiUicc

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Open Mobile API capable UICC-based secure elements.

FeatureSip

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The SIP API is enabled on the device.

FeatureSipVoip

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports SIP-based VOIP.

FeatureStrongboxKeystore

Feature for #getSystemAvailableFeatures, #hasSystemFeature(String), and #hasSystemFeature(String, int): If this feature is supported, the device implements the Android Keystore backed by a dedicated secure processor referred to as StrongBox.

FeatureTelecom

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telecom Service APIs.

FeatureTelephony

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a telephony radio with data communication support.

FeatureTelephonyCalling

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telephony APIs for calling service.

FeatureTelephonyCdma

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a CDMA telephony stack.

FeatureTelephonyData

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telephony APIs for data service.

FeatureTelephonyEuicc

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports embedded subscriptions on eUICCs.

FeatureTelephonyEuiccMep

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports multiple enabled profiles on eUICCs.

FeatureTelephonyGsm

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a GSM telephony stack.

FeatureTelephonyIms

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports attaching to IMS implementations using the ImsService API in telephony.

FeatureTelephonyMbms

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports cell-broadcast reception using the MBMS APIs.

FeatureTelephonyMessaging

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telephony APIs for SMS and MMS.

FeatureTelephonyRadioAccess

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telephony APIs for the radio access.

FeatureTelephonySubscription

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Telephony APIs for the subscription.

FeatureTelevision
Obsolete.

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This is a device dedicated to showing UI on a television.

FeatureTouchscreen

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's display has a touch screen.

FeatureTouchscreenMultitouch

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's touch screen supports multitouch sufficient for basic two-finger gesture detection.

FeatureTouchscreenMultitouchDistinct

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device's touch screen is capable of tracking two or more fingers fully independently.

FeatureTouchscreenMultitouchJazzhand

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.

FeatureUsbAccessory

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports connecting to USB accessories.

FeatureUsbHost

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports connecting to USB devices as the USB host.

FeatureUwb

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device is capable of communicating with other devices via ultra wideband.

FeatureVerifiedBoot

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports verified boot.

FeatureVrHeadtracking

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device implements headtracking suitable for a VR device.

FeatureVrMode

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device implements an optimized mode for virtual reality (VR) applications that handles stereoscopic rendering of notifications, and disables most monocular system UI components while a VR application has user focus.

FeatureVrModeHighPerformance

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device implements an optimized mode for virtual reality (VR) applications that handles stereoscopic rendering of notifications, disables most monocular system UI components while a VR application has user focus and meets extra CDD requirements to provide a high-quality VR experience.

FeatureVulkanDeqpLevel

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the feature version specifies a date such that the device is known to pass the Vulkan dEQP test suite associated with that date.

FeatureVulkanHardwareCompute

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the Vulkan implementation on this device is hardware accelerated, and the Vulkan native API will enumerate at least one VkPhysicalDevice, and the feature version will indicate what level of optional compute features that device supports beyond the Vulkan 1.

FeatureVulkanHardwareLevel

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the Vulkan implementation on this device is hardware accelerated, and the Vulkan native API will enumerate at least one VkPhysicalDevice, and the feature version will indicate what level of optional hardware features limits it supports.

FeatureVulkanHardwareVersion

Feature for #getSystemAvailableFeatures and #hasSystemFeature(String, int): If this feature is supported, the Vulkan implementation on this device is hardware accelerated, and the feature version will indicate the highest VkPhysicalDeviceProperties::apiVersion supported by the physical devices that support the hardware level indicated by #FEATURE_VULKAN_HARDWARE_LEVEL.

FeatureWalletLocationBasedSuggestions

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports showing location-based suggestions for wallet cards provided by the default payment app.

FeatureWatch

Feature for #getSystemAvailableFeatures and #hasSystemFeature: This is a device dedicated to showing UI on a watch.

FeatureWebview

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device has a full implementation of the android.

FeatureWifi

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports WiFi (802.

FeatureWifiAware

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Wi-Fi Aware.

FeatureWifiDirect

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Wi-Fi Direct networking.

FeatureWifiPasspoint

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Wi-Fi Passpoint and all Passpoint related APIs in WifiManager are supported.

FeatureWifiRtt

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports Wi-Fi RTT (IEEE 802.

FeatureWindowMagnification

Feature for #getSystemAvailableFeatures and #hasSystemFeature: The device supports window magnification.

FlagPermissionWhitelistInstaller
Obsolete.

Permission whitelist flag: permissions whitelisted by the installer.

FlagPermissionWhitelistSystem
Obsolete.

Permission whitelist flag: permissions whitelisted by the system.

FlagPermissionWhitelistUpgrade
Obsolete.

Permission whitelist flag: permissions whitelisted by the system when upgrading from an OS version where the permission was not restricted to an OS version where the permission is restricted.

GetAttributions

This member is deprecated.

GetAttributionsLong

PackageInfo flag: return all attributions declared in the package manifest

InstallScenarioBulk
Obsolete.

Installation scenario indicating a bulk operation with the desired result of a fully optimized application.

InstallScenarioBulkSecondary
Obsolete.

Installation scenario indicating a bulk operation that prioritizes minimal system health impact over application optimization.

InstallScenarioDefault
Obsolete.

A value to indicate the lack of CUJ information, disabling all installation scenario logic.

InstallScenarioFast
Obsolete.

Installation scenario providing the fastest “install button to launch" experience possible.

MatchApex

PackageInfo flag: include APEX packages that are currently installed.

MatchDirectBootAuto

Querying flag: automatically match components based on their Direct Boot awareness and the current user state.

MaximumVerificationTimeout

Can be used as the millisecondsToDelay argument for PackageManager#extendVerificationTimeout.

PropertyCompatOverrideLandscapeToPortrait

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app can be opted-in or opted-out from the compatibility treatment that rotates camera output by 90 degrees on landscape sensors on devices known to have compatibility issues.

PropertyMediaCapabilities

&lt;application&gt; level android.content.pm.PackageManager.Property tag specifying the XML resource ID containing an application's media capabilities XML file

        For example:
        &amp;lt;application&amp;gt;
          &amp;lt;property android:name="android.
PropertySelfCertifiedNetworkCapabilities

&lt;application&gt; level android.content.pm.PackageManager.Property tag specifying the XML resource ID containing the declaration of the self-certified network capabilities used by the application.

PropertySpecialUseFgsSubtype

&lt;service&gt; level android.content.pm.PackageManager.Property tag specifying the actual use case of the service if it's foreground service with the type ServiceInfo#FOREGROUND_SERVICE_TYPE_SPECIAL_USE.

Synchronous
Obsolete.

Flag parameter for #setComponentEnabledSetting(android.content.ComponentName, int, int) to indicate that the given user's package restrictions state will be serialised to disk after the component state has been updated.

VerificationAllow
Obsolete.

Used as the verificationCode argument for PackageManager#verifyPendingInstall to indicate that the calling package verifier allows the installation to proceed.

VerificationReject
Obsolete.

Used as the verificationCode argument for PackageManager#verifyPendingInstall to indicate the calling package verifier does not vote to allow the installation to proceed.

VersionCodeHighest

Constant for specifying the highest installed package version code.

Properties

BackgroundPermissionOptionLabel
BackgroundPermissionOptionLabelFormatted

Gets the localized label that corresponds to the option in settings for granting background access.

Class

Returns the runtime class of this Object.

(Inherited from Object)
DefaultActivityIcon

Return the generic icon for an activity that is used when no specific icon is defined.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
InstantAppCookieMaxBytes
IsAutoRevokeWhitelisted

<strong>Note: </strong>In retrospect it would have been preferred to use more inclusive terminology when naming this API.

IsDeviceUpgrading

Returns true if the device is upgrading, such as first boot after OTA.

IsInstantApp
IsPackageSuspended

Apps can query this to know if they have been suspended.

IsSafeMode

Return whether the device has been booted into safe mode.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PackageInstaller

Return interface that offers the ability to install, upgrade, and remove applications on the device.

PeerReference (Inherited from Object)
SuspendedPackageAppExtras

Returns a Bundle of extras that was meant to be sent to the calling app when it was suspended.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TrustAll

Trust any Installer to provide checksums for the package.

TrustNone

Don't trust any Installer to provide checksums for the package.

Methods

AddPackageToPreferred(String)
Obsolete.

This member is deprecated.

AddPermission(PermissionInfo)

Add a new dynamic permission to the system.

AddPermissionAsync(PermissionInfo)

Like #addPermission(PermissionInfo) but asynchronously persists the package manager state after returning from the call, allowing it to return quicker and batch a series of adds at the expense of no guarantee the added permission will be retained if the device is rebooted before it is written.

AddPreferredActivity(IntentFilter, MatchResults, ComponentName[], ComponentName)
Obsolete.

Add a new preferred activity mapping to the system.

AddWhitelistedRestrictedPermission(String, String, FlagPermission)

Adds a whitelisted restricted permission for an app.

CanonicalToCurrentPackageNames(String[])

Map from a packages canonical name to the current name in use on the device.

CanPackageQuery(String, String)

Returns true if the source package is able to query for details about the target package.

CanPackageQuery(String, String[])

Same as #canPackageQuery(String, String) but accepts an array of target packages to be queried.

CanRequestPackageInstalls()

Checks whether the calling package is allowed to request package installs through package installer.

CheckPermission(String, String)

Check whether a particular package has been granted a particular permission.

CheckSignatures(Int32, Int32)

Like #checkSignatures(String, String), but takes UIDs of the two packages to be checked.

CheckSignatures(String, String)

Compare the signatures of two packages to determine if the same signature appears in both of them.

ClearInstantAppCookie()

Clears the instant application cookie for the calling app.

ClearPackagePreferredActivities(String)

Remove all preferred activity mappings, previously added with #addPreferredActivity, from the system whose activities are implemented in the given package name.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CurrentToCanonicalPackageNames(String[])

Map from the current package names in use on the device to whatever the current canonical name of that package is.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
ExtendVerificationTimeout(Int32, PackageInstallVerification, Int64)

Allows a package listening to the Intent#ACTION_PACKAGE_NEEDS_VERIFICATION package verification broadcast to extend the default timeout for a response and declare what action to perform after the timeout occurs.

GetActivityBanner(ComponentName)

Retrieve the banner associated with an activity.

GetActivityBanner(Intent)

Retrieve the banner associated with an Intent.

GetActivityIcon(ComponentName)

Retrieve the icon associated with an activity.

GetActivityIcon(Intent)

Retrieve the icon associated with an Intent.

GetActivityInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular activity class.

GetActivityInfo(ComponentName, PackageManager+ComponentInfoFlags)
GetActivityLogo(ComponentName)

Retrieve the logo associated with an activity.

GetActivityLogo(Intent)

Retrieve the logo associated with an Intent.

GetAllPermissionGroups(PackageInfoFlags)

Retrieve all of the known permission groups in the system.

GetApplicationBanner(ApplicationInfo)

Retrieve the banner associated with an application.

GetApplicationBanner(String)

Retrieve the banner associated with an application.

GetApplicationEnabledSetting(String)

Return the enabled setting for an application.

GetApplicationIcon(ApplicationInfo)

Retrieve the icon associated with an application.

GetApplicationIcon(String)

Retrieve the icon associated with an application.

GetApplicationInfo(String, PackageInfoFlags)

Retrieve all of the information we know about a particular package/application.

GetApplicationInfo(String, PackageManager+ApplicationInfoFlags)
GetApplicationLabel(ApplicationInfo)

Return the label to use for this application.

GetApplicationLabelFormatted(ApplicationInfo)

Return the label to use for this application.

GetApplicationLogo(ApplicationInfo)

Retrieve the logo associated with an application.

GetApplicationLogo(String)

Retrieve the logo associated with an application.

GetChangedPackages(Int32)

Returns the names of the packages that have been changed [eg.

GetComponentEnabledSetting(ComponentName)

Return the enabled setting for a package component (activity, receiver, service, provider).

GetDrawable(String, Int32, ApplicationInfo)

Retrieve an image from a package.

GetGroupOfPlatformPermission(String, IExecutor, IConsumer)

Get the platform-defined permission group of a particular permission, if the permission is a platform-defined permission.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInstalledApplications(PackageInfoFlags)

Return a List of all application packages that are installed for the current user.

GetInstalledApplications(PackageManager+ApplicationInfoFlags)
GetInstalledModules(Int32)

Return a List of all modules that are installed.

GetInstalledPackages(PackageInfoFlags)

Return a List of all packages that are installed for the current user.

GetInstalledPackages(PackageManager+PackageInfoFlags)
GetInstallerPackageName(String)

Retrieve the package name of the application that installed a package.

GetInstallSourceInfo(String)

Retrieves information about how a package was installed or updated.

GetInstantAppCookie()

Gets the instant application cookie for this app.

GetInstrumentationInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular instrumentation class.

GetLaunchIntentForPackage(String)

Returns a "good" intent to launch a front-door activity in a package.

GetLaunchIntentSenderForPackage(String)

Returns an IntentSender that can be used to launch a front-door activity in a package.

GetLeanbackLaunchIntentForPackage(String)

Return a "good" intent to launch a front-door Leanback activity in a package, for use for example to implement an "open" button when browsing through packages.

GetMimeGroup(String)

Gets all MIME types contained by MIME group.

GetModuleInfo(String, Int32)

Retrieve information for a particular module.

GetNameForUid(Int32)

Retrieve the official name associated with a uid.

GetPackageArchiveInfo(String, PackageInfoFlags)

Retrieve overall information about an application package defined in a package archive file

        Use <code data-dev-comment-type="c">#getPackageArchiveInfo(String, PackageInfoFlags)</code> when long flags are needed.
GetPackageArchiveInfo(String, PackageManager+PackageInfoFlags)
GetPackageGids(String, PackageInfoFlags)

Return an array of all of the POSIX secondary group IDs that have been assigned to the given package.

GetPackageGids(String, PackageManager+PackageInfoFlags)
GetPackageGids(String)

Return an array of all of the POSIX secondary group IDs that have been assigned to the given package.

GetPackageInfo(String, PackageInfoFlags)

Retrieve overall information about an application package that is installed on the system.

GetPackageInfo(String, PackageManager+PackageInfoFlags)
GetPackageInfo(VersionedPackage, PackageInfoFlags)

Retrieve overall information about an application package that is installed on the system.

GetPackageInfo(VersionedPackage, PackageManager+PackageInfoFlags)
GetPackagesForUid(Int32)

Retrieve the names of all packages that are associated with a particular user id.

GetPackagesHoldingPermissions(String[], PackageInfoFlags)

Return a List of all installed packages that are currently holding any of the given permissions.

GetPackagesHoldingPermissions(String[], PackageManager+PackageInfoFlags)
GetPackageUid(String, PackageInfoFlags)

Return the UID associated with the given package name.

GetPackageUid(String, PackageManager+PackageInfoFlags)
GetPermissionGroupInfo(String, PackageInfoFlags)

Retrieve all of the information we know about a particular group of permissions.

GetPermissionInfo(String, PackageInfoFlags)

Retrieve all of the information we know about a particular permission.

GetPlatformPermissionsForGroup(String, IExecutor, IConsumer)

Get the platform-defined permissions which belong to a particular permission group.

GetPreferredActivities(IList<IntentFilter>, IList<ComponentName>, String)

Retrieve all preferred activities, previously added with #addPreferredActivity, that are currently registered with the system.

GetPreferredPackages(PackageInfoFlags)

Retrieve the list of all currently configured preferred packages.

GetProperty(String, ComponentName)

Returns the property defined in the given component declaration.

GetProperty(String, String)

Returns the property defined in the given component declaration.

GetProviderInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular content provider class.

GetProviderInfo(ComponentName, PackageManager+ComponentInfoFlags)
GetReceiverInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular receiver class.

GetReceiverInfo(ComponentName, PackageManager+ComponentInfoFlags)
GetResourcesForActivity(ComponentName)

Retrieve the resources associated with an activity.

GetResourcesForApplication(ApplicationInfo, Configuration)

Retrieve the resources for an application for the provided configuration.

GetResourcesForApplication(ApplicationInfo)

Retrieve the resources for an application.

GetResourcesForApplication(String)

Retrieve the resources associated with an application.

GetServiceInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular service class.

GetServiceInfo(ComponentName, PackageManager+ComponentInfoFlags)
GetSharedLibraries(PackageInstallReason)

Get a list of shared libraries on the device.

GetSharedLibraries(PackageManager+PackageInfoFlags)
GetSyntheticAppDetailsActivityEnabled(String)

Return whether a synthetic app details activity will be generated if the app has no enabled launcher activity.

GetSystemAvailableFeatures()

Get a list of features that are available on the system.

GetSystemSharedLibraryNames()

Get a list of shared libraries that are available on the system.

GetTargetSdkVersion(String)
GetText(String, Int32, ApplicationInfo)

Retrieve text from a package.

GetTextFormatted(String, Int32, ApplicationInfo)

Retrieve text from a package.

GetUserBadgedDrawableForDensity(Drawable, UserHandle, Rect, Int32)

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a badged copy of the given drawable allowing the user to distinguish it from the original drawable.

GetUserBadgedIcon(Drawable, UserHandle)

If the target user is a managed profile, then this returns a badged copy of the given icon to be able to distinguish it from the original icon.

GetUserBadgedLabel(String, UserHandle)

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a copy of the label with badging for accessibility services like talkback.

GetUserBadgedLabelFormatted(ICharSequence, UserHandle)

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a copy of the label with badging for accessibility services like talkback.

GetWhitelistedRestrictedPermissions(String, FlagPermission)

Gets the restricted permissions that have been whitelisted and the app is allowed to have them granted in their full form.

GetXml(String, Int32, ApplicationInfo)

Retrieve an XML file from a package.

HasSigningCertificate(Int32, Byte[], CertificateType)

Searches the set of signing certificates by which the package(s) for the given uid has proven to have been signed.

HasSigningCertificate(String, Byte[], CertificateType)

Searches the set of signing certificates by which the given package has proven to have been signed.

HasSystemFeature(String, Int32)

Check whether the given feature name and version is one of the available features as returned by #getSystemAvailableFeatures().

HasSystemFeature(String)

Check whether the given feature name is one of the available features as returned by #getSystemAvailableFeatures().

InvokeIsAutoRevokeWhitelisted(String)

Checks whether an application is exempt from having its permissions be automatically revoked when the app is unused for an extended period of time.

InvokeIsInstantApp(String)

Gets whether the given package is an instant app.

InvokeIsPackageSuspended(String)

Query if an app is currently suspended.

IsDefaultApplicationIcon(Drawable)

Returns if the provided drawable represents the default activity icon provided by the system.

IsPermissionRevokedByPolicy(String, String)

Checks whether a particular permissions has been revoked for a package by policy.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
QueryActivityProperty(String)

Returns the property definition for all &lt;activity&gt; and &lt;activity-alias&gt; tags.

QueryApplicationProperty(String)

Returns the property definition for all &lt;application&gt; tags.

QueryBroadcastReceivers(Intent, PackageInfoFlags)

Retrieve all receivers that can handle a broadcast of the given intent.

QueryBroadcastReceivers(Intent, PackageManager+ResolveInfoFlags)
QueryContentProviders(String, Int32, PackageInfoFlags)

Retrieve content provider information.

QueryContentProviders(String, Int32, PackageManager+ComponentInfoFlags)
QueryInstrumentation(String, PackageInfoFlags)

Retrieve information about available instrumentation code.

QueryIntentActivities(Intent, PackageInfoFlags)

Retrieve all activities that can be performed for the given intent.

QueryIntentActivities(Intent, PackageManager+ResolveInfoFlags)
QueryIntentActivityOptions(ComponentName, IList<Intent>, Intent, PackageInfoFlags)
QueryIntentActivityOptions(ComponentName, Intent[], Intent, PackageInfoFlags)

Retrieve a set of activities that should be presented to the user as similar options.

QueryIntentContentProviders(Intent, PackageInfoFlags)

Retrieve all providers that can match the given intent.

QueryIntentContentProviders(Intent, PackageManager+ResolveInfoFlags)
QueryIntentServices(Intent, PackageInfoFlags)

Retrieve all services that can match the given intent.

QueryIntentServices(Intent, PackageManager+ResolveInfoFlags)
QueryPermissionsByGroup(String, PackageInfoFlags)

Query for all of the permissions associated with a particular group.

QueryProviderProperty(String)

Returns the property definition for all &lt;provider&gt; tags.

QueryReceiverProperty(String)

Returns the property definition for all &lt;receiver&gt; tags.

QueryServiceProperty(String)

Returns the property definition for all &lt;service&gt; tags.

RelinquishUpdateOwnership(String)

Attempt to relinquish the update ownership of the given package.

RemovePackageFromPreferred(String)
Obsolete.

This member is deprecated.

RemovePermission(String)

Removes a permission that was previously added with #addPermission(PermissionInfo).

RemoveWhitelistedRestrictedPermission(String, String, FlagPermission)

Removes a whitelisted restricted permission for an app.

RequestChecksums(String, Boolean, Int32, IList<Certificate>, PackageManager+IOnChecksumsReadyListener)

Requesting the checksums for APKs within a package.

ResolveActivity(Intent, PackageInfoFlags)

Determine the best action to perform for a given Intent.

ResolveActivity(Intent, PackageManager+ResolveInfoFlags)
ResolveContentProvider(String, PackageInfoFlags)

Find a single content provider by its authority.

ResolveContentProvider(String, PackageManager+ComponentInfoFlags)
ResolveService(Intent, PackageInfoFlags)

Determine the best service to handle for a given Intent.

ResolveService(Intent, PackageManager+ResolveInfoFlags)
SetApplicationCategoryHint(String, Int32)

Provide a hint of what the ApplicationInfo#category value should be for the given package.

SetApplicationEnabledSetting(String, ComponentEnabledState, ComponentEnableOption)

Set the enabled setting for an application This setting will override any enabled state which may have been set by the application in its manifest.

SetAutoRevokeWhitelisted(String, Boolean)

Marks an application exempt from having its permissions be automatically revoked when the app is unused for an extended period of time.

SetComponentEnabledSetting(ComponentName, ComponentEnabledState, ComponentEnableOption)

Set the enabled setting for a package component (activity, receiver, service, provider).

SetComponentEnabledSettings(IList<PackageManager.ComponentEnabledSetting>)

Set the enabled settings for package components such as activities, receivers, services and providers.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetInstallerPackageName(String, String)

Change the installer associated with a given package.

SetMimeGroup(String, ICollection<String>)

Sets MIME group's MIME types.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UpdateInstantAppCookie(Byte[])

Updates the instant application cookie for the calling app.

VerifyPendingInstall(Int32, PackageInstallVerification)

Allows a package listening to the Intent#ACTION_PACKAGE_NEEDS_VERIFICATION package verification broadcast to respond to the package manager.

Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to