openharmony 鸿蒙 js-apis-bundle-AbilityInfo

2025-06-12 浏览 (1)

AbilityInfo

The AbilityInfo module provides information about an ability. Unless otherwise specified, the information is obtained through bundle.getAbilityInfo.

NOTE

The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.

The APIs of this module are deprecated since API version 9. You are advised to use bundleManager-AbilityInfo instead.

AbilityInfo(deprecated)

This API is deprecated since API version 9. You are advised to use bundleManager-AbilityInfo instead.

System capability: SystemCapability.BundleManager.BundleFramework

NameTypeRead-OnlyOptionalDescription
bundleNamestringYesNoBundle name.
namestringYesNoAbility name.
labelstringYesNoAbility name visible to users.
descriptionstringYesNoAbility description.
iconstringYesNoIndex of the ability icon resource file.
descriptionIdnumberYesNoID of the ability description.
iconIdnumberYesNoID of the ability icon.
moduleNamestringYesNoName of the HAP file to which the ability belongs.
processstringYesNoProcess name of the ability.
targetAbilitystringYesNoTarget ability that the ability alias points to.
Model restriction: This API can be used only in the FA model.
backgroundModesnumberYesNoBackground service mode of the ability.
Model restriction: This API can be used only in the FA model.
isVisiblebooleanYesNoWhether the ability can be called by other applications. The value true means that the ability can be called by other applications, and false means the opposite.
formEnabledbooleanYesNoWhether the ability provides the service widget capability. The value true means that the ability provides the service widget capability, and false means the opposite.
Model restriction: This API can be used only in the FA model.
typebundle.AbilityTypeYesNoAbility type.
Model restriction: This API can be used only in the FA model.
orientationbundle.DisplayOrientationYesNoAbility display orientation.
launchModebundle.LaunchModeYesNoAbility launch mode.
permissionsArray<string>YesNoPermissions required for other applications to call the ability.
The value is obtained by passing in GET_ABILITY_INFO_WITH_PERMISSION to bundle.getAbilityInfo.
deviceTypesArray<string>YesNoDevice types supported by the ability.
deviceCapabilitiesArray<string>YesNoDevice capabilities required for the ability.
readPermissionstringYesNoPermission required for reading the ability data.
Model restriction: This API can be used only in the FA model.
writePermissionstringYesNoPermission required for writing data to the ability.
Model restriction: This API can be used only in the FA model.
applicationInfoApplicationInfoYesNoApplication configuration information.
The value is obtained by passing in GET_ABILITY_INFO_WITH_APPLICATION to bundle.getAbilityInfo.
uristringYesNoURI of the ability.
Model restriction: This API can be used only in the FA model.
labelIdnumberYesNoID of the ability label.
subTypebundle.AbilitySubTypeYesNoSubtype of the template that can be used by the ability.
Model restriction: This API can be used only in the FA model.
metaData8+Array<CustomizeData>YesNoMetadata of the ability.
The value is obtained by passing in GET_ABILITY_INFO_WITH_METADATA to bundle.getAbilityInfo.
enabled8+booleanYesNoWhether the ability is enabled. The value true means that the ability is enabled, and false means the opposite.

你可能感兴趣的鸿蒙文章

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/zgapXK