ApplicationInfo
The ApplicationInfo module defines the application information. A third-party application can obtain its own application information through bundleManager.getBundleInfoForSelf, with GET_BUNDLE_INFO_WITH_APPLICATION passed in to for bundleFlags.
NOTE
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.
ApplicationInfo
System capability: SystemCapability.BundleManager.BundleFramework.Core
Name | Type | Readable | Writable | Description |
---|---|---|---|---|
name | string | Yes | No | Application name. |
description | string | Yes | No | Description of the application, for example, "description": $string: mainability_description". For details, see the description of the descriptionResource field below. |
descriptionId | number | Yes | No | ID of the application description. |
enabled | boolean | Yes | No | Whether the application is enabled. The default value is true. |
label | string | Yes | No | Application name, for example, "label": "$string: mainability_description". For details, see the description of the labelResource field below. |
labelId | number | Yes | No | ID of the application label. |
icon | string | Yes | No | Application icon, for example, "icon": "$media:icon". For details, see the description of the iconResource field below. |
iconId | number | Yes | No | ID of the application icon. |
process | string | Yes | No | Process in which the application runs. If this parameter is not set, the bundle name is used. |
permissions | Array<string> | Yes | No | Permissions required for accessing the application. The permissions can be obtained by passing in GET_BUNDLE_INFO_WITH_APPLICATION and GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION to the bundleFlags parameter of getBundleInfoForSelf. |
codePath | string | Yes | No | Installation directory of the application. |
metadata(deprecated) | Map<string, Array<Metadata>> | Yes | No | Metadata of the application. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_APPLICATION and GET_BUNDLE_INFO_WITH_METADATA to the bundleFlags parameter of getBundleInfoForSelf. NOTE This field is deprecated since API version 10. You are advised to use metadataArray instead. |
metadataArray10+ | Array<ModuleMetadata> | Yes | No | Metadata of the application. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_APPLICATION and GET_BUNDLE_INFO_WITH_METADATA to the bundleFlags parameter of getBundleInfoForSelf. |
removable | boolean | Yes | No | Whether the application is removable. |
accessTokenId | number | Yes | No | Access token ID of the application. |
uid | number | Yes | No | UID of the application. |
iconResource | Resource | 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 to obtain the resource details. |
labelResource | Resource | 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 to obtain the resource details. |
descriptionResource | Resource | 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 to obtain the resource details. |
appDistributionType | string | Yes | No | Distribution type of the application signing certificate. The options are app_gallery, enterprise, os_integration, and crowdtesting. |
appProvisionType | string | Yes | No | Type of the application signing certificate file. The options are debug and release. |
systemApp | boolean | Yes | No | Whether the application is a system application. |
bundleType | BundleType | Yes | No | Bundle type, which can be APP (application) or ATOMIC_SERVICE (atomic service). |
debug10+ | boolean | Yes | No | Whether the application is in debugging mode. The default value is false. |
dataUnclearable11+ | boolean | Yes | No | Whether the application data is unclearable. The value true means that the application data is unclearable, and false means the opposite. The default value is false. |
ModuleMetadata10+
Describes the metadata of a module.
System capability: SystemCapability.BundleManager.BundleFramework.Core
Name | Type | Readable | Writable | Description |
---|---|---|---|---|
moduleName10+ | string | Yes | No | Module name. |
metadata10+ | Array<Metadata> | Yes | No | Metadata list of the module. |