harmony 鸿蒙AbilityInfo

2022-08-09 浏览 (918)

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.

AbilityInfo(deprecated)

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

System capability: SystemCapability.BundleManager.BundleFramework

NameTypeReadableWritableDescription
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 in which the ability runs. If this parameter is not set, the bundle name is used.
targetAbilitystringYesNoTarget ability that the ability alias points to.
This attribute can be used only in the FA model.
backgroundModesnumberYesNoBackground service mode of the ability.
This attribute can be used only in the FA model.
isVisiblebooleanYesNoWhether the ability can be called by other bundles.
formEnabledbooleanYesNoWhether the ability provides the service widget capability.
This attribute can be used only in the FA model.
typeAbilityTypeYesNoAbility type.
This attribute can be used only in the FA model.
orientationDisplayOrientationYesNoAbility display orientation.
launchModeLaunchModeYesNoAbility 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.
This attribute can be used only in the FA model.
writePermissionstringYesNoPermission required for writing data to the ability.
This attribute 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.
This attribute can be used only in the FA model.
labelIdnumberYesNoID of the ability label.
subTypeAbilitySubTypeYesNoSubtype of the template that can be used by the ability.
This attribute 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.

你可能感兴趣的鸿蒙文章

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