openharmony 鸿蒙 js-apis-bundleManager-extensionAbilityInfo

2025-06-12 浏览 (1)

ExtensionAbilityInfo

The ExtensionAbilityInfo module defines the ExtensionAbility information. An application can obtain its own ExtensionAbility information through bundleManager.getBundleInfoForSelf, with GET_BUNDLE_INFO_WITH_HAP_MODULE and GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY passed in to 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.

ExtensionAbilityInfo

Atomic service API: This API can be used in atomic services since API version 11.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeRead-OnlyOptionalDescription
bundleNamestringYesNoBundle name.
moduleNamestringYesNoName of the HAP file to which the ExtensionAbility belongs.
namestringYesNoName of the ExtensionAbility.
labelIdnumberYesNoID of the ExtensionAbility label.
descriptionIdnumberYesNoID of the ExtensionAbility description.
iconIdnumberYesNoID of the ExtensionAbility icon.
exportedbooleanYesNoWhether the ExtensionAbility can be called by other applications. The value true means that the ExtensionAbility can be called by other applications, and false means the opposite.
extensionAbilityTypeExtensionAbilityTypeYesNoType of the ExtensionAbility.
permissionsArray<string>YesNoPermissions required for other bundles to call the ExtensionAbility.
applicationInfoApplicationInfoYesNoApplication information. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY, and GET_BUNDLE_INFO_WITH_APPLICATION to the bundleFlags parameter of getBundleInfoForSelf.
metadataArray<Metadata>YesNoMetadata of the ExtensionAbility. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY, and GET_BUNDLE_INFO_WITH_METADATA to the bundleFlags parameter of getBundleInfoForSelf.
enabledbooleanYesNoWhether the ExtensionAbility is enabled. The value true means that the ExtensionAbility is enabled, and false means the opposite.
readPermissionstringYesNoPermission required for reading data from the ExtensionAbility.
writePermissionstringYesNoPermission required for writing data to the ExtensionAbility.
extensionAbilityTypeName11+stringYesNoType of the ExtensionAbility. For details about available values, see the type field under the extensionabilities tag.
skills12+Array<Skill>YesNoSkills of the ExtensionAbility.
appIndex12+numberYesNoIndex of an application clone. It takes effect only for cloned applications.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Ability Kit

harmony 鸿蒙AbilityAccessControl

harmony 鸿蒙AbilityBase

harmony 鸿蒙AbilityBase_Element

harmony 鸿蒙AbilityRuntime

harmony 鸿蒙bundle

harmony 鸿蒙OH_NativeBundle_ApplicationInfo

harmony 鸿蒙OH_NativeBundle_ElementName

harmony 鸿蒙ability_access_control.h

harmony 鸿蒙ability_base_common.h

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