harmony 鸿蒙AbilityInfo

2022-12-05 浏览 (821)

AbilityInfo

The AbilityInfo module defines the ability information. A system application can obtain the ability information through bundleManager.queryAbilityInfo. The input parameter abilityFlags specifies the information to be contained in the returned AbilityInfo 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.

AbilityInfo

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
bundleNamestringYesNoBundle name.
moduleNamestringYesNoName of the HAP file to which the ability belongs.
namestringYesNoAbility name.
labelstringYesNoResource descriptor of the ability name visible to users. Example: "label": "$string: mainability_description".
labelIdnumberYesNoID of the ability label.
descriptionstringYesNoAbility description.
descriptionIdnumberYesNoID of the ability description.
iconstringYesNoResource descriptor of the ability icon. Example: "icon": "$media:icon".
iconIdnumberYesNoID of the ability icon.
processstringYesNoProcess in which the ability runs. If this parameter is not set, the bundle name is used.
exportedbooleanYesNoWhether the ability can be called by other bundles.
typeAbilityTypeYesNoAbility type.
This attribute can be used only in the FA model.
orientationDisplayOrientationYesNoAbility display orientation.
launchTypeLaunchTypeYesNoAbility launch mode.
permissionsArray<string>YesNoPermissions required for other applications to call the ability. The permissions can be obtained by passing in GET_ABILITY_INFO_WITH_PERMISSION to the abilityFlags parameter of bundleManager.queryAbilityInfo.
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.
uristringYesNoURI of the ability.
This attribute can be used only in the FA model.
deviceTypesArray<string>YesNoDevice types supported by the ability.
applicationInfoApplicationInfoYesNoApplication information. The information can be obtained by passing in GET_ABILITY_INFO_WITH_APPLICATION to the abilityFlags parameter of bundleManager.queryAbilityInfo.
metadataArray<Metadata>YesNoMetadata of the ability. The information can be obtained by passing in GET_ABILITY_INFO_WITH_METADATA to the abilityFlags parameter of bundleManager.queryAbilityInfo.
enabledbooleanYesNoWhether the ability is enabled.
supportWindowModesArray<SupportWindowMode>YesNoWindow modes supported by the ability.
windowSizeWindowSizeYesNoWindow size.

WindowSize

Describes the window size.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
maxWindowRationumberYesNoMaximum aspect ratio of the window in free window mode. The value ranges from 0 to 1.
minWindowRationumberYesNoMinimum aspect ratio of the window in free window mode. The value ranges from 0 to 1.
maxWindowWidthnumberYesNoMaximum width of the window in free window mode. The unit is vp.
minWindowWidthnumberYesNoMinimum width of the window in free window mode. The unit is vp.
maxWindowHeightnumberYesNoMaximum height of the window in free window mode. The unit is vp.
minWindowHeightnumberYesNoMinimum height of the window in free window mode. The unit is vp.

你可能感兴趣的鸿蒙文章

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/15c0ab6be8324a8db1ea37a9f5f7b681