harmony 鸿蒙@ohos.app.ability.wantConstant (wantConstant)

2022-12-22 浏览 (841)

@ohos.app.ability.wantConstant (wantConstant)

The wantConstant module provides the actions, entities, and flags used in Want objects.

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.

Modules to Import

import wantConstant from '@ohos.app.ability.wantConstant';

wantConstant.Params

Defines Params (specifying the action that can be performed) in the Want.

System capability: SystemCapability.Ability.AbilityBase

NameValueDescription
DLP_PARAMS_SANDBOXohos.dlp.params.sandboxAction of obtaining the sandbox flag.
System API: This is a system API and cannot be called by third-party applications.
DLP_PARAMS_BUNDLE_NAMEohos.dlp.params.bundleNameAction of obtaining the DLP bundle name.
System API: This is a system API and cannot be called by third-party applications.
DLP_PARAMS_MODULE_NAMEohos.dlp.params.moduleNameAction of obtaining the DLP module name.
System API: This is a system API and cannot be called by third-party applications.
DLP_PARAMS_ABILITY_NAMEohos.dlp.params.abilityNameAction of obtaining the DLP ability name.
System API: This is a system API and cannot be called by third-party applications.
DLP_PARAMS_INDEXohos.dlp.params.indexAction of obtaining the DLP index.
System API: This is a system API and cannot be called by third-party applications.
ABILITY_BACK_TO_OTHER_MISSION_STACKability.params.backToOtherMissionStackWhether to support redirection back across mission stacks.
ABILITY_RECOVERY_RESTART10+ohos.ability.params.abilityRecoveryRestartAction of recovering an ability from a fault and restarting it.
CONTENT_TITLE_KEY10+ohos.extra.param.key.contentTitleAction of sharing the content title.
SHARE_ABSTRACT_KEY10+ohos.extra.param.key.shareAbstractAction of sharing the abstract.
SHARE_URL_KEY10+ohos.extra.param.key.shareUrlAction of sharing the URL.
SUPPORT_CONTINUE_PAGE_STACK_KEY10+ohos.extra.param.key.supportContinuePageStackWhether to migrate page stack information during cross-device migration. The default value is true, indicating that page stack information is automatically migrated.
SUPPORT_CONTINUE_SOURCE_EXIT_KEY10+ohos.extra.param.key.supportContinueSourceExitWhether to exit the application on the source device during cross-device migration. The default value is true, indicating that the application on the source device automatically exits.

wantConstant.Flags

Enumerates the flags that specify how the Want will be handled.

System capability: SystemCapability.Ability.AbilityBase

NameValueDescription
FLAG_AUTH_READ_URI_PERMISSION0x00000001Indicates the permission to read the URI.
FLAG_AUTH_WRITE_URI_PERMISSION0x00000002Indicates the permission to write data to the URI.
FLAG_AUTH_PERSISTABLE_URI_PERMISSION10+0x00000040Indicates the permanent permission of the URI. This flag is valid only for PC applications.
System API: This is a system API and cannot be called by third-party applications.
If this flag is used together with FLAG_AUTH_READ_URI_PERMISSION, the permanent read permission is granted.
If this flag is used together with FLAG_AUTH_WRITE_URI_PERMISSION, the permanent write permission is granted.
The flag takes effect only when the PERMISSION_PROXY_AUTHORIZATION_URI permission is configured for the application.
FLAG_INSTALL_ON_DEMAND0x00000800Indicates that the specific ability will be installed if it has not been installed.

你可能感兴趣的鸿蒙文章

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/6075426688ea4e8aaaf97efcfca60d05