• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.app.ability.wantConstant (wantConstant)
2
3The **wantConstant** module provides the actions, entities, and flags used in **Want** objects.
4
5> **NOTE**
6>
7> 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.
8
9## Modules to Import
10
11```ts
12import wantConstant from '@ohos.app.ability.wantConstant';
13```
14
15## wantConstant.Params
16
17Enumerates the action constants of the **Want** object. **action** specifies the operation to execute.
18
19**System capability**: SystemCapability.Ability.AbilityBase
20
21| Name     | Value         | Description    |
22| ------------ | ------------------ | ---------------------- |
23|   DLP_PARAMS_SANDBOX    |ohos.dlp.params.sandbox  | Action of obtaining the sandbox flag.<br>**System API**: This is a system API and cannot be called by third-party applications. |
24|   DLP_PARAMS_BUNDLE_NAME    |ohos.dlp.params.bundleName  |Action of obtaining the DLP bundle name.<br>**System API**: This is a system API and cannot be called by third-party applications. |
25|   DLP_PARAMS_MODULE_NAME    |ohos.dlp.params.moduleName      |Action of obtaining the DLP module name.<br>**System API**: This is a system API and cannot be called by third-party applications. |
26|   DLP_PARAMS_ABILITY_NAME   |ohos.dlp.params.abilityName      |Action of obtaining the DLP ability name.<br>**System API**: This is a system API and cannot be called by third-party applications. |
27|   DLP_PARAMS_INDEX    |ohos.dlp.params.index      |Action of obtaining the DLP index.<br>**System API**: This is a system API and cannot be called by third-party applications. |
28|   ABILITY_BACK_TO_OTHER_MISSION_STACK    |ability.params.backToOtherMissionStack      |Action of returning the ability to the mission stack.  |
29
30## wantConstant.Flags
31
32 Enumerates the flags that specify how the Want will be handled.
33
34**System capability**: SystemCapability.Ability.AbilityBase
35
36| Name                                | Value      | Description                                                        |
37| ------------------------------------ | ---------- | ------------------------------------------------------------ |
38| FLAG_AUTH_READ_URI_PERMISSION        | 0x00000001 | Indicates the permission to read the URI.                                 |
39| FLAG_AUTH_WRITE_URI_PERMISSION       | 0x00000002 | Indicates the permission to write data to the URI.                                 |
40| FLAG_INSTALL_ON_DEMAND               | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed.                              |
41