IT. Expert System.

Android Reference

ApplicationInfo


android.content.pm

Class ApplicationInfo

  • All Implemented Interfaces:
    Parcelable


    public class ApplicationInfo
    extends PackageItemInfo
    implements Parcelable
    Information you can retrieve about a particular application. This corresponds to information collected from the AndroidManifest.xml's <application> tag.
    • Field Detail

      • taskAffinity

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

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

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

        public String className
        Class implementing the Application object. From the "class" attribute.
      • descriptionRes

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

        public int theme
        A style resource identifier (in the package's resources) of the default visual theme of the application. From the "theme" attribute or, if not set, 0.
      • manageSpaceActivityName

        public String manageSpaceActivityName
        Class implementing the Application's manage space functionality. From the "manageSpaceActivity" attribute. This is an optional attribute and will be null if applications don't specify it in their manifest
      • backupAgentName

        public String backupAgentName
        Class implementing the Application's backup functionality. From the "backupAgent" attribute. This is an optional attribute and will be null if the application does not specify it in its manifest.

        If android:allowBackup is set to false, this attribute is ignored.

      • uiOptions

        public int uiOptions
        The default extra UI options for activities in this application. Set from the android.R.attr#uiOptions attribute in the activity's manifest.
      • FLAG_SYSTEM

        public static final int FLAG_SYSTEM
        Value for flags: if set, this application is installed in the device's system image.
        See Also:
        Constant Field Values
      • FLAG_DEBUGGABLE

        public static final int FLAG_DEBUGGABLE
        Value for flags: set to true if this application would like to allow debugging of its code, even when installed on a non-development system. Comes from android:debuggable of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_HAS_CODE

        public static final int FLAG_HAS_CODE
        Value for flags: set to true if this application has code associated with it. Comes from android:hasCode of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_PERSISTENT

        public static final int FLAG_PERSISTENT
        Value for flags: set to true if this application is persistent. Comes from android:persistent of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_FACTORY_TEST

        public static final int FLAG_FACTORY_TEST
        Value for flags: set to true if this application holds the android.Manifest.permission#FACTORY_TEST permission and the device is running in factory test mode.
        See Also:
        Constant Field Values
      • FLAG_ALLOW_TASK_REPARENTING

        public static final int FLAG_ALLOW_TASK_REPARENTING
        Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowTaskReparenting of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_ALLOW_CLEAR_USER_DATA

        public static final int FLAG_ALLOW_CLEAR_USER_DATA
        Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowClearUserData of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_UPDATED_SYSTEM_APP

        public static final int FLAG_UPDATED_SYSTEM_APP
        Value for flags: this is set if this application has been install as an update to a built-in system application.
        See Also:
        Constant Field Values
      • FLAG_TEST_ONLY

        public static final int FLAG_TEST_ONLY
        Value for flags: this is set of the application has specified android:testOnly to be true.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_SMALL_SCREENS

        public static final int FLAG_SUPPORTS_SMALL_SCREENS
        Value for flags: true when the application's window can be reduced in size for smaller screens. Corresponds to android:smallScreens.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_NORMAL_SCREENS

        public static final int FLAG_SUPPORTS_NORMAL_SCREENS
        Value for flags: true when the application's window can be displayed on normal screens. Corresponds to android:normalScreens.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_LARGE_SCREENS

        public static final int FLAG_SUPPORTS_LARGE_SCREENS
        Value for flags: true when the application's window can be increased in size for larger screens. Corresponds to android:largeScreens.
        See Also:
        Constant Field Values
      • FLAG_RESIZEABLE_FOR_SCREENS

        public static final int FLAG_RESIZEABLE_FOR_SCREENS
        Value for flags: true when the application knows how to adjust its UI for different screen sizes. Corresponds to android:resizeable.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_SCREEN_DENSITIES

        public static final int FLAG_SUPPORTS_SCREEN_DENSITIES
        Value for flags: true when the application knows how to accomodate different screen densities. Corresponds to android:anyDensity.
        See Also:
        Constant Field Values
      • FLAG_VM_SAFE_MODE

        public static final int FLAG_VM_SAFE_MODE
        Value for flags: set to true if this application would like to request the VM to operate under the safe mode. Comes from android:vmSafeMode of the <application> tag.
        See Also:
        Constant Field Values
      • FLAG_ALLOW_BACKUP

        public static final int FLAG_ALLOW_BACKUP
        Value for flags: set to false if the application does not wish to permit any OS-driven backups of its data; true otherwise.

        Comes from the android:allowBackup attribute of the <application> tag.

        See Also:
        Constant Field Values
      • FLAG_KILL_AFTER_RESTORE

        public static final int FLAG_KILL_AFTER_RESTORE
        Value for flags: set to false if the application must be kept in memory following a full-system restore operation; true otherwise. Ordinarily, during a full system restore operation each application is shut down following execution of its agent's onRestore() method. Setting this attribute to false prevents this. Most applications will not need to set this attribute.

        If android:allowBackup is set to false or no android:backupAgent is specified, this flag will be ignored.

        Comes from the android:killAfterRestore attribute of the <application> tag.

        See Also:
        Constant Field Values
      • FLAG_RESTORE_ANY_VERSION

        public static final int FLAG_RESTORE_ANY_VERSION
        Value for flags: Set to true if the application's backup agent claims to be able to handle restore data even "from the future," i.e. from versions of the application with a versionCode greater than the one currently installed on the device. Use with caution! By default this attribute is false and the Backup Manager will ensure that data from "future" versions of the application are never supplied during a restore operation.

        If android:allowBackup is set to false or no android:backupAgent is specified, this flag will be ignored.

        Comes from the android:restoreAnyVersion attribute of the <application> tag.

        See Also:
        Constant Field Values
      • FLAG_EXTERNAL_STORAGE

        public static final int FLAG_EXTERNAL_STORAGE
        Value for flags: Set to true if the application is currently installed on external/removable/unprotected storage. Such applications may not be available if their storage is not currently mounted. When the storage it is on is not available, it will look like the application has been uninstalled (its .apk is no longer available) but its persistent data is not removed.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_XLARGE_SCREENS

        public static final int FLAG_SUPPORTS_XLARGE_SCREENS
        Value for flags: true when the application's window can be increased in size for extra large screens. Corresponds to android:xlargeScreens.
        See Also:
        Constant Field Values
      • FLAG_LARGE_HEAP

        public static final int FLAG_LARGE_HEAP
        Value for flags: true when the application has requested a large heap for its processes. Corresponds to android:largeHeap.
        See Also:
        Constant Field Values
      • FLAG_STOPPED

        public static final int FLAG_STOPPED
        Value for flags: true if this application's package is in the stopped state.
        See Also:
        Constant Field Values
      • FLAG_SUPPORTS_RTL

        public static final int FLAG_SUPPORTS_RTL
        Value for flags: true when the application is willing to support RTL (right to left). All activities will inherit this value. Set from the android.R.attr#supportsRtl attribute in the activity's manifest. Default value is false (no support for RTL).
        See Also:
        Constant Field Values
      • FLAG_INSTALLED

        public static final int FLAG_INSTALLED
        Value for flags: true if the application is currently installed for the calling user.
        See Also:
        Constant Field Values
      • FLAG_IS_DATA_ONLY

        public static final int FLAG_IS_DATA_ONLY
        Value for flags: true if the application only has its data installed; the application package itself does not currently exist on the device.
        See Also:
        Constant Field Values
      • FLAG_FORWARD_LOCK

        public static final int FLAG_FORWARD_LOCK
        Value for flags: Set to true if the application has been installed using the forward lock option. NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml.
        See Also:
        Constant Field Values
      • FLAG_CANT_SAVE_STATE

        public static final int FLAG_CANT_SAVE_STATE
        Value for flags: set to true if the application has reported that it is heavy-weight, and thus can not participate in the normal application lifecycle.

        Comes from the android:cantSaveState attribute of the <application> tag.

        See Also:
        Constant Field Values
      • requiresSmallestWidthDp

        public int requiresSmallestWidthDp
        The required smallest screen width the application can run on. If 0, nothing has been specified. Comes from android:requiresSmallestWidthDp attribute of the <supports-screens> tag.
      • compatibleWidthLimitDp

        public int compatibleWidthLimitDp
        The maximum smallest screen width the application is designed for. If 0, nothing has been specified. Comes from android:compatibleWidthLimitDp attribute of the <supports-screens> tag.
      • largestWidthLimitDp

        public int largestWidthLimitDp
        The maximum smallest screen width the application will work on. If 0, nothing has been specified. Comes from android:largestWidthLimitDp attribute of the <supports-screens> tag.
      • sourceDir

        public String sourceDir
        Full path to the location of this package.
      • publicSourceDir

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

        public String[] resourceDirs
        Full paths to the locations of extra resource packages this application uses. This field is only used if there are extra resource packages, otherwise it is null.
      • sharedLibraryFiles

        public String[] sharedLibraryFiles
        Paths to all shared libraries this application is linked against. This field is only set if the PackageManager.GET_SHARED_LIBRARY_FILES flag was used when retrieving the structure.
      • dataDir

        public String dataDir
        Full path to a directory assigned to the package for its persistent data.
      • nativeLibraryDir

        public String nativeLibraryDir
        Full path to the directory where native JNI libraries are stored.
      • uid

        public int uid
        The kernel user-ID that has been assigned to this application; currently this is not a unique ID (multiple applications can have the same uid).
      • targetSdkVersion

        public int targetSdkVersion
        The minimum SDK version this application targets. It may run on earlier versions, but it knows how to work with any new behavior added at this version. Will be Build.VERSION_CODES.CUR_DEVELOPMENT if this is a development build and the app is targeting that. You should compare that this number is >= the SDK version number at which your behavior was introduced.
      • enabled

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

        public int enabledSetting
        For convenient access to the current enabled setting of this app.
      • installLocation

        public int installLocation
        For convenient access to package's install location.
    • Constructor Detail

      • ApplicationInfo

        public ApplicationInfo()
    • Method Detail

      • hasRtlSupport

        public boolean hasRtlSupport()
        Returns:
        true if "supportsRtl" has been set to true in the AndroidManifest
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • loadDescription

        public CharSequence loadDescription(PackageManager pm)
        Retrieve the textual description of the application. This will call back on the given PackageManager to load the description from the application.
        Parameters:
        pm - A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a CharSequence containing the application's description. If there is no description, null is returned.
      • disableCompatibilityMode

        public void disableCompatibilityMode()
        Disable compatibility mode
      • loadDefaultIcon

        protected Drawable loadDefaultIcon(PackageManager pm)
        Description copied from class: PackageItemInfo
        Retrieve the default graphical icon associated with this item.
        Overrides:
        loadDefaultIcon in class PackageItemInfo
        Parameters:
        pm - A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a Drawable containing the item's default icon such as the default activity icon.
      • getApplicationInfo

        protected ApplicationInfo getApplicationInfo()
        Description copied from class: PackageItemInfo
        Get the ApplicationInfo for the application to which this item belongs, if available, otherwise returns null.
        Overrides:
        getApplicationInfo in class PackageItemInfo
        Returns:
        Returns the ApplicationInfo of this item, or null if not known.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1609 / 96487408. Delta: 0.03648 с