harmony 鸿蒙shortcutInfo

  • 2022-10-28
  • 浏览 (409)

shortcutInfo

The shortcutInfo module defines shortcut information configured in the configuration file. For the FA model, the shortcut information is configured in the config.json file. For the stage model, the information is configured in the configuration file under resources/base/profile in the development view.

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.

ShortcutWant(deprecated)

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

System capability: SystemCapability.BundleManager.BundleFramework

System API: This is a system API and cannot be called by third-party applications.

Name Type Readable Writable Description
targetBundle string Yes No Target bundle of the shortcut.
targetClass string Yes No Target class required by the shortcut.

ShortcutInfo(deprecated)

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

System capability: SystemCapability.BundleManager.BundleFramework

Name Type Readable Writable Description
id string Yes No ID of the application to which the shortcut belongs.
bundleName string Yes No Name of the bundle that contains the shortcut.
hostAbility string Yes No Local ability information of the shortcut.
icon string Yes No Icon of the shortcut.
iconId8+ number Yes No Icon ID of the shortcut.
label string Yes No Name of the shortcut.
labelId8+ number Yes No Name ID of the shortcut.
disableMessage string Yes No Message displayed when the shortcut is disabled.
wants Array<ShortcutWant> Yes No Want list for the shortcut.
isStatic boolean Yes No Whether the shortcut is static.
isHomeShortcut boolean Yes No Whether the shortcut is a home shortcut.
isEnabled boolean Yes No Whether the shortcut 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)

0  赞