• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# wantConstant
2
3
4> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
5> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
6
7
8## Modules to Import
9
10```
11import wantConstant from '@ohos.ability.wantConstant'
12```
13
14
15## wantConstant.Action
16
17**System capability**: SystemCapability.Ability.AbilityBase
18
19Lists the permissions.
20
21| Common Event Macro     | Common Event Name         | Subscriber Permission    |
22| ------------ | ------------------ | ---------------------- |
23| ACTION_HOME                                 | ohos.want.action.home                    | None                                                          |
24| ACTION_DIAL                                 | ohos.want.action.dial                    | None                                                          |
25| ACTION_SEARCH                               | ohos.want.action.search                  | None                                                          |
26| ACTION_WIRELESS_SETTINGS                    | ohos.settings.wireless                   | None                                                          |
27| ACTION_MANAGE_APPLICATIONS_SETTINGS         | ohos.settings.manage.applications        | None                                                          |
28| ACTION_APPLICATION_DETAILS_SETTINGS         | ohos.settings.application.details        | None                                                          |
29| ACTION_SET_ALARM                            | ohos.want.action.setAlarm                | None                                                          |
30| ACTION_SHOW_ALARMS                          | ohos.want.action.showAlarms              | None                                                          |
31| ACTION_SNOOZE_ALARM                         | ohos.want.action.snoozeAlarm             | None                                                          |
32| ACTION_DISMISS_ALARM                        | ohos.want.action.dismissAlarm            | None                                                          |
33| ACTION_DISMISS_TIMER                        | ohos.want.action.dismissTimer            | None                                                          |
34|  ACTION_SEND_SMS                            | ohos.want.action.sendSms                 | None                                                          |
35| ACTION_CHOOSE                               | ohos.want.action.choose                  | None                                                          |
36| ACTION_IMAGE_CAPTURE<sup>8+</sup>           | ohos.want.action.imageCapture            | None                                                          |
37| ACTION_VIDEO_CAPTUR<sup>8+</sup>            | ohos.want.action.videoCapture            | None                                                          |
38| ACTION_SELECT                               | ohos.want.action.select                  | None                                                          |
39| ACTION_SEND_DATA                            | ohos.want.action.sendData                | None                                                          |
40| ACTION_SEND_MULTIPLE_DATA                   | ohos.want.action.sendMultipleData        | None                                                          |
41| ACTION_SCAN_MEDIA_FILE                      | ohos.want.action.scanMediaFile           | None                                                          |
42| ACTION_VIEW_DATA                            | ohos.want.action.viewData                | None                                                          |
43|  ACTION_EDIT_DATA                           | ohos.want.action.editData                | None                                                          |
44|  INTENT_PARAMS_INTENT                       | ability.want.params.INTENT               | None                                                          |
45|  INTENT_PARAMS_TITLE                        | ability.want.params.TITLE                | None                                                          |
46|  ACTION_FILE_SELECT<sup>7+</sup>            | ohos.action.fileSelect                   | None                                                          |
47|  PARAMS_STREAM<sup>7+</sup>                 | ability.params.stream                    | None                                                          |
48|  ACTION_APP_ACCOUNT_OAUTH <sup>8+</sup>     | ohos.account.appAccount.action.oauth     | None                                                          |
49
50
51## wantConstant.Entity
52
53**System capability**: SystemCapability.Ability.AbilityBase
54
55Lists the permissions.
56
57| Common Event Macro     | Common Event Name         | Subscriber Permission    |
58| ------------ | ------------------ | ---------------------- |
59| ENTITY_DEFAULT                             | entity.system.default                    | None                                                          |
60| ENTITY_HOME                                | entity.system.homel                      | None                                                          |
61| ENTITY_VOICE                               | ENTITY_VOICE                             | None                                                          |
62| ENTITY_BROWSABLE                           | entity.system.browsable                  | None                                                          |
63| ENTITY_VIDEO                               | entity.system.video                      | None                                                          |
64| ACTION_APPLICATION_DETAILS_SETTINGS        | ohos.settings.application.details        | None                                                          |
65
66
67## flags
68
69**System capability**: SystemCapability.Ability.AbilityBase
70
71| Name                                | Value      | Description                                                        |
72| ------------------------------------ | ---------- | ------------------------------------------------------------ |
73| FLAG_AUTH_READ_URI_PERMISSION        | 0x00000001 | Indicates the permission to read the URI.                                 |
74| FLAG_AUTH_WRITE_URI_PERMISSION       | 0x00000002 | Indicates the permission to write the URI.                                 |
75| FLAG_ABILITY_FORWARD_RESULT          | 0x00000004 | Returns the result to the ability.                                          |
76| FLAG_ABILITY_CONTINUATION            | 0x00000008 | Indicates whether the ability on the local device can be continued on a remote device.                  |
77| FLAG_NOT_OHOS_COMPONENT              | 0x00000010 | Indicates that a component does not belong to OHOS.                                        |
78| FLAG_ABILITY_FORM_ENABLED            | 0x00000020 | Indicates that an ability is enabled.                                         |
79| FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 0x00000040 | Indicates the permission to make the URI persistent.                                    |
80| FLAG_AUTH_PREFIX_URI_PERMISSION      | 0x00000080 | Indicates the permission to verify URIs by prefix matching.                                |
81| FLAG_ABILITYSLICE_MULTI_DEVICE       | 0x00000100 | Supports cross-device startup in a distributed scheduler.                              |
82| FLAG_START_FOREGROUND_ABILITY        | 0x00000200 | Indicates that the Service ability is started regardless of whether the host application has been started.        |
83| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | Indicates that ability continuation is reversible.                                            |
84| FLAG_INSTALL_ON_DEMAND               | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed.                             |
85| FLAG_INSTALL_WITH_BACKGROUND_MODE    | 0x80000000 | Indicates that the specific ability will be installed in the background if it has not been installed.                             |
86| FLAG_ABILITY_CLEAR_MISSION           | 0x00008000 | Clears other operation missions. This flag can be set for the **Want** object in the **startAbility** API passed to [ohos.app.Context](js-apis-ability-context.md) and must be used together with **flag_ABILITY_NEW_MISSION**.|
87| FLAG_ABILITY_NEW_MISSION             | 0x10000000 | Indicates the operation of creating a mission on the history mission stack.                              |
88| FLAG_ABILITY_MISSION_TOP             | 0x20000000 | Starts the mission on the top of the existing mission stack; creates an ability instance if no mission exists.|
89