harmony 鸿蒙ApplicationInfo

2022-12-05 浏览 (861)

ApplicationInfo

The ApplicationInfo module defines the application information. A system application can obtain its own or others' application information through bundleManager.getApplicationInfo. The input parameter appFlags specifies the information to be contained in the returned ApplicationInfo object.

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

NameTypeReadableWritableDescription
namestringYesNoApplication name.
descriptionstringYesNoDescription of the application, for example, "description": $string: mainability_description".
descriptionIdnumberYesNoID of the application description.
enabledbooleanYesNoWhether the application is enabled. The default value is true.
labelstringYesNoApplication name, for example, "label": "$string: mainability_description".
labelIdnumberYesNoID of the application label.
iconstringYesNoApplication icon, for example, "icon": "$media:icon".
iconIdnumberYesNoID of the application icon.
processstringYesNoProcess in which the application runs. If this parameter is not set, the bundle name is used.
permissionsArray<string>YesNoPermissions 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.
codePathstringYesNoInstallation directory of the application.
metadata(deprecated)Map<string, Array<Metadata>>YesNoMetadata of the application. The information can be obtained by passing in GET_APPLICATION_INFO_WITH_METADATA to the appFlags parameter of bundleManager.getApplicationInfo. NOTE
This field is deprecated since API version 10. You are advised to use metadataArray instead.
metadataArray10+Array<ModuleMetadata>YesNoMetadata of the application. The information can be obtained by passing in GET_APPLICATION_INFO_WITH_METADATA to the appFlags parameter of bundleManager.getApplicationInfo.
removablebooleanYesNoWhether the application is removable.
accessTokenIdnumberYesNoAccess token ID of the application.
uidnumberYesNoUID of the application.
iconResourceResourceYesNoResource 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 to obtain the resource details.
labelResourceResourceYesNoResource 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 to obtain the resource details.
descriptionResourceResourceYesNoResource 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 to obtain the resource details.
appDistributionTypestringYesNoDistribution type of the application signing certificate. The options are app_gallery, enterprise, os_integration, and crowdtesting.
appProvisionTypestringYesNoType of the application signing certificate file. The options are debug and release.
systemAppbooleanYesNoWhether the application is a system application.
bundleTypeBundleTypeYesNoBundle type, which can be APP (common application) or ATOMIC_SERVICE (atomic service).
debug10+booleanYesNoWhether the application is in debugging mode. The default value is false.

ModuleMetadata10+

Describes the metadata of a module.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
moduleName10+stringYesNoModule name.
metadata10+Array<Metadata>YesNoMetadata list of the module.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/fe617ec62e354a98968bce9c5ef9f4e8