harmony 鸿蒙ShortcutInfo (System API)

2025-06-12 浏览 (1)

ShortcutInfo (System API)

The ShortcutInfo module defines shortcut information configured in the configuration file. The information can be obtained through getShortcutInfo.

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.

For the FA model, the shortcut information is configured in the config.json file. For details about the shortcut information in the stage model, see shortcuts.

The APIs provided by this module are system APIs.

ShortcutWant

System capability: SystemCapability.BundleManager.BundleFramework.Launcher

System API: This is a system API.

NameTypeRead-OnlyOptionalDescription
targetBundlestringYesNoTarget bundle name of the shortcut.
targetModulestringYesYesTarget module name of the shortcut.
targetAbilitystringYesNoTarget ability name of the shortcut.
parameters12+Array<ParameterItem>NoYesCustom data in the shortcut configuration.

ShortcutInfo

System capability: SystemCapability.BundleManager.BundleFramework.Launcher

System API: This is a system API.

NameTypeRead-OnlyOptionalDescription
idstringYesNoID of the application to which the shortcut belongs.
bundleNamestringYesNoName of the bundle that contains the shortcut.
moduleNamestringYesYesModule name of the shortcut.
hostAbilitystringYesYesLocal ability name of the shortcut.
iconstringYesYesIcon of the shortcut.
iconIdnumberYesYesID of the shortcut icon.
labelstringYesYesLabel of the shortcut.
labelIdnumberYesYesID of the shortcut label.
wantsArray<ShortcutWant>YesYesWant information required for the shortcut.
appIndex12+numberNoNoIndex of an application clone.
sourceType12+numberNoNoShortcut source type. The value 0 means a custom shortcut, and 1 means a static shortcut.

ParameterItem12+

Describes the custom data in the shortcut configuration.

System capability: SystemCapability.BundleManager.BundleFramework.Launcher

NameTypeRead-OnlyOptionalDescription
keystringNoNoKey of the custom data.
valuestringNoNoValue of the custom data.

你可能感兴趣的鸿蒙文章

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