• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ApplicationInfo
2
3The **ApplicationInfo** module defines the application information. A system application can obtain its own or others' application information through [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo). The input parameter [appFlags](js-apis-bundleManager.md#applicationflag) specifies the information to be contained in the returned [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) object.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## ApplicationInfo
10
11**System capability**: SystemCapability.BundleManager.BundleFramework.Core
12| Name                      | Type                                                        | Readable| Writable| Description                                                        |
13| -------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
14| name                       | string                                                       | Yes  | No  | Application name.                                                |
15| description                | string                                                       | Yes  | No  | Description of the application, for example, "description": $string: mainability_description".                                                |
16| descriptionId              | number                                                       | Yes  | No  | ID of the application description.                                              |
17| enabled                    | boolean                                                      | Yes  | No  | Whether the application is enabled. The default value is **true**.                          |
18| label                      | string                                                       | Yes  | No  | Application name, for example, "label": "$string: mainability_description".|
19| labelId                    | number                                                       | Yes  | No  | ID of the application label.                                              |
20| icon                       | string                                                       | Yes  | No  | Application icon, for example, "icon": "$media:icon".                                                |
21| iconId                     | number                                                       | Yes  | No  | ID of the application icon.                                              |
22| process                    | string                                                       | Yes  | No  | Process in which the application runs. If this parameter is not set, the bundle name is used.                  |
23| permissions                | Array\<string>                                               | Yes  | No  | Permissions required for accessing the application. The permissions can be obtained by passing in **GET_APPLICATION_INFO_WITH_PERMISSION** to the **appFlags** parameter of [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo).|
24| codePath                   | string                                                       | Yes  | No  | Installation directory of the application.                                            |
25| metadata                   | Map\<string, Array\<[Metadata](js-apis-bundleManager-metadata.md)>> | Yes  | No  | Metadata of the application. The information can be obtained by passing in **GET_APPLICATION_INFO_WITH_METADATA** to the **appFlags** parameter of [bundleManager.getApplicationInfo](js-apis-bundleManager.md#bundlemanagergetapplicationinfo).|
26| removable                  | boolean                                                      | Yes  | No  | Whether the application is removable.                                        |
27| accessTokenId             | number                                                       | Yes  | No  | Access token ID of the application.                                     |
28| uid                       | number                                                       | Yes  | No  | UID of the application.                                               |
29| iconResource              | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application icon. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details.                    |
30| labelResource             | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application label. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details.                        |
31| descriptionResource       | [Resource](js-apis-resource-manager.md#resource9) | Yes| No| Resource information of the application description. The resource information obtained contains the bundle name, module name, and ID of the resource. You can call **getMediaContent** in [@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts) to obtain the resource details.|
32| appDistributionType       | string                                                       | Yes  | No  | Distribution type of the application signing certificate. The options are **app_gallery**, **enterprise**, **os_integration**, and **crowdtesting**.   |
33| appProvisionType          | string                                                       | Yes  | No  | Type of the application signing certificate file. The options are **debug** and **release**.          |
34| systemApp          | boolean                                                       | Yes  | No  | Whether the application is a system application.          |
35| bundleType                |[BundleType](js-apis-bundleManager.md#bundletype)             | Yes  | No  | Bundle type, which can be **APP** (common application) or **ATOMIC_SERVICE** (atomic service).                               |
36