Added in API level 1

ApplicationInfo


open class ApplicationInfo : PackageItemInfo, Parcelable
kotlin.Any
   ↳ android.content.pm.PackageItemInfo
   ↳ android.content.pm.ApplicationInfo

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

Summary

Nested classes
open

Constants
static Int

Category for apps which are primarily accessibility apps, such as screen-readers.

static Int

Category for apps which primarily work with audio or music, such as music players.

static Int

Category for apps which are primarily games.

static Int

Category for apps which primarily work with images or photos, such as camera or gallery apps.

static Int

Category for apps which are primarily maps apps, such as navigation apps.

static Int

Category for apps which are primarily news apps, such as newspapers, magazines, or sports apps.

static Int

Category for apps which are primarily productivity apps, such as cloud storage or workplace apps.

static Int

Category for apps which are primarily social apps, such as messaging, communication, email, or social network apps.

static Int

Value when category is undefined.

static Int

Category for apps which primarily work with video or movies, such as streaming video apps.

static Int

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

static Int

Value for flags: default value for the corresponding ActivityInfo flag.

static Int

Value for flags: default value for the corresponding ActivityInfo flag.

static Int

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.

static Int

Value for flags: Set to true if the application is currently installed on external/removable/unprotected storage.

static Int

When set installer extracts native libs from .

static Int

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.

static Int

Value for flags: true if the application asks that only full-data streaming backups of its data be performed even though it defines a BackupAgent, which normally indicates that the app will manage its backed-up data via incremental key/value updates.

static Int

Value for flags: true when the application's rendering should be hardware accelerated.

static Int

Value for flags: set to true if this application has code associated with it.

static Int

Value for flags: true if the application is currently installed for the calling user.

static Int

Value for flags: true if the application only has its data installed; the application package itself does not currently exist on the device.

static Int

Value for flags: true if the application was declared to be a game, or false if it is a non-game application.

static Int

Value for flags: set to false if the application must be kept in memory following a full-system restore operation; true otherwise.

static Int

Value for flags: true when the application has requested a large heap for its processes.

static Int

Value for flags: true if code from this application will need to be loaded into other applications' processes.

static Int

Value for flags: set to true if this application is persistent.

static Int

Value for flags: true when the application knows how to adjust its UI for different screen sizes.

static Int

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.

static Int

Value for flags: true if this application's package is in the stopped state.

static Int

Value for flags: true when the application's window can be increased in size for larger screens.

static Int

Value for flags: true when the application's window can be displayed on normal screens.

static Int

Value for flags: true when the application is willing to support RTL (right to left).

static Int

Value for flags: true when the application knows how to accommodate different screen densities.

static Int

Value for flags: true when the application's window can be reduced in size for smaller screens.

static Int

Value for flags: true when the application's window can be increased in size for extra large screens.

static Int

Value for flags: true if this application's package is in the suspended state.

static Int

Value for flags: if set, this application is installed in the device's system image.

static Int

Value for flags: this is set if the application has specified android:testOnly to be true.

static Int

Value for flags: this is set if this application has been installed as an update to a built-in system application.

static Int

Value for flags: true if the application may use cleartext network traffic (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, SMTP without STARTTLS or TLS).

static Int

Value for flags: set to true if this application would like to request the VM to operate under the safe mode.

static Int

Always enable GWP-ASan in this application or process.

static Int

Default (unspecified) setting of GWP-ASan.

static Int

Never enable GWP-ASan in this application or process.

static Int

Enable Memtag in Async mode in this application or process.

static Int

Default (unspecified) setting of Memtag.

static Int

Do not enable Memtag in this application or process.

static Int

Enable Memtag in Sync mode in this application or process.

static Int

Use default value for android.R.styleable#AndroidManifestApplication_requestRawExternalStorageAccess.

static Int

Raw external storage was not requested by this app.

static Int

Raw external storage was requested by this app.

static Int

Default (unspecified) setting of nativeHeapZeroInitialized.

static Int

Disable zero-initialization of the native heap in this application or process.

static Int

Enable zero-initialization of the native heap in this application or process.

Inherited constants
Public constructors

Public methods
open Boolean

Returns whether attributions provided by the application are meant to be user-visible.

open Int

open Unit
dump(pw: Printer!, prefix: String!)

open static CharSequence!
getCategoryTitle(context: Context!, category: Int)

Return a concise, localized title for the given ApplicationInfo.category value, or null for unknown values such as CATEGORY_UNDEFINED.

open Int

open MutableSet<String!>

Gets the trusted host certificate digests of apps that are allowed to embed activities of this application.

open Int

Returns whether the application has requested Memtag to be enabled, disabled, or left unspecified.

open Int

Returns whether the application has requested automatic zero-initialization of native heap memory allocations to be enabled or disabled.

open Int

open Boolean

Returns whether this application can be profiled, either by the shell user or the system.

open Boolean

Returns whether or not this application can be profiled by the shell user, even when running on a device that is running in user mode.

open Boolean

Returns true if the package has declared in its manifest that it is a runtime resource overlay.

open Boolean

Returns whether or not this application was installed as a virtual preload.

open CharSequence!

Retrieve the textual description of the application.

open String

open Unit
writeToParcel(dest: Parcel, parcelableFlags: Int)

Inherited functions
Properties
static Parcelable.Creator<ApplicationInfo!>

String!

The factory of this package, as specified by the <manifest> tag's android.R.styleable#AndroidManifestApplication_appComponentFactory attribute.

String!

Class implementing the Application's backup functionality.

Int

The category of this app.

String!

Class implementing the Application object.

Int

The maximum smallest screen width the application is designed for.

Int

The user-visible SDK version (ex. 26) of the framework against which the application claims to have been compiled, or

String?

The development codename (ex. "S", "REL") of the framework against which the application claims to have been compiled, or

String!

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

Int

A style resource identifier (in the package's resources) of the description of an application.

String!

Full path to the device-protected directory assigned to the package for its persistent data.

Boolean

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

Int

Flags associated with the application.

Int

The maximum smallest screen width the application will work on.

String!

Class implementing the Application's manage space functionality.

Int

The minimum SDK version this application can run on.

String!

Full path to the directory where native JNI libraries are stored.

String!

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

String!

The name of the process this application should run in.

String!

Full path to the publicly available parts of sourceDir, including resources and manifest.

Int

The required smallest screen width the application can run on.

Array<String!>!

Paths to all shared libraries this application is linked against.

String!

Full path to the base APK for this application.

Array<String!>?

The names of all installed split APKs, ordered lexicographically.

Array<String!>?

Full path to the publicly available parts of splitSourceDirs, including resources and manifest.

Array<String!>?

Full paths to split APKs, indexed by the same order as splitNames.

UUID!

UUID of the storage volume on which this application is being hosted.

Int

The minimum SDK version this application targets.

String!

Default task affinity of all activities in this application.

Int

A style resource identifier (in the package's resources) of the default visual theme of the application.

Int

The default extra UI options for activities in this application.

Int

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

Inherited properties

Constants

CATEGORY_ACCESSIBILITY

Added in API level 31
static val CATEGORY_ACCESSIBILITY: Int

Category for apps which are primarily accessibility apps, such as screen-readers.

Value: 8

See Also

CATEGORY_AUDIO

Added in API level 26
static val CATEGORY_AUDIO: Int

Category for apps which primarily work with audio or music, such as music players.

Value: 1

See Also

CATEGORY_GAME

Added in API level 26
static val CATEGORY_GAME: Int

Category for apps which are primarily games.

Value: 0

See Also

CATEGORY_IMAGE

Added in API level 26
static val CATEGORY_IMAGE: Int

Category for apps which primarily work with images or photos, such as camera or gallery apps.

Value: 3

See Also

CATEGORY_MAPS

Added in API level 26
static val CATEGORY_MAPS: Int

Category for apps which are primarily maps apps, such as navigation apps.

Value: 6

See Also

CATEGORY_NEWS

Added in API level 26
static val CATEGORY_NEWS: Int

Category for apps which are primarily news apps, such as newspapers, magazines, or sports apps.

Value: 5

See Also

CATEGORY_PRODUCTIVITY

Added in API level 26
static val CATEGORY_PRODUCTIVITY: Int

Category for apps which are primarily productivity apps, such as cloud storage or workplace apps.

Value: 7

See Also

CATEGORY_SOCIAL

Added in API level 26
static val CATEGORY_SOCIAL: Int

Category for apps which are primarily social apps, such as messaging, communication, email, or social network apps.

Value: 4

See Also

CATEGORY_UNDEFINED

Added in API level 26
static val CATEGORY_UNDEFINED: Int

Value when category is undefined.

Value: -1

See Also

CATEGORY_VIDEO

Added in API level 26
static val CATEGORY_VIDEO: Int

Category for apps which primarily work with video or movies, such as streaming video apps.

Value: 2

See Also

FLAG_ALLOW_BACKUP

Added in API level 8
static val FLAG_ALLOW_BACKUP: Int

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.

Value: 32768

FLAG_ALLOW_CLEAR_USER_DATA

Added in API level 1
static val FLAG_ALLOW_CLEAR_USER_DATA: Int

Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowClearUserData of the <application> tag.

Value: 64

FLAG_ALLOW_TASK_REPARENTING

Added in API level 1
static val FLAG_ALLOW_TASK_REPARENTING: Int

Value for flags: default value for the corresponding ActivityInfo flag. Comes from android:allowTaskReparenting of the <application> tag.

Value: 32

FLAG_DEBUGGABLE

Added in API level 1
static val FLAG_DEBUGGABLE: Int

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.

Value: 2

FLAG_EXTERNAL_STORAGE

Added in API level 8
static val FLAG_EXTERNAL_STORAGE: Int

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.

Value: 262144

FLAG_EXTRACT_NATIVE_LIBS

Added in API level 23
static val FLAG_EXTRACT_NATIVE_LIBS: Int

When set installer extracts native libs from .apk files.

Value: 268435456

FLAG_FACTORY_TEST

Added in API level 1
static val FLAG_FACTORY_TEST: Int

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.

Value: 16

FLAG_FULL_BACKUP_ONLY

Added in API level 21
static val FLAG_FULL_BACKUP_ONLY: Int

Value for flags: true if the application asks that only full-data streaming backups of its data be performed even though it defines a BackupAgent, which normally indicates that the app will manage its backed-up data via incremental key/value updates.

Value: 67108864

FLAG_HARDWARE_ACCELERATED

Added in API level 23
static val FLAG_HARDWARE_ACCELERATED: Int

Value for flags: true when the application's rendering should be hardware accelerated.

Value: 536870912

FLAG_HAS_CODE

Added in API level 1
static val FLAG_HAS_CODE: Int

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

Value: 4

FLAG_INSTALLED

Added in API level 17
static val FLAG_INSTALLED: Int

Value for flags: true if the application is currently installed for the calling user.

Value: 8388608

FLAG_IS_DATA_ONLY

Added in API level 17
static val FLAG_IS_DATA_ONLY: Int

Value for flags: true if the application only has its data installed; the application package itself does not currently exist on the device.

Value: 16777216

FLAG_IS_GAME

Added in API level 21
Deprecated in API level 26
static val FLAG_IS_GAME: Int

Deprecated: use CATEGORY_GAME instead.

Value for flags: true if the application was declared to be a game, or false if it is a non-game application.

Value: 33554432

FLAG_KILL_AFTER_RESTORE

Added in API level 8
static val FLAG_KILL_AFTER_RESTORE: Int

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.

Value: 65536

FLAG_LARGE_HEAP

Added in API level 11
static val FLAG_LARGE_HEAP: Int

Value for flags: true when the application has requested a large heap for its processes. Corresponds to android:largeHeap.

Value: 1048576

FLAG_MULTIARCH

Added in API level 21
static val FLAG_MULTIARCH: Int

Value for flags: true if code from this application will need to be loaded into other applications' processes. On devices that support multiple instruction sets, this implies the code might be loaded into a process that's using any of the devices supported instruction sets.

The system might treat such applications specially, for eg., by extracting the application's native libraries for all supported instruction sets or by compiling the application's dex code for all supported instruction sets.

Value: -2147483648

FLAG_PERSISTENT

Added in API level 1
static val FLAG_PERSISTENT: Int

Value for flags: set to true if this application is persistent. Comes from android:persistent of the <application> tag.

Value: 8

FLAG_RESIZEABLE_FOR_SCREENS

Added in API level 4
static val FLAG_RESIZEABLE_FOR_SCREENS: Int

Value for flags: true when the application knows how to adjust its UI for different screen sizes. Corresponds to android:resizeable.

Value: 4096

FLAG_RESTORE_ANY_VERSION

Added in API level 8
static val FLAG_RESTORE_ANY_VERSION: Int

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.

Value: 131072

FLAG_STOPPED

Added in API level 12
static val FLAG_STOPPED: Int

Value for flags: true if this application's package is in the stopped state.

Stopped is the initial state after an app is installed, before it is launched or otherwise directly interacted with by the user. The system tries not to start it unless initiated by a user interaction (typically launching its icon from the launcher, could also include user actions like adding it as an app widget, selecting it as a live wallpaper, selecting it as a keyboard, etc). Stopped applications will not receive implicit broadcasts unless the sender specifies android.content.Intent#FLAG_INCLUDE_STOPPED_PACKAGES.

Applications should avoid launching activities, binding to or starting services, or otherwise causing a stopped application to run unless initiated by the user.

An app can also return to the stopped state by a "force stop".

Value: 2097152

FLAG_SUPPORTS_LARGE_SCREENS

Added in API level 4
static val FLAG_SUPPORTS_LARGE_SCREENS: Int

Value for flags: true when the application's window can be increased in size for larger screens. Corresponds to android:largeScreens.

Value: 2048

FLAG_SUPPORTS_NORMAL_SCREENS

Added in API level 4
static val FLAG_SUPPORTS_NORMAL_SCREENS: Int

Value for flags: true when the application's window can be displayed on normal screens. Corresponds to android:normalScreens.

Value: 1024

FLAG_SUPPORTS_RTL

Added in API level 17
static val FLAG_SUPPORTS_RTL: Int

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

Value: 4194304

FLAG_SUPPORTS_SCREEN_DENSITIES

Added in API level 4
Deprecated in API level 30
static val FLAG_SUPPORTS_SCREEN_DENSITIES: Int

Deprecated: Set by default when targeting API 4 or higher and apps should not set this to false.

Value for flags: true when the application knows how to accommodate different screen densities. Corresponds to android:anyDensity.

Value: 8192

FLAG_SUPPORTS_SMALL_SCREENS

Added in API level 4
static val FLAG_SUPPORTS_SMALL_SCREENS: Int

Value for flags: true when the application's window can be reduced in size for smaller screens. Corresponds to android:smallScreens.

Value: 512

FLAG_SUPPORTS_XLARGE_SCREENS

Added in API level 11
static val FLAG_SUPPORTS_XLARGE_SCREENS: Int

Value for flags: true when the application's window can be increased in size for extra large screens. Corresponds to android:xlargeScreens.

Value: 524288

FLAG_SUSPENDED

Added in API level 24
static val FLAG_SUSPENDED: Int

Value for flags: true if this application's package is in the suspended state.

Value: 1073741824

FLAG_SYSTEM

Added in API level 1
static val FLAG_SYSTEM: Int

Value for flags: if set, this application is installed in the device's system image. This should not be used to make security decisions. Instead, rely on signature checks or permissions.

Warning: Note that this flag does not behave the same as android:protectionLevel system or signatureOrSystem.

Value: 1

FLAG_TEST_ONLY

Added in API level 4
static val FLAG_TEST_ONLY: Int

Value for flags: this is set if the application has specified android:testOnly to be true.

Value: 256

FLAG_UPDATED_SYSTEM_APP

Added in API level 4
static val FLAG_UPDATED_SYSTEM_APP: Int

Value for flags: this is set if this application has been installed as an update to a built-in system application.

Value: 128

FLAG_USES_CLEARTEXT_TRAFFIC

Added in API level 23
static val FLAG_USES_CLEARTEXT_TRAFFIC: Int

Value for flags: true if the application may use cleartext network traffic (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, SMTP without STARTTLS or TLS). If false, the app declares that it does not intend to use cleartext network traffic, in which case platform components (e.g., HTTP stacks, DownloadManager, MediaPlayer) will refuse app's requests to use cleartext traffic. Third-party libraries are encouraged to honor this flag as well.

NOTE: WebView honors this flag for applications targeting API level 26 and up.

This flag is ignored on Android N and above if an Android Network Security Config is present.

This flag comes from android:usesCleartextTraffic of the <application> tag.

Value: 134217728

FLAG_VM_SAFE_MODE

Added in API level 8
static val FLAG_VM_SAFE_MODE: Int

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.

Value: 16384

GWP_ASAN_ALWAYS

Added in API level 30
static val GWP_ASAN_ALWAYS: Int

Always enable GWP-ASan in this application or process.

Value: 1

GWP_ASAN_DEFAULT

Added in API level 30
static val GWP_ASAN_DEFAULT: Int

Default (unspecified) setting of GWP-ASan.

Value: -1

GWP_ASAN_NEVER

Added in API level 30
static val GWP_ASAN_NEVER: Int

Never enable GWP-ASan in this application or process.

Value: 0

MEMTAG_ASYNC

Added in API level 31
static val MEMTAG_ASYNC: Int

Enable Memtag in Async mode in this application or process.

Value: 1

MEMTAG_DEFAULT

Added in API level 31
static val MEMTAG_DEFAULT: Int

Default (unspecified) setting of Memtag.

Value: -1

MEMTAG_OFF

Added in API level 31
static val MEMTAG_OFF: Int

Do not enable Memtag in this application or process.

Value: 0

MEMTAG_SYNC

Added in API level 31
static val MEMTAG_SYNC: Int

Enable Memtag in Sync mode in this application or process.

Value: 2

RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT

Added in API level 31
static val RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT: Int

Use default value for android.R.styleable#AndroidManifestApplication_requestRawExternalStorageAccess.

Value: 0

RAW_EXTERNAL_STORAGE_ACCESS_NOT_REQUESTED

Added in API level 31
static val RAW_EXTERNAL_STORAGE_ACCESS_NOT_REQUESTED: Int

Raw external storage was not requested by this app.

Value: 2

RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED

Added in API level 31
static val RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED: Int

Raw external storage was requested by this app.

Value: 1

ZEROINIT_DEFAULT

Added in API level 31
static val ZEROINIT_DEFAULT: Int

Default (unspecified) setting of nativeHeapZeroInitialized.

Value: -1

ZEROINIT_DISABLED

Added in API level 31
static val ZEROINIT_DISABLED: Int

Disable zero-initialization of the native heap in this application or process.

Value: 0

ZEROINIT_ENABLED

Added in API level 31
static val ZEROINIT_ENABLED: Int

Enable zero-initialization of the native heap in this application or process.

Value: 1

Public constructors

ApplicationInfo

Added in API level 1
ApplicationInfo()

ApplicationInfo

Added in API level 1
ApplicationInfo(orig: ApplicationInfo!)

Public methods

areAttributionsUserVisible

Added in API level 31
open fun areAttributionsUserVisible(): Boolean

Returns whether attributions provided by the application are meant to be user-visible. Defaults to false if application info is retrieved without PackageManager.GET_ATTRIBUTIONS_LONG.

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

dump

Added in API level 1
open fun dump(
    pw: Printer!,
    prefix: String!
): Unit

getKnownActivityEmbeddingCerts

Added in API level 33
open fun getKnownActivityEmbeddingCerts(): MutableSet<String!>

Gets the trusted host certificate digests of apps that are allowed to embed activities of this application. The digests are computed using the SHA-256 digest algorithm.

Return
MutableSet<String!> This value cannot be null.

getMemtagMode

Added in API level 31
open fun getMemtagMode(): Int

Returns whether the application has requested Memtag to be enabled, disabled, or left unspecified. Processes can override this setting.

Return
Int Value is android.content.pm.ApplicationInfo#MEMTAG_DEFAULT, android.content.pm.ApplicationInfo#MEMTAG_OFF, android.content.pm.ApplicationInfo#MEMTAG_ASYNC, or android.content.pm.ApplicationInfo#MEMTAG_SYNC

getNativeHeapZeroInitialized

Added in API level 31
open fun getNativeHeapZeroInitialized(): Int

Returns whether the application has requested automatic zero-initialization of native heap memory allocations to be enabled or disabled.

Return
Int Value is android.content.pm.ApplicationInfo#ZEROINIT_DEFAULT, android.content.pm.ApplicationInfo#ZEROINIT_DISABLED, or android.content.pm.ApplicationInfo#ZEROINIT_ENABLED

getRequestRawExternalStorageAccess

Added in API level 31
open fun getRequestRawExternalStorageAccess(): Int
Return
Int Note that this doesn't give any hints on whether the app gets raw external storage access or not. Also, apps may get raw external storage access by default in some cases, see android.R.styleable#AndroidManifestApplication_requestRawExternalStorageAccess. Value is android.content.pm.ApplicationInfo#RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT, android.content.pm.ApplicationInfo#RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED, or android.content.pm.ApplicationInfo#RAW_EXTERNAL_STORAGE_ACCESS_NOT_REQUESTED

isProfileable

Added in API level 31
open fun isProfileable(): Boolean

Returns whether this application can be profiled, either by the shell user or the system.

isProfileableByShell

Added in API level 29
open fun isProfileableByShell(): Boolean

Returns whether or not this application can be profiled by the shell user, even when running on a device that is running in user mode.

isResourceOverlay

Added in API level 29
open fun isResourceOverlay(): Boolean

Returns true if the package has declared in its manifest that it is a runtime resource overlay.

isVirtualPreload

Added in API level 27
open fun isVirtualPreload(): Boolean

Returns whether or not this application was installed as a virtual preload.

loadDescription

Added in API level 1
open fun loadDescription(pm: PackageManager!): CharSequence!

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

Parameters
pm PackageManager!: A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.
Return
CharSequence! Returns a CharSequence containing the application's description. If there is no description, null is returned.

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    parcelableFlags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<ApplicationInfo!>

appComponentFactory

Added in API level 28
var appComponentFactory: String!

The factory of this package, as specified by the <manifest> tag's android.R.styleable#AndroidManifestApplication_appComponentFactory attribute.

backupAgentName

Added in API level 8
var backupAgentName: String!

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.

category

Added in API level 26
var category: Int

The category of this app. Categories are used to cluster multiple apps together into meaningful groups, such as when summarizing battery, network, or disk usage. Apps should only define this value when they fit well into one of the specific categories.

Set from the android.R.attr#appCategory attribute in the manifest. If the manifest doesn't define a category, this value may have been provided by the installer via PackageManager.setApplicationCategoryHint(String, int).
Value is android.content.pm.ApplicationInfo#CATEGORY_UNDEFINED, android.content.pm.ApplicationInfo#CATEGORY_GAME, android.content.pm.ApplicationInfo#CATEGORY_AUDIO, android.content.pm.ApplicationInfo#CATEGORY_VIDEO, android.content.pm.ApplicationInfo#CATEGORY_IMAGE, android.content.pm.ApplicationInfo#CATEGORY_SOCIAL, android.content.pm.ApplicationInfo#CATEGORY_NEWS, android.content.pm.ApplicationInfo#CATEGORY_MAPS, android.content.pm.ApplicationInfo#CATEGORY_PRODUCTIVITY, or android.content.pm.ApplicationInfo#CATEGORY_ACCESSIBILITY

className

Added in API level 1
var className: String!

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

compatibleWidthLimitDp

Added in API level 13
var compatibleWidthLimitDp: Int

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.

compileSdkVersion

Added in API level 31
var compileSdkVersion: Int

The user-visible SDK version (ex. 26) of the framework against which the application claims to have been compiled, or 0 if not specified.

This property is the compile-time equivalent of Build.VERSION.SDK_INT.

compileSdkVersionCodename

Added in API level 31
var compileSdkVersionCodename: String?

The development codename (ex. "S", "REL") of the framework against which the application claims to have been compiled, or null if not specified.

This property is the compile-time equivalent of Build.VERSION.CODENAME.

dataDir

Added in API level 1
var dataDir: String!

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

descriptionRes

Added in API level 1
var descriptionRes: Int

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

deviceProtectedDataDir

Added in API level 24
var deviceProtectedDataDir: String!

Full path to the device-protected directory assigned to the package for its persistent data.

enabled

Added in API level 1
var enabled: Boolean

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

largestWidthLimitDp

Added in API level 13
var largestWidthLimitDp: Int

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.

manageSpaceActivityName

Added in API level 1
var manageSpaceActivityName: String!

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

minSdkVersion

Added in API level 24
var minSdkVersion: Int

The minimum SDK version this application can run on. It will not run on earlier versions.

nativeLibraryDir

Added in API level 9
var nativeLibraryDir: String!

Full path to the directory where native JNI libraries are stored.

permission

Added in API level 1
var permission: String!

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

processName

Added in API level 1
var processName: String!

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

publicSourceDir

Added in API level 1
var publicSourceDir: String!

Full path to the publicly available parts of sourceDir, including resources and manifest. This may be different from sourceDir if an application is forward locked.

requiresSmallestWidthDp

Added in API level 13
var requiresSmallestWidthDp: Int

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.

sharedLibraryFiles

Added in API level 1
var sharedLibraryFiles: Array<String!>!

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.

sourceDir

Added in API level 1
var sourceDir: String!

Full path to the base APK for this application.

splitNames

Added in API level 26
var splitNames: Array<String!>?

The names of all installed split APKs, ordered lexicographically. May be null if no splits are installed.

splitPublicSourceDirs

Added in API level 21
var splitPublicSourceDirs: Array<String!>?

Full path to the publicly available parts of splitSourceDirs, including resources and manifest. This may be different from splitSourceDirs if an application is forward locked. May be null if no splits are installed.

See Also

splitSourceDirs

Added in API level 21
var splitSourceDirs: Array<String!>?

Full paths to split APKs, indexed by the same order as splitNames. May be null if no splits are installed.

storageUuid

Added in API level 26
var storageUuid: UUID!

UUID of the storage volume on which this application is being hosted. For apps hosted on the default internal storage at Environment.getDataDirectory(), the UUID value is StorageManager.UUID_DEFAULT.

targetSdkVersion

Added in API level 4
var targetSdkVersion: Int

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 android.os.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.

taskAffinity

Added in API level 1
var taskAffinity: String!

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

theme

Added in API level 1
var theme: Int

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.

uiOptions

Added in API level 14
var uiOptions: Int

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

uid

Added in API level 1
var uid: Int

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