From 0dc1c52cd48b814fa9ac8bd1e256c2ad53eac6cb Mon Sep 17 00:00:00 2001 From: wusongqing Date: Sat, 25 Jun 2022 16:16:00 +0800 Subject: [PATCH] update docs against 5358 Signed-off-by: wusongqing --- .../reference/apis/js-apis-DataUriUtils.md | 3 +- .../reference/apis/js-apis-ability-context.md | 8 +- .../apis/js-apis-ability-errorCode.md | 17 ++- .../apis/js-apis-ability-wantConstant.md | 102 +++++++++--------- .../apis/js-apis-abilityDelegatorRegistry.md | 31 +++--- .../apis/js-apis-abilityrunninginfo.md | 8 +- .../apis/js-apis-abilitystagecontext.md | 11 +- .../apis/js-apis-application-StartOptions.md | 15 ++- .../js-apis-application-abilityConstant.md | 50 +++++---- .../js-apis-application-abilityDelegator.md | 6 +- ...s-apis-application-abilityDelegatorArgs.md | 6 +- ...is-application-abilityLifecycleCallback.md | 12 ++- .../js-apis-application-abilityMonitor.md | 6 +- .../apis/js-apis-application-abilitystage.md | 11 +- .../apis/js-apis-application-missionInfo.md | 4 +- .../js-apis-application-shellCmdResult.md | 6 +- ...cation-staticSubscriberExtensionAbility.md | 12 +-- .../reference/apis/js-apis-appmanager.md | 39 +++---- .../reference/apis/js-apis-configuration.md | 19 ++-- .../apis/js-apis-configurationconstant.md | 35 +++--- .../apis/js-apis-extension-context.md | 6 +- .../reference/apis/js-apis-formInfo.md | 3 +- .../reference/apis/js-apis-formerror.md | 3 +- .../reference/apis/js-apis-missionManager.md | 4 +- .../reference/apis/js-apis-particleAbility.md | 8 +- .../apis/js-apis-permissionrequestresult.md | 4 +- .../apis/js-apis-service-extension-ability.md | 46 ++++---- .../reference/apis/js-apis-testRunner.md | 6 +- 28 files changed, 236 insertions(+), 245 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-DataUriUtils.md b/en/application-dev/reference/apis/js-apis-DataUriUtils.md index 345eaa8b09..584b7e1285 100644 --- a/en/application-dev/reference/apis/js-apis-DataUriUtils.md +++ b/en/application-dev/reference/apis/js-apis-DataUriUtils.md @@ -1,6 +1,7 @@ # DataUriUtils Module -> **NOTE**
+> **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. ## Modules to Import diff --git a/en/application-dev/reference/apis/js-apis-ability-context.md b/en/application-dev/reference/apis/js-apis-ability-context.md index 2b1fdce8a9..b858d93cbd 100644 --- a/en/application-dev/reference/apis/js-apis-ability-context.md +++ b/en/application-dev/reference/apis/js-apis-ability-context.md @@ -78,7 +78,7 @@ Starts an ability. This API uses a callback to return the result. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | Yes| Information about the **Want** used for starting an ability.| -| options | StartOptions | Yes| Parameters used for starting the ability.| +| options | [StartOptions](js-apis-application-StartOptions.md) | Yes| Parameters used for starting the ability.| | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -111,7 +111,7 @@ Starts an ability. This API uses a promise to return the result. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | Yes| Information about the **Want** used for starting an ability.| -| options | StartOptions | No| Parameters used for starting the ability.| +| options | [StartOptions](js-apis-application-StartOptions.md) | No| Parameters used for starting the ability.| **Return value** @@ -180,7 +180,7 @@ Starts an ability. This API uses a callback to return the result when the abilit | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want |[Want](js-apis-application-Want.md) | Yes| Information about the **Want** used for starting an ability.| -| options | StartOptions | Yes| Parameters used for starting the ability.| +| options | [StartOptions](js-apis-application-StartOptions.md) | Yes| Parameters used for starting the ability.| | callback | AsyncCallback<[AbilityResult](js-apis-featureAbility.md#abilityresult)> | Yes| Callback used to return the result.| @@ -213,7 +213,7 @@ Starts an ability. This API uses a promise to return the result when the ability | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | Yes| Information about the **Want** used for starting an ability.| -| options | StartOptions | No| Parameters used for starting the ability.| +| options | [StartOptions](js-apis-application-StartOptions.md) | No| Parameters used for starting the ability.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-ability-errorCode.md b/en/application-dev/reference/apis/js-apis-ability-errorCode.md index d882c9b5ce..cc0197f022 100644 --- a/en/application-dev/reference/apis/js-apis-ability-errorCode.md +++ b/en/application-dev/reference/apis/js-apis-ability-errorCode.md @@ -1,9 +1,8 @@ # ErrorCode - -> **NOTE**
-> 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. - +> **NOTE** +> +> The initial APIs of this module are supported since API 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -17,9 +16,9 @@ Defines the error code used when the ability is started. **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name | Value | Description | +| Name | Value | Description | | ------------------------------ | ---- | ---------------------------------------- | -| NO_ERROR | 0 | No error occurs. | -| INVALID_PARAMETER | -1 | Invalid parameter. | -| ABILITY_NOT_FOUND | -2 | The ability is not found. | -| PERMISSION_DENY | -3 | Permission denied. | +| NO_ERROR | 0 | No error occurs. | +| INVALID_PARAMETER | -1 | Invalid parameter.| +| ABILITY_NOT_FOUND | -2 | The ability is not found.| +| PERMISSION_DENY | -3 | Permission denied. | diff --git a/en/application-dev/reference/apis/js-apis-ability-wantConstant.md b/en/application-dev/reference/apis/js-apis-ability-wantConstant.md index 1190acad72..e1d57d47b1 100644 --- a/en/application-dev/reference/apis/js-apis-ability-wantConstant.md +++ b/en/application-dev/reference/apis/js-apis-ability-wantConstant.md @@ -1,17 +1,15 @@ # wantConstant - -> **NOTE**
+> **NOTE** +> > 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. - ## Modules to Import ``` import wantConstant from '@ohos.ability.wantConstant' ``` - ## wantConstant.Action **System capability**: SystemCapability.Ability.AbilityBase @@ -20,32 +18,32 @@ Lists the permissions. | Common Event Macro | Common Event Name | Subscriber Permission | | ------------ | ------------------ | ---------------------- | -| ACTION_HOME | ohos.want.action.home | None | -| ACTION_DIAL | ohos.want.action.dial | None | -| ACTION_SEARCH | ohos.want.action.search | None | -| ACTION_WIRELESS_SETTINGS | ohos.settings.wireless | None | -| ACTION_MANAGE_APPLICATIONS_SETTINGS | ohos.settings.manage.applications | None | -| ACTION_APPLICATION_DETAILS_SETTINGS | ohos.settings.application.details | None | -| ACTION_SET_ALARM | ohos.want.action.setAlarm | None | -| ACTION_SHOW_ALARMS | ohos.want.action.showAlarms | None | -| ACTION_SNOOZE_ALARM | ohos.want.action.snoozeAlarm | None | -| ACTION_DISMISS_ALARM | ohos.want.action.dismissAlarm | None | -| ACTION_DISMISS_TIMER | ohos.want.action.dismissTimer | None | -| ACTION_SEND_SMS | ohos.want.action.sendSms | None | -| ACTION_CHOOSE | ohos.want.action.choose | None | -| ACTION_IMAGE_CAPTURE8+ | ohos.want.action.imageCapture | None | -| ACTION_VIDEO_CAPTUR8+ | ohos.want.action.videoCapture | None | -| ACTION_SELECT | ohos.want.action.select | None | -| ACTION_SEND_DATA | ohos.want.action.sendData | None | -| ACTION_SEND_MULTIPLE_DATA | ohos.want.action.sendMultipleData | None | -| ACTION_SCAN_MEDIA_FILE | ohos.want.action.scanMediaFile | None | -| ACTION_VIEW_DATA | ohos.want.action.viewData | None | -| ACTION_EDIT_DATA | ohos.want.action.editData | None | -| INTENT_PARAMS_INTENT | ability.want.params.INTENT | None | -| INTENT_PARAMS_TITLE | ability.want.params.TITLE | None | -| ACTION_FILE_SELECT7+ | ohos.action.fileSelect | None | -| PARAMS_STREAM7+ | ability.params.stream | None | -| ACTION_APP_ACCOUNT_OAUTH 8+ | ohos.account.appAccount.action.oauth | None | +| ACTION_HOME | ohos.want.action.home | None | +| ACTION_DIAL | ohos.want.action.dial | None | +| ACTION_SEARCH | ohos.want.action.search | None | +| ACTION_WIRELESS_SETTINGS | ohos.settings.wireless | None | +| ACTION_MANAGE_APPLICATIONS_SETTINGS | ohos.settings.manage.applications | None | +| ACTION_APPLICATION_DETAILS_SETTINGS | ohos.settings.application.details | None | +| ACTION_SET_ALARM | ohos.want.action.setAlarm | None | +| ACTION_SHOW_ALARMS | ohos.want.action.showAlarms | None | +| ACTION_SNOOZE_ALARM | ohos.want.action.snoozeAlarm | None | +| ACTION_DISMISS_ALARM | ohos.want.action.dismissAlarm | None | +| ACTION_DISMISS_TIMER | ohos.want.action.dismissTimer | None | +| ACTION_SEND_SMS | ohos.want.action.sendSms | None | +| ACTION_CHOOSE | ohos.want.action.choose | None | +| ACTION_IMAGE_CAPTURE8+ | ohos.want.action.imageCapture | None | +| ACTION_VIDEO_CAPTUR8+ | ohos.want.action.videoCapture | None | +| ACTION_SELECT | ohos.want.action.select | None | +| ACTION_SEND_DATA | ohos.want.action.sendData | None | +| ACTION_SEND_MULTIPLE_DATA | ohos.want.action.sendMultipleData | None | +| ACTION_SCAN_MEDIA_FILE | ohos.want.action.scanMediaFile | None | +| ACTION_VIEW_DATA | ohos.want.action.viewData | None | +| ACTION_EDIT_DATA | ohos.want.action.editData | None | +| INTENT_PARAMS_INTENT | ability.want.params.INTENT | None | +| INTENT_PARAMS_TITLE | ability.want.params.TITLE | None | +| ACTION_FILE_SELECT7+ | ohos.action.fileSelect | None | +| PARAMS_STREAM7+ | ability.params.stream | None | +| ACTION_APP_ACCOUNT_OAUTH 8+ | ohos.account.appAccount.action.oauth | None | ## wantConstant.Entity @@ -56,12 +54,12 @@ Lists the permissions. | Common Event Macro | Common Event Name | Subscriber Permission | | ------------ | ------------------ | ---------------------- | -| ENTITY_DEFAULT | entity.system.default | None | -| ENTITY_HOME | entity.system.homel | None | -| ENTITY_VOICE | ENTITY_VOICE | None | -| ENTITY_BROWSABLE | entity.system.browsable | None | -| ENTITY_VIDEO | entity.system.video | None | -| ACTION_APPLICATION_DETAILS_SETTINGS | ohos.settings.application.details | None | +| ENTITY_DEFAULT | entity.system.default | None | +| ENTITY_HOME | entity.system.homel | None | +| ENTITY_VOICE | ENTITY_VOICE | None | +| ENTITY_BROWSABLE | entity.system.browsable | None | +| ENTITY_VIDEO | entity.system.video | None | +| ACTION_APPLICATION_DETAILS_SETTINGS | ohos.settings.application.details | None | ## flags @@ -70,19 +68,19 @@ Lists the permissions. | Name | Value | Description | | ------------------------------------ | ---------- | ------------------------------------------------------------ | -| FLAG_AUTH_READ_URI_PERMISSION | 0x00000001 | Indicates the permission to read the URI. | -| FLAG_AUTH_WRITE_URI_PERMISSION | 0x00000002 | Indicates the permission to write the URI. | -| FLAG_ABILITY_FORWARD_RESULT | 0x00000004 | Returns the result to the ability. | -| FLAG_ABILITY_CONTINUATION | 0x00000008 | Indicates whether the ability on the local device can be continued on a remote device. | -| FLAG_NOT_OHOS_COMPONENT | 0x00000010 | Indicates that a component does not belong to OHOS. | -| FLAG_ABILITY_FORM_ENABLED | 0x00000020 | Indicates that an ability is enabled. | -| FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 0x00000040 | Indicates the permission to make the URI persistent. | -| FLAG_AUTH_PREFIX_URI_PERMISSION | 0x00000080 | Indicates the permission to verify URIs by prefix matching. | -| FLAG_ABILITYSLICE_MULTI_DEVICE | 0x00000100 | Supports cross-device startup in a distributed scheduler.| -| FLAG_START_FOREGROUND_ABILITY | 0x00000200 | Indicates that the Service ability is started regardless of whether the host application has been started. | -| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | Indicates that ability continuation is reversible. | -| FLAG_INSTALL_ON_DEMAND | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed. | -| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | Indicates that the specific ability will be installed in the background if it has not been installed. | -| 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**. | -| FLAG_ABILITY_NEW_MISSION | 0x10000000 | Indicates the operation of creating a mission on the history mission stack. | -| FLAG_ABILITY_MISSION_TOP | 0x20000000 | Starts the mission on the top of the existing mission stack; creates an ability instance if no mission exists. | +| FLAG_AUTH_READ_URI_PERMISSION | 0x00000001 | Indicates the permission to read the URI. | +| FLAG_AUTH_WRITE_URI_PERMISSION | 0x00000002 | Indicates the permission to write the URI. | +| FLAG_ABILITY_FORWARD_RESULT | 0x00000004 | Returns the result to the ability. | +| FLAG_ABILITY_CONTINUATION | 0x00000008 | Indicates whether the ability on the local device can be continued on a remote device. | +| FLAG_NOT_OHOS_COMPONENT | 0x00000010 | Indicates that a component does not belong to OHOS. | +| FLAG_ABILITY_FORM_ENABLED | 0x00000020 | Indicates that an ability is enabled. | +| FLAG_AUTH_PERSISTABLE_URI_PERMISSION | 0x00000040 | Indicates the permission to make the URI persistent. | +| FLAG_AUTH_PREFIX_URI_PERMISSION | 0x00000080 | Indicates the permission to verify URIs by prefix matching. | +| FLAG_ABILITYSLICE_MULTI_DEVICE | 0x00000100 | Supports cross-device startup in a distributed scheduler. | +| FLAG_START_FOREGROUND_ABILITY | 0x00000200 | Indicates that the Service ability is started regardless of whether the host application has been started. | +| FLAG_ABILITY_CONTINUATION_REVERSIBLE | 0x00000400 | Indicates that ability continuation is reversible. | +| FLAG_INSTALL_ON_DEMAND | 0x00000800 | Indicates that the specific ability will be installed if it has not been installed. | +| FLAG_INSTALL_WITH_BACKGROUND_MODE | 0x80000000 | Indicates that the specific ability will be installed in the background if it has not been installed. | +| 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**.| +| FLAG_ABILITY_NEW_MISSION | 0x10000000 | Indicates the operation of creating a mission on the history mission stack. | +| FLAG_ABILITY_MISSION_TOP | 0x20000000 | Starts the mission on the top of the existing mission stack; creates an ability instance if no mission exists.| diff --git a/en/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md b/en/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md index 65769dc7a2..a609e0df68 100644 --- a/en/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md +++ b/en/application-dev/reference/apis/js-apis-abilityDelegatorRegistry.md @@ -1,6 +1,7 @@ # AbilityDelegatorRegistry -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -9,21 +10,19 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' ``` - - ## AbilityLifecycleState Enumerates the ability lifecycle states. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name | Value | Description | - | ------------- | ---- | --------------------------- | - | UNINITIALIZED | 0 | The ability is in an invalid state. | - | CREATE | 1 | The ability is created. | - | FOREGROUND | 2 | The ability is running in the foreground. | - | BACKGROUND | 3 | The ability is running in the background. | - | DESTROY | 4 | The ability is destroyed. | +| Name | Value | Description | +| ------------- | ---- | --------------------------- | +| UNINITIALIZED | 0 | The ability is in an invalid state. | +| CREATE | 1 | The ability is created.| +| FOREGROUND | 2 | The ability is running in the foreground. | +| BACKGROUND | 3 | The ability is running in the background. | +| DESTROY | 4 | The ability is destroyed.| @@ -37,9 +36,9 @@ Obtains the **AbilityDelegator** object of the application. **Return value** - | Type | Description | - | ------------------------------------------------------------ | ------------------------------------------------------------ | - | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework. | +| Type | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework.| **Example** @@ -61,9 +60,9 @@ Obtains the **AbilityDelegatorArgs** object of the application. **Return value** - | Type | Description | - | ------------------------------------------------------------ | ------------------------------------------------------------ | - | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters. | +| Type | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-abilityrunninginfo.md b/en/application-dev/reference/apis/js-apis-abilityrunninginfo.md index 9223a481fb..508463e3a4 100644 --- a/en/application-dev/reference/apis/js-apis-abilityrunninginfo.md +++ b/en/application-dev/reference/apis/js-apis-abilityrunninginfo.md @@ -1,9 +1,9 @@ # AbilityRunningInfo -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. - Provides ability running information. ## Modules to Import @@ -11,13 +11,11 @@ Provides ability running information. ```js import abilitymanager from '@ohos.application.abilityManager'; ``` -## Usage +## Usage The ability running information is obtained by using the **getAbilityRunningInfos** API in **abilityManager**. - - ```js import abilitymanager from '@ohos.application.abilityManager'; abilitymanager.getAbilityRunningInfos((err,data) => { diff --git a/en/application-dev/reference/apis/js-apis-abilitystagecontext.md b/en/application-dev/reference/apis/js-apis-abilitystagecontext.md index c1552ef273..65705aae39 100644 --- a/en/application-dev/reference/apis/js-apis-abilitystagecontext.md +++ b/en/application-dev/reference/apis/js-apis-abilitystagecontext.md @@ -1,8 +1,9 @@ # AbilityStageContext -> **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. - +> **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. +> The APIs of this module can be used only in the stage model. Implements the context of an ability stage. This module is inherited from [Context](js-apis-application-context.md). @@ -14,11 +15,8 @@ import AbilityStage from '@ohos.application.AbilityStage'; ## Usage - The ability stage context is obtained through an **AbilityStage** instance. - - ```js import AbilityStage from '@ohos.application.AbilityStage'; class MyAbilityStage extends AbilityStage { @@ -28,7 +26,6 @@ class MyAbilityStage extends AbilityStage { } ``` - ## Attributes **System capability**: SystemCapability.Ability.AbilityRuntime.Core diff --git a/en/application-dev/reference/apis/js-apis-application-StartOptions.md b/en/application-dev/reference/apis/js-apis-application-StartOptions.md index b2a29f392a..e221f45062 100644 --- a/en/application-dev/reference/apis/js-apis-application-StartOptions.md +++ b/en/application-dev/reference/apis/js-apis-application-StartOptions.md @@ -1,15 +1,14 @@ # StartOptions -> **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. - +> **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. +> The APIs of this module can be used only in the stage model. **StartOptions** is the basic communication component of the system. - ## Modules to Import - ``` import StartOptions from '@ohos.application.StartOptions'; ``` @@ -18,8 +17,8 @@ import StartOptions from '@ohos.application.StartOptions'; **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore -| Name | Readable | Writable | Type | Mandatory | Description | +| Name| Readable| Writable| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -------- | -------- | -| [windowMode](js-apis-window.md#windowmode) | Yes| No | number | No | Window mode. | -| displayId | Yes| No | number | No | Display ID. | +| [windowMode](js-apis-window.md#windowmode) | Yes| No| number | No| Window mode.| +| displayId | Yes| No| number | No| Display ID.| diff --git a/en/application-dev/reference/apis/js-apis-application-abilityConstant.md b/en/application-dev/reference/apis/js-apis-application-abilityConstant.md index 1db280b4b8..3b2a958f7f 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityConstant.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityConstant.md @@ -1,28 +1,26 @@ # AbilityConstant -> **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. - +> **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. +> The APIs of this module can be used only in the stage model. Provides parameters related to ability launch. - ## Modules to Import - ```js import AbilityConstant from '@ohos.application.AbilityConstant'; ``` - ## Attributes **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name | Type | Readable | Writable | Description | - | -------- | -------- | -------- | -------- | -------- | - | launchReason | LaunchReason | Yes | Yes | Ability launch reason. | - | lastExitReason | LastExitReason | Yes | Yes | Reason for the last exit. | +| Name| Type| Readable| Writable| Description| +| -------- | -------- | -------- | -------- | -------- | +| launchReason | LaunchReason| Yes| Yes| Ability launch reason.| +| lastExitReason | LastExitReason | Yes| Yes| Reason for the last exit.| ## AbilityConstant.LaunchReason @@ -30,12 +28,12 @@ Enumerates ability launch reasons. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name | Value | Description | - | ----------------------------- | ---- | ------------------------------------------------------------ | - | UNKNOWN | 0 | Unknown reason. | - | START_ABILITY | 1 | Ability startup. | - | CALL | 2 | Call. | - | CONTINUATION | 3 | Ability continuation. | +| Name | Value | Description | +| ----------------------------- | ---- | ------------------------------------------------------------ | +| UNKNOWN | 0 | Unknown reason.| +| START_ABILITY | 1 | Ability startup.| +| CALL | 2 | Call.| +| CONTINUATION | 3 | Ability continuation.| ## AbilityConstant.LastExitReason @@ -44,11 +42,11 @@ Enumerates reasons for the last exit. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name | Value | Description | - | ----------------------------- | ---- | ------------------------------------------------------------ | - | UNKNOWN | 0 | Unknown reason. | - | ABILITY_NOT_RESPONDING | 1 | The ability does not respond. | - | NORMAL | 2 | Normal status. | +| Name | Value | Description | +| ----------------------------- | ---- | ------------------------------------------------------------ | +| UNKNOWN | 0 | Unknown reason.| +| ABILITY_NOT_RESPONDING | 1 | The ability does not respond.| +| NORMAL | 2 | Normal status.| ## AbilityConstant.OnContinueResult @@ -57,8 +55,8 @@ Enumerates ability continuation results. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - | Name | Value | Description | - | ----------------------------- | ---- | ------------------------------------------------------------ | - | AGREE | 0 | Continuation agreed. | - | REJECT | 1 | Continuation denied. | - | MISMATCH | 2 | Mismatch. | +| Name | Value | Description | +| ----------------------------- | ---- | ------------------------------------------------------------ | +| AGREE | 0 | Continuation agreed.| +| REJECT | 1 | Continuation denied.| +| MISMATCH | 2 | Mismatch.| diff --git a/en/application-dev/reference/apis/js-apis-application-abilityDelegator.md b/en/application-dev/reference/apis/js-apis-application-abilityDelegator.md index e781aa0db5..ec8655be70 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityDelegator.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityDelegator.md @@ -1,7 +1,7 @@ # AbilityDelegator -> **NOTE**
-> +> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -10,8 +10,6 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' ``` - - ## AbilityDelegator ### addAbilityMonitor9+ diff --git a/en/application-dev/reference/apis/js-apis-application-abilityDelegatorArgs.md b/en/application-dev/reference/apis/js-apis-application-abilityDelegatorArgs.md index 72a1eefa41..ad43acc77b 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityDelegatorArgs.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityDelegatorArgs.md @@ -1,7 +1,7 @@ # AbilityDelegatorArgs -> **NOTE**
-> +> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -10,8 +10,6 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' ``` - - ## AbilityDelegatorArgs Describes the test parameters. diff --git a/en/application-dev/reference/apis/js-apis-application-abilityLifecycleCallback.md b/en/application-dev/reference/apis/js-apis-application-abilityLifecycleCallback.md index 9ac9b6868e..02803ad07b 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityLifecycleCallback.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityLifecycleCallback.md @@ -1,11 +1,19 @@ # AbilityLifecycleCallback -> **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. +> **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. +> The APIs of this module can be used only in the stage model. A callback class that provides APIs, such as **onAbilityCreate**, **onAbilityWindowStageCreate**, and **onAbilityWindowStageDestroy**, to listen for the lifecycle of the application context. +## Modules to Import + +```js +import AbilityLifecycleCallback from "@ohos.application.abilityLifecycleCallback"; +``` + ## AbilityLifecycleCallback.onAbilityCreate diff --git a/en/application-dev/reference/apis/js-apis-application-abilityMonitor.md b/en/application-dev/reference/apis/js-apis-application-abilityMonitor.md index b31687b7ed..e7f017b48e 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilityMonitor.md +++ b/en/application-dev/reference/apis/js-apis-application-abilityMonitor.md @@ -1,8 +1,8 @@ # AbilityMonitor > **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. +> +> 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 @@ -10,8 +10,6 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' ``` - - ## AbilityMonitor Describes an ability monitor. diff --git a/en/application-dev/reference/apis/js-apis-application-abilitystage.md b/en/application-dev/reference/apis/js-apis-application-abilitystage.md index bb9c758f36..731d21305f 100644 --- a/en/application-dev/reference/apis/js-apis-application-abilitystage.md +++ b/en/application-dev/reference/apis/js-apis-application-abilitystage.md @@ -1,15 +1,14 @@ # AbilityStage -> **NOTE**
-> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. - +> **NOTE** +> +> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> The APIs of this module can be used only in the stage model. Runtime class for HAP files. It provides APIs to notify you when a HAP file starts loading. You can then initialize the HAP file, for example, pre-load resources and create threads. - ## Modules to Import - ```js import AbilityStage from '@ohos.application.AbilityStage'; ``` @@ -22,8 +21,6 @@ Called when the application is created. **System capability**: SystemCapability.Ability.AbilityRuntime.Core - - **Example** ```js diff --git a/en/application-dev/reference/apis/js-apis-application-missionInfo.md b/en/application-dev/reference/apis/js-apis-application-missionInfo.md index 8371830fe0..05938521e1 100644 --- a/en/application-dev/reference/apis/js-apis-application-missionInfo.md +++ b/en/application-dev/reference/apis/js-apis-application-missionInfo.md @@ -1,6 +1,7 @@ # MissionInfo -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -9,7 +10,6 @@ import MissionInfo from '@ohos.application.missionInfo' ``` - ## MissionInfo Provides the mission information. diff --git a/en/application-dev/reference/apis/js-apis-application-shellCmdResult.md b/en/application-dev/reference/apis/js-apis-application-shellCmdResult.md index d96a1d1bec..e0cddeee65 100644 --- a/en/application-dev/reference/apis/js-apis-application-shellCmdResult.md +++ b/en/application-dev/reference/apis/js-apis-application-shellCmdResult.md @@ -1,7 +1,7 @@ # ShellCmdResult -> **NOTE**
-> +> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -10,8 +10,6 @@ import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' ``` - - ## ShellCmdResult Describes the shell command execution result. diff --git a/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md b/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md index 0a0a18ae37..abd004e82d 100644 --- a/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md +++ b/en/application-dev/reference/apis/js-apis-application-staticSubscriberExtensionAbility.md @@ -1,9 +1,9 @@ # StaticSubscriberExtensionAbility - -> **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. - +> **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. +> The APIs of this module can be used only in the stage model. ## Modules to Import ``` @@ -20,9 +20,9 @@ Callback of the common event of a static subscriber. **Parameters** - | Name | Type | Mandatory | Description | + | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | - | event | CommonEventData | Yes | Callback of the common event of a static subscriber. | + | event | CommonEventData | Yes| Callback of the common event of a static subscriber.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-appmanager.md b/en/application-dev/reference/apis/js-apis-appmanager.md index 96c9bd0095..236ed9c1af 100644 --- a/en/application-dev/reference/apis/js-apis-appmanager.md +++ b/en/application-dev/reference/apis/js-apis-appmanager.md @@ -1,6 +1,7 @@ # appManager -> **NOTE**
+> **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. @@ -25,9 +26,9 @@ Checks whether this application is undergoing a stability test. This API uses an **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<boolean> | No| Callback used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | callback | AsyncCallback<boolean> | No| Callback used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.| **Example** @@ -49,9 +50,9 @@ Checks whether this application is undergoing a stability test. This API uses a **Return value** -| Type| Description| -| -------- | -------- | -| Promise<boolean> | Promise used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.| + | Type| Description| + | -------- | -------- | + | Promise<boolean> | Promise used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.| **Example** @@ -75,9 +76,9 @@ Checks whether this application is running on a RAM constrained device. This API **Return value** -| Type| Description| -| -------- | -------- | -| Promise<boolean> | Promise used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| + | Type| Description| + | -------- | -------- | + | Promise<boolean> | Promise used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| **Example** @@ -99,9 +100,9 @@ Checks whether this application is running on a RAM constrained device. This API **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<boolean> | No| Callback used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | callback | AsyncCallback<boolean> | No| Callback used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| **Example** @@ -122,9 +123,9 @@ Obtains the memory size of this application. This API uses a promise to return t **Return value** -| Type| Description| -| -------- | -------- | -| Promise<number> | Size of the application memory.| + | Type| Description| + | -------- | -------- | + | Promise<number> | Size of the application memory.| **Example** @@ -146,9 +147,9 @@ Obtains the memory size of this application. This API uses an asynchronous callb **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| callback | AsyncCallback<number> | No| Size of the application memory.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | callback | AsyncCallback<number> | No| Size of the application memory.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-configuration.md b/en/application-dev/reference/apis/js-apis-configuration.md index 0cad135c63..507b8a4244 100644 --- a/en/application-dev/reference/apis/js-apis-configuration.md +++ b/en/application-dev/reference/apis/js-apis-configuration.md @@ -1,28 +1,25 @@ # Configuration -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. - Provides the configuration for the environment where the ability is running. - ## Modules to Import - ```js import Configuration from '@ohos.application.Configuration'; ``` - ## Attributes **System capability**: SystemCapability.Ability.AbilityBase -| Name| Type | Readable | Writable | Description | + | Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | -| language | string | Yes | Yes| Language of the application. | -| colorMode | [ColorMode](js-apis-configurationconstant.md) | Yes | Yes | Color mode, which can be **COLOR_MODE_LIGHT** or **COLOR_MODE_DARK**. The default value is **COLOR_MODE_LIGHT**.| -| direction9+ | Direction | Yes| No| Screen orientation, which can be **DIRECTION_HORIZONTAL** or **DIRECTION_VERTICAL**. | -| screenDensity9+ | ScreenDensity | Yes| No | Screen resolution, which can be **SCREEN_DENSITY_SDPI** (120), **SCREEN_DENSITY_MDPI** (160), **SCREEN_DENSITY_LDPI** (240), **SCREEN_DENSITY_XLDPI** (320), **SCREEN_DENSITY_XXLDPI** (480), or **SCREEN_DENSITY_XXXLDPI** (640). | -| displayId9+ | number | Yes| No| ID of the display where the application is located. | +| language | string | Yes| Yes| Language of the application.| +| colorMode | [ColorMode](js-apis-configurationconstant.md) | Yes| Yes| Color mode, which can be **COLOR_MODE_LIGHT** or **COLOR_MODE_DARK**. The default value is **COLOR_MODE_LIGHT**.| +| direction9+ | Direction | Yes| No| Screen orientation, which can be **DIRECTION_HORIZONTAL** or **DIRECTION_VERTICAL**.| +| screenDensity9+ | ScreenDensity | Yes| No| Screen resolution, which can be **SCREEN_DENSITY_SDPI** (120), **SCREEN_DENSITY_MDPI** (160), **SCREEN_DENSITY_LDPI** (240), **SCREEN_DENSITY_XLDPI** (320), **SCREEN_DENSITY_XXLDPI** (480), or **SCREEN_DENSITY_XXXLDPI** (640).| +| displayId9+ | number | Yes| No| ID of the display where the application is located.| diff --git a/en/application-dev/reference/apis/js-apis-configurationconstant.md b/en/application-dev/reference/apis/js-apis-configurationconstant.md index a61eeea271..ebb78bc00e 100644 --- a/en/application-dev/reference/apis/js-apis-configurationconstant.md +++ b/en/application-dev/reference/apis/js-apis-configurationconstant.md @@ -1,6 +1,7 @@ # ConfigurationConstant -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -27,11 +28,11 @@ ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT **System capability**: SystemCapability.Ability.AbilityBase -| Name | Value | Description | +| Name| Value| Description| | -------- | -------- | -------- | -| COLOR_MODE_NOT_SET | -1 | Unspecified color mode. | -| COLOR_MODE_DARK | 0 | Dark mode. | -| COLOR_MODE_LIGHT | 1 | Light mode. | +| COLOR_MODE_NOT_SET | -1 | Unspecified color mode.| +| COLOR_MODE_DARK | 0 | Dark mode.| +| COLOR_MODE_LIGHT | 1 | Light mode.| ## ConfigurationConstant.Direction9+ @@ -46,11 +47,11 @@ ConfigurationConstant.Direction.DIRECTION_VERTICAL **System capability**: SystemCapability.Ability.AbilityBase -| Name | Value | Description | +| Name| Value| Description| | -------- | -------- | -------- | -| DIRECTION_NOT_SET | -1 | Unspecified direction. | -| DIRECTION_VERTICAL | 0 | Vertical direction. | -| DIRECTION_HORIZONTAL | 1 | Horizontal direction. | +| DIRECTION_NOT_SET | -1 | Unspecified direction.| +| DIRECTION_VERTICAL | 0 | Vertical direction.| +| DIRECTION_HORIZONTAL | 1 | Horizontal direction.| ## ConfigurationConstant.ScreenDensity9+ @@ -65,12 +66,12 @@ ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET **System capability**: SystemCapability.Ability.AbilityBase -| Name | Value | Description | +| Name| Value| Description| | -------- | -------- | -------- | -| SCREEN_DENSITY_NOT_SET | 0 | Unspecified screen resolution. | -| SCREEN_DENSITY_SDPI | 120 | The screen resolution is sdpi. | -| SCREEN_DENSITY_MDPI | 160 | The screen resolution is mdpi. | -| SCREEN_DENSITY_LDPI | 240 | The screen resolution is ldpi. | -| SCREEN_DENSITY_XLDPI | 320 | The screen resolution is xldpi. | -| SCREEN_DENSITY_XXLDPI | 480 | The screen resolution is xxldpi. | -| SCREEN_DENSITY_XXXLDPI | 640 | The screen resolution is xxxldpi. | +| SCREEN_DENSITY_NOT_SET | 0 | Unspecified screen resolution.| +| SCREEN_DENSITY_SDPI | 120 | The screen resolution is sdpi.| +| SCREEN_DENSITY_MDPI | 160 | The screen resolution is mdpi.| +| SCREEN_DENSITY_LDPI | 240 | The screen resolution is ldpi.| +| SCREEN_DENSITY_XLDPI | 320 | The screen resolution is xldpi.| +| SCREEN_DENSITY_XXLDPI | 480 | The screen resolution is xxldpi.| +| SCREEN_DENSITY_XXXLDPI | 640 | The screen resolution is xxxldpi.| diff --git a/en/application-dev/reference/apis/js-apis-extension-context.md b/en/application-dev/reference/apis/js-apis-extension-context.md index afd1cec9cd..24ca2bb2e9 100644 --- a/en/application-dev/reference/apis/js-apis-extension-context.md +++ b/en/application-dev/reference/apis/js-apis-extension-context.md @@ -1,7 +1,9 @@ # ExtensionContext -> **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. +> **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. +> The APIs of this module can be used only in the stage model. Implements the extension context. This module is inherited from **Context**. diff --git a/en/application-dev/reference/apis/js-apis-formInfo.md b/en/application-dev/reference/apis/js-apis-formInfo.md index 1091770862..502a8212f5 100644 --- a/en/application-dev/reference/apis/js-apis-formInfo.md +++ b/en/application-dev/reference/apis/js-apis-formInfo.md @@ -1,6 +1,7 @@ # FormInfo -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. Provides widget information. diff --git a/en/application-dev/reference/apis/js-apis-formerror.md b/en/application-dev/reference/apis/js-apis-formerror.md index 37eecd8530..62e062c25e 100644 --- a/en/application-dev/reference/apis/js-apis-formerror.md +++ b/en/application-dev/reference/apis/js-apis-formerror.md @@ -1,6 +1,7 @@ # FormError -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE** +> > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. Provides widget-related error codes. diff --git a/en/application-dev/reference/apis/js-apis-missionManager.md b/en/application-dev/reference/apis/js-apis-missionManager.md index 314d2f63cc..94fb115434 100644 --- a/en/application-dev/reference/apis/js-apis-missionManager.md +++ b/en/application-dev/reference/apis/js-apis-missionManager.md @@ -635,7 +635,7 @@ Switches a given mission to the foreground, with the startup parameters for the | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | missionId | number | Yes| Mission ID.| - | options | StartOptions | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| + | options | [StartOptions](js-apis-application-StartOptions.md) | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -669,7 +669,7 @@ Switches a given mission to the foreground, with the startup parameters for the | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | missionId | number | Yes| Mission ID.| - | options | StartOptions | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| + | options | [StartOptions](js-apis-application-StartOptions.md) | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-particleAbility.md b/en/application-dev/reference/apis/js-apis-particleAbility.md index 2dd21c5d94..12f2fd80bd 100644 --- a/en/application-dev/reference/apis/js-apis-particleAbility.md +++ b/en/application-dev/reference/apis/js-apis-particleAbility.md @@ -1,7 +1,9 @@ -# ParticleAbility Module +# ParticleAbility -> **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. +> **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. +> The APIs of this module can be used only in the FA model. ## Constraints diff --git a/en/application-dev/reference/apis/js-apis-permissionrequestresult.md b/en/application-dev/reference/apis/js-apis-permissionrequestresult.md index de7be38f0c..f0d3ed2f0c 100644 --- a/en/application-dev/reference/apis/js-apis-permissionrequestresult.md +++ b/en/application-dev/reference/apis/js-apis-permissionrequestresult.md @@ -1,7 +1,9 @@ # PermissionRequestResult -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> The APIs of this module can be used only in the stage model. Provides the permission request result. diff --git a/en/application-dev/reference/apis/js-apis-service-extension-ability.md b/en/application-dev/reference/apis/js-apis-service-extension-ability.md index 55e18ad1fa..b66c29fe18 100644 --- a/en/application-dev/reference/apis/js-apis-service-extension-ability.md +++ b/en/application-dev/reference/apis/js-apis-service-extension-ability.md @@ -1,31 +1,29 @@ # ServiceExtensionAbility -> **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. - +> **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. +> The APIs of this module can be used only in the stage model. Provides APIs related to **ServiceExtension**. - ## Modules to Import ``` import ServiceExtension from '@ohos.application.ServiceExtensionAbility'; ``` - ## Required Permissions None. - ## Attributes **System capability**: SystemCapability.Ability.AbilityRuntime.Core -| Name| Type| Readable| Writable| Description| +| Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | -| context | [ServiceExtensionContext](js-apis-service-extension-context.md) | Yes| No| Service extension context, which is inherited from **ExtensionContext**.| +| context | [ServiceExtensionContext](js-apis-service-extension-context.md) | Yes| No| Service extension context, which is inherited from **ExtensionContext**.| ## ServiceExtensionAbility.onCreate @@ -38,9 +36,9 @@ Called when an extension is created to initialize the service logic. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| want | [Want](js-apis-application-Want.md) | Yes| Information related to this extension, including the ability name and bundle name.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md) | Yes| Information related to this extension, including the ability name and bundle name.| **Example** @@ -82,10 +80,10 @@ Called after **onCreate** is invoked when an ability is started by calling **sta **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| want | [Want](js-apis-application-Want.md) | Yes| Information related to this extension, including the ability name and bundle name.| -| startId | number | Yes| Number of ability start times. The initial value is **1**, and the value is automatically incremented for each ability started.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md) | Yes| Information related to this extension, including the ability name and bundle name.| + | startId | number | Yes| Number of ability start times. The initial value is **1**, and the value is automatically incremented for each ability started.| **Example** @@ -108,15 +106,15 @@ Called after **onCreate** is invoked when an ability is started by calling **con **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| want | [Want](js-apis-application-Want.md)| Yes| Information related to this extension, including the ability name and bundle name.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | want | [Want](js-apis-application-Want.md)| Yes| Information related to this extension, including the ability name and bundle name.| **Return value** -| Type| Description| -| -------- | -------- | -| rpc.RemoteObject | A **RemoteObject** object used for communication with the client.| + | Type| Description| + | -------- | -------- | + | rpc.RemoteObject | A **RemoteObject** object used for communication with the client.| **Example** @@ -148,9 +146,9 @@ Called when the ability is disconnected. **Parameters** -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| want |[Want](js-apis-application-Want.md)| Yes| Information related to this extension, including the ability name and bundle name.| + | Name| Type| Mandatory| Description| + | -------- | -------- | -------- | -------- | + | want |[Want](js-apis-application-Want.md)| Yes| Information related to this extension, including the ability name and bundle name.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-testRunner.md b/en/application-dev/reference/apis/js-apis-testRunner.md index 47f1dc8dad..717c8448a0 100644 --- a/en/application-dev/reference/apis/js-apis-testRunner.md +++ b/en/application-dev/reference/apis/js-apis-testRunner.md @@ -1,8 +1,8 @@ # TestRunner -> **Note** -> -> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> **NOTE** +> +> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import -- GitLab