From 974ece4d185b34f8e713bf0a22681dc9aac74f36 Mon Sep 17 00:00:00 2001 From: wusongqing Date: Wed, 22 Jun 2022 17:36:28 +0800 Subject: [PATCH] updated docs against master updates Signed-off-by: wusongqing --- .../reference/apis/js-apis-Context.md | 12 +- .../reference/apis/js-apis-ability-context.md | 136 +++++++++--------- .../apis/js-apis-application-ability.md | 8 +- .../reference/apis/js-apis-appmanager.md | 7 +- .../reference/apis/js-apis-audio.md | 4 +- .../reference/apis/js-apis-camera.md | 3 +- .../reference/apis/js-apis-convertxml.md | 2 +- .../reference/apis/js-apis-faultLogger.md | 2 +- .../reference/apis/js-apis-featureAbility.md | 39 ++--- .../reference/apis/js-apis-lightweightmap.md | 2 +- .../reference/apis/js-apis-media.md | 2 +- .../reference/apis/js-apis-missionManager.md | 4 +- .../reference/apis/js-apis-system-battery.md | 2 +- .../reference/apis/js-apis-uri.md | 8 +- .../reference/apis/js-apis-vibrator.md | 6 +- .../reference/apis/js-apis-wantAgent.md | 16 +-- .../reference/apis/js-apis-window.md | 26 ++-- 17 files changed, 143 insertions(+), 136 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-Context.md b/en/application-dev/reference/apis/js-apis-Context.md index ea18e37651..213f302466 100644 --- a/en/application-dev/reference/apis/js-apis-Context.md +++ b/en/application-dev/reference/apis/js-apis-Context.md @@ -924,14 +924,14 @@ Describes the HAP module information. | labelId | number | Yes | No | Module label ID. | | iconId | number | Yes | No | Module icon ID. | | backgroundImg | string | Yes | No | Module background image. | -| supportedModes | number | Yes | No | Modes supported by the module. | +| supportedModes | number | Yes | No | Running modes supported by the module. | | reqCapabilities | Array\ | Yes | No | Capabilities required for module running.| -| deviceTypes | Array\ | Yes | No | An array of supported device types.| -| abilityInfo | Array\\ | Yes | No | Ability information. | +| deviceTypes | Array\ | Yes | No | Device types supported by the module.| +| abilityInfo | Array\ | Yes | No | Ability information. | | moduleName | string | Yes | No | Module name. | -| mainAbilityName | string | Yes | No | Name of the entrance ability. | -| installationFree | boolean | Yes | No | When installation-free is supported. | -| mainElementName | string | Yes| No| Information about the entry ability.| +| mainAbilityName | string | Yes | No | Name of the main ability. | +| installationFree | boolean | Yes | No | Whether installation-free is supported. | +| mainElementName | string | Yes| No| Information about the main ability.| ## AppVersionInfo 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 9898e94c71..3d1f09e0e4 100644 --- a/en/application-dev/reference/apis/js-apis-ability-context.md +++ b/en/application-dev/reference/apis/js-apis-ability-context.md @@ -43,10 +43,10 @@ Starts an ability. This API uses an asynchronous callback to return the result. **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -71,11 +71,11 @@ Starts an ability with **options** specified. This API uses an asynchronous call **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | options | StartOptions | Yes| Parameters used for starting the ability.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| +| callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -104,16 +104,16 @@ Starts an ability with **options** specified. This API uses a promise to return **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | options | StartOptions | Yes| Parameters used for starting the ability.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result.| +| Promise<void> | Promise used to return the result.| **Example** ```js @@ -143,15 +143,15 @@ Obtains the caller interface of the specified ability, and if the specified abil **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, including the ability name, bundle name, and device ID. If the device ID is left blank or the default value is used, the local ability will be started.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the ability to start, including the ability name, bundle name, and device ID. If the device ID is left blank or the default value is used, the local ability will be started.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<Caller> | Promise used to return the caller object to communicate with.| +| Promise<Caller> | Promise used to return the caller object to communicate with.| **Example** @@ -184,11 +184,11 @@ Starts an ability with **accountId** specified. This API uses an asynchronous ca **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| -| accountId | number | Yes| Account ID. | -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| accountId | number | Yes| Account ID. | +| callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -214,12 +214,12 @@ Starts an ability with **accountId** and **options** specified. This API uses an **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| -| accountId | number | Yes| Account ID. | +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| accountId | number | Yes| Account ID. | | options | StartOptions | Yes| Parameters used for starting the ability.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result.| +| callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -249,17 +249,17 @@ Starts an ability with **accountId** and **options** specified. This API uses a **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| +| want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | accountId | number | Yes| Account ID. | | options | StartOptions | No| Parameters used for starting the ability.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result.| +| Promise<void> | Promise used to return the result.| **Example** ```js @@ -349,7 +349,7 @@ Starts an ability with **options** specified. This API uses a promise to return **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | options | StartOptions | Yes| Parameters used for starting the ability.| @@ -446,7 +446,7 @@ Starts an ability with **accountId** and **options** specified. This API uses a **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | accountId | number | Yes| Account ID. | @@ -482,15 +482,15 @@ Terminates this ability. This API uses an asynchronous callback to return the re **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| callback | AsyncCallback<void> | Yes| Callback used to return the result indicating whether the API is successfully called.| +| callback | AsyncCallback<void> | Yes| Callback used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.terminateSelf((err) => { - console.log('terminateSelf result:' + JSON.stringfy(err)); + console.log('terminateSelf result:' + JSON.stringify(err)); }); ``` @@ -504,17 +504,17 @@ Terminates this ability. This API uses a promise to return the result. **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result indicating whether the API is successfully called.| +| Promise<void> | Promise used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.terminateSelf(want).then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` @@ -561,9 +561,9 @@ Terminates this ability. This API uses a promise to return information to the ca | parameter | [AbilityResult](js-apis-featureAbility.md#AbilityResult) | Yes| Information returned to the caller.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result.| +| Promise<void> | Promise used to return the result.| **Example** ```js @@ -586,14 +586,14 @@ Uses the **AbilityInfo.AbilityType.SERVICE** template to connect this ability to **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | options | ConnectOptions | Yes| Connection channel.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | | number | ID of the connection between the two abilities.| @@ -630,7 +630,7 @@ Uses the **AbilityInfo.AbilityType.SERVICE** template to connect this ability to **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | want | [Want](js-apis-featureAbility.md#Want) | Yes| Information about the **Want** used for starting an ability.| | accountId | number | Yes| Account ID.| @@ -638,7 +638,7 @@ Uses the **AbilityInfo.AbilityType.SERVICE** template to connect this ability to **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | | number | ID of the connection between the two abilities.| @@ -676,7 +676,7 @@ Disconnects this ability from another ability. This API uses an asynchronous cal **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | connection | number | Yes| ID of the connection to be disconnected.| | callback | AsyncCallback<void> | Yes| Callback used to return the result.| @@ -700,15 +700,15 @@ Disconnects this ability from another ability. This API uses a promise to return **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | connection | number | Yes| ID of the connection to be disconnected.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result.| +| Promise<void> | Promise used to return the result.| **Example** @@ -717,7 +717,7 @@ var connection = 111; this.context.disconnectAbility(connection).then(() => { console.log('disconnect success') }).catch((err) => { - console.log('disconnect filed') + console.log('disconnect failed') }) ``` @@ -731,16 +731,16 @@ Sets the label of the ability in the mission. This API uses an asynchronous call **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| label | string | Yes| Label of the ability to set.| -| callback | AsyncCallback<void> | Yes| Callback used to return the result indicating whether the API is successfully called.| +| label | string | Yes| Label of the ability to set.| +| callback | AsyncCallback<void> | Yes| Callback used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.setMissionLabel("test",(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -755,23 +755,23 @@ Sets the label of the ability in the mission. This API uses a promise to return **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| label | string | Yes| Label of the ability to set.| +| label | string | Yes| Label of the ability to set.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<void> | Promise used to return the result indicating whether the API is successfully called.| +| Promise<void> | Promise used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.setMissionLabel("test").then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` @@ -785,16 +785,16 @@ Requests permissions from end users in the form of a dialog box. This API uses a **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| permissions | Array<string> | Yes| Permissions to request.| -| callback | AsyncCallback<PermissionRequestResult> | Yes| Callback used to return the result indicating whether the API is successfully called.| +| permissions | Array<string> | Yes| Permissions to request.| +| callback | AsyncCallback<PermissionRequestResult> | Yes| Callback used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.requestPermissionsFromUser(permissions,(result) => { - console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); + console.log('requestPermissionsFromUserresult:' + JSON.stringify(result)); }); ``` @@ -809,23 +809,23 @@ Requests permissions from end users in the form of a dialog box. This API uses a **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| permissions | Array<string> | Yes| Permissions to request.| +| permissions | Array<string> | Yes| Permissions to request.| **Return value** -| Type| Description| +| Type| Description| | -------- | -------- | -| Promise<PermissionRequestResult> | Promise used to return the result indicating whether the API is successfully called.| +| Promise<PermissionRequestResult> | Promise used to return the result indicating whether the API is successfully called.| **Example** ```js this.context.requestPermissionsFromUser(permissions).then((data) => { - console.log('success:' + JSON.stringfy(data)); + console.log('success:' + JSON.stringify(data)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` @@ -839,9 +839,9 @@ Restores the window stage data during ability continuation. **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| contentStorage | ContentStorage | Yes| Window stage data to restore.| +| contentStorage | ContentStorage | Yes| Window stage data to restore.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-application-ability.md b/en/application-dev/reference/apis/js-apis-application-ability.md index 6dd48dc410..75f75008aa 100644 --- a/en/application-dev/reference/apis/js-apis-application-ability.md +++ b/en/application-dev/reference/apis/js-apis-application-ability.md @@ -143,7 +143,7 @@ Called when this ability is destroyed to clear resources. onForeground(): void; -Called when this ability is running in the foreground. +Called when this ability is switched from the background to the foreground. **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore @@ -162,7 +162,7 @@ Called when this ability is running in the foreground. onBackground(): void; -Callback when this ability is switched to the background. +Called when this ability is switched from the foreground to the background. **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore @@ -486,7 +486,7 @@ Registers a callback that is invoked when the Stub on the target ability is disc ## Callee -Implements callbacks for caller notification registration and unregistration. +Implements callbacks for caller notification registration and deregistration. ## Callee.on @@ -546,7 +546,7 @@ Registers a caller notification callback, which is invoked when the target abili off(method: string): void; -Unregisters a caller notification callback, which is invoked when the target ability registers a function. +Deregisters a caller notification callback, which is invoked when the target ability registers a function. **System capability**: SystemCapability.Ability.AbilityRuntime.AbilityCore diff --git a/en/application-dev/reference/apis/js-apis-appmanager.md b/en/application-dev/reference/apis/js-apis-appmanager.md index ee5095aba5..eae286c739 100644 --- a/en/application-dev/reference/apis/js-apis-appmanager.md +++ b/en/application-dev/reference/apis/js-apis-appmanager.md @@ -32,10 +32,11 @@ Checks whether this application is undergoing a stability test. This API uses an **Example** + ```js import app from '@ohos.application.appManager'; app.isRunningInStabilityTest((err, flag) => { - console.log('startAbility result:' + JSON.stringfy(err)); + console.log('startAbility result:' + JSON.stringify(err)); }) ``` @@ -59,9 +60,9 @@ Checks whether this application is undergoing a stability test. This API uses a ```js import app from '@ohos.application.appManager'; app.isRunningInStabilityTest().then((flag) => { - console.log('success:' + JSON.stringfy(flag)); + console.log('success:' + JSON.stringify(flag)); }).catch((error) => { - console.log('failed:' + JSON.stringfy(error)); + console.log('failed:' + JSON.stringify(error)); }); ``` diff --git a/en/application-dev/reference/apis/js-apis-audio.md b/en/application-dev/reference/apis/js-apis-audio.md index 332f8903b5..6e4dff7a12 100644 --- a/en/application-dev/reference/apis/js-apis-audio.md +++ b/en/application-dev/reference/apis/js-apis-audio.md @@ -227,7 +227,7 @@ var audioCapturerOptions = { } var audioCapturer; -audio.createAudioRenderer(audioCapturerOptions).then((data) => { +audio.createAudioCapturer(audioCapturerOptions).then((data) => { audioCapturer = data; console.info('AudioCapturer Created : Success : Stream Type: SUCCESS'); }).catch((err) => { @@ -3183,7 +3183,7 @@ Subscribes to mark reached events. When the period of frame capturing reaches th | Name | Type | Mandatory| Description | | :------- | :----------------------- | :--- | :------------------------------------------ | | type | string | Yes | Type of event to subscribe to. The value **periodReach** means the period reached event, which is triggered when the period of frame capturing reaches the value of the **frame** parameter.| -| frame | number | Yes | Period during which frame rendering is listened. The value must be greater than **0**. | +| frame | number | Yes | Period during which frame capturing is listened. The value must be greater than **0**. | | callback | (position: number) => {} | Yes | Callback invoked when the event is triggered. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-camera.md b/en/application-dev/reference/apis/js-apis-camera.md index 17de0ce539..fb8037651d 100644 --- a/en/application-dev/reference/apis/js-apis-camera.md +++ b/en/application-dev/reference/apis/js-apis-camera.md @@ -1,6 +1,7 @@ # Camera Management -> **NOTE**
+> **NOTE** +> > The initial APIs of this module are supported since API version 9. API version 9 is a canary release for trial use. The APIs of this version may be unstable. ## Modules to Import diff --git a/en/application-dev/reference/apis/js-apis-convertxml.md b/en/application-dev/reference/apis/js-apis-convertxml.md index 7bf2fc1da2..88ebf47b02 100644 --- a/en/application-dev/reference/apis/js-apis-convertxml.md +++ b/en/application-dev/reference/apis/js-apis-convertxml.md @@ -29,7 +29,7 @@ Converts an XML text into a JavaScript object. | Name| Type| Mandatory| Description| | ------- | --------------------------------- | ---- | ------------------ | | xml | string | Yes| XML text to convert.| - | options | [ConvertOptions](#convertoptions) | No| Settings of the convert operation.| + | options | [ConvertOptions](#convertoptions) | No| Options for coversion.| - Return value diff --git a/en/application-dev/reference/apis/js-apis-faultLogger.md b/en/application-dev/reference/apis/js-apis-faultLogger.md index 9a6414cbb5..9a9116d7cb 100644 --- a/en/application-dev/reference/apis/js-apis-faultLogger.md +++ b/en/application-dev/reference/apis/js-apis-faultLogger.md @@ -43,7 +43,7 @@ Defines the data structure of the fault log information. querySelfFaultLog(faultType: FaultType, callback: AsyncCallback<Array<FaultLogInfo>>) : void -Obtains the fault information about the current process. This API uses a callback to return the fault information array obtained, which contains a maximum of 10 pieces of fault information. +Obtains the fault information about the current process. This API uses an asynchronous callback to return the fault information array obtained, which contains a maximum of 10 pieces of fault information. **System capability**: SystemCapability.HiviewDFX.Hiview.FaultLogger diff --git a/en/application-dev/reference/apis/js-apis-featureAbility.md b/en/application-dev/reference/apis/js-apis-featureAbility.md index e691213be2..821407ada2 100644 --- a/en/application-dev/reference/apis/js-apis-featureAbility.md +++ b/en/application-dev/reference/apis/js-apis-featureAbility.md @@ -1,6 +1,7 @@ -# FeatureAbility Module (JavaScript) +# FeatureAbility -> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. ## Constraints @@ -17,7 +18,7 @@ import featureAbility from '@ohos.ability.featureAbility' startAbility(parameter: StartAbilityParameter, callback: AsyncCallback\): void -Starts an ability. This method uses a callback to return the result. +Starts an ability. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -56,7 +57,7 @@ featureAbility.startAbility( startAbility(parameter: StartAbilityParameter): Promise\ -Starts an ability. This method uses a promise to return the result. +Starts an ability. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -123,7 +124,7 @@ featureAbility.acquireDataAbilityHelper( startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback\): void -Starts an ability. This method uses a callback to return the execution result when the ability is destroyed. +Starts an ability. This API uses a callback to return the execution result when the ability is destroyed. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -160,7 +161,7 @@ featureAbility.startAbilityForResult( startAbilityForResult(parameter: StartAbilityParameter): Promise\ -Starts an ability. This method uses a promise to return the execution result when the ability is destroyed. +Starts an ability. This API uses a promise to return the execution result when the ability is destroyed. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -216,7 +217,7 @@ featureAbility.startAbilityForResult( terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback\): void -Destroys this Page ability, with the result code and data sent to the caller. This method uses a callback to return the result. +Destroys this Page ability, with the result code and data sent to the caller. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -264,7 +265,7 @@ featureAbility.terminateSelfWithResult( terminateSelfWithResult(parameter: AbilityResult): Promise\ -Destroys this Page ability, with the result code and data sent to the caller. This method uses a promise to return the result. +Destroys this Page ability, with the result code and data sent to the caller. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -321,7 +322,7 @@ featureAbility.terminateSelfWithResult( hasWindowFocus(callback: AsyncCallback\): void -Checks whether the main window of this ability has the focus. This method uses a callback to return the result. +Checks whether the main window of this ability has the focus. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -344,7 +345,7 @@ featureAbility.hasWindowFocus() hasWindowFocus(): Promise\ -Checks whether the main window of this ability has the focus. This method uses a promise to return the result. +Checks whether the main window of this ability has the focus. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -369,7 +370,7 @@ featureAbility.hasWindowFocus().then((data) => { getWant(callback: AsyncCallback\): void -Obtains the **Want** object sent from this ability. This method uses a callback to return the result. +Obtains the **Want** object sent from this ability. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -392,7 +393,7 @@ featureAbility.getWant() getWant(): Promise\ -Obtains the **Want** object sent from this ability. This method uses a promise to return the result. +Obtains the **Want** object sent from this ability. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -439,7 +440,7 @@ context.getBundleName() terminateSelf(callback: AsyncCallback\): void -Destroys this Page ability, with the result code and data sent to the caller. This method uses a callback to return the result. +Destroys this Page ability, with the result code and data sent to the caller. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -462,7 +463,7 @@ featureAbility.terminateSelf() terminateSelf(): Promise\ -Destroys this Page ability, with the result code and data sent to the caller. This method uses a promise to return the result. +Destroys this Page ability, with the result code and data sent to the caller. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -484,7 +485,7 @@ featureAbility.terminateSelf().then((data) => { console.info("============= connectAbility(request: Want, options:ConnectOptions): number -Connects this ability to a specific Service ability. This method uses a callback to return the result. +Connects this ability to a specific Service ability. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -553,7 +554,7 @@ var connId = featureAbility.connectAbility( disconnectAbility(connection: number, callback:AsyncCallback\): void -Disconnects this ability from a specific Service ability. This method uses a callback to return the result. +Disconnects this ability from a specific Service ability. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -600,7 +601,7 @@ var result = featureAbility.disconnectAbility(connId, disconnectAbility(connection: number): Promise\ -Disconnects this ability from a specific Service ability. This method uses a promise to return the result. +Disconnects this ability from a specific Service ability. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -652,7 +653,7 @@ featureAbility.disconnectAbility(connId).then((error,data)=>{ getWindow(callback: AsyncCallback\): void -Obtains the window corresponding to this ability. This method uses a callback to return the result. +Obtains the window corresponding to this ability. This API uses a callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel @@ -672,7 +673,7 @@ featureAbility.getWindow() getWindow(): Promise\; -Obtains the window corresponding to this ability. This method uses a promise to return the result. +Obtains the window corresponding to this ability. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.FAModel diff --git a/en/application-dev/reference/apis/js-apis-lightweightmap.md b/en/application-dev/reference/apis/js-apis-lightweightmap.md index e28016b96b..173b45e65a 100644 --- a/en/application-dev/reference/apis/js-apis-lightweightmap.md +++ b/en/application-dev/reference/apis/js-apis-lightweightmap.md @@ -363,7 +363,7 @@ Removes an entry at the specified position from this container. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| index | number | Yes| Position index of the entry to remove.| +| index | number | Yes| Position index of the entry.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md index 01194e9635..778a22b5bb 100644 --- a/en/application-dev/reference/apis/js-apis-media.md +++ b/en/application-dev/reference/apis/js-apis-media.md @@ -579,7 +579,7 @@ let fdPath = 'fd://' let path = '/data/accounts/account_0/appdata/ohos.xxx.xxx.xxx/01.mp3'; fileIO.open(path).then(fdNumber) => { fdPath = fdPath + '' + fdNumber; - console.info('open fd sucess fd is' + fdPath); + console.info('open fd success fd is' + fdPath); }, (err) => { console.info('open fd failed err is' + err); }).catch((err) => { diff --git a/en/application-dev/reference/apis/js-apis-missionManager.md b/en/application-dev/reference/apis/js-apis-missionManager.md index e2d38af0a9..30cbca1543 100644 --- a/en/application-dev/reference/apis/js-apis-missionManager.md +++ b/en/application-dev/reference/apis/js-apis-missionManager.md @@ -618,7 +618,7 @@ Switches a given mission to the foreground. This API uses an asynchronous callba moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback<void>): void; -Switches a given mission to the foreground, with the startup parameters for the switch specified, such as the window mode and device ID. This API uses an asynchronous callback to return the result. +Switches a given mission to the foreground, with the startup parameters for the switching specified. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.Mission @@ -652,7 +652,7 @@ Switches a given mission to the foreground, with the startup parameters for the moveMissionToFront(missionId: number, options?: StartOptions): Promise<void>; -Switches a given mission to the foreground, with the startup parameters for the switch specified, such as the window mode and device ID. This API uses a promise to return the result. +Switches a given mission to the foreground, with the startup parameters for the switching specified. This API uses a promise to return the result. **System capability**: SystemCapability.Ability.AbilityRuntime.Mission diff --git a/en/application-dev/reference/apis/js-apis-system-battery.md b/en/application-dev/reference/apis/js-apis-system-battery.md index 596084f848..7b577c8ee8 100644 --- a/en/application-dev/reference/apis/js-apis-system-battery.md +++ b/en/application-dev/reference/apis/js-apis-system-battery.md @@ -1,6 +1,6 @@ # Battery Level -> ![icon-note.gif](public_sys-resources/icon-note.gif) **Note:** +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > - The APIs of this module are no longer maintained since API version 7. It is recommended that you use [`@ohos.batteryInfo`](js-apis-battery-info.md) instead. > > - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version. diff --git a/en/application-dev/reference/apis/js-apis-uri.md b/en/application-dev/reference/apis/js-apis-uri.md index 0975f28256..2b9a19244d 100644 --- a/en/application-dev/reference/apis/js-apis-uri.md +++ b/en/application-dev/reference/apis/js-apis-uri.md @@ -42,7 +42,7 @@ A constructor used to create a URI instance. | Name| Type.| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | -| url | string | Yes| Yes| Input object.| +| uri | string | Yes| Yes| Input object.| **Example** @@ -59,7 +59,7 @@ new uri.URI('http://username:password@host:8080'); // Output 'http://username:pa toString(): string -Obtains the query string applicable to this URL. +Obtains the query string applicable to this URI. **Return value** @@ -70,8 +70,8 @@ Obtains the query string applicable to this URL. **Example** ```js -const url = new uri.URL('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); -url.toString() +const uri = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da'); +uri.toString() ``` diff --git a/en/application-dev/reference/apis/js-apis-vibrator.md b/en/application-dev/reference/apis/js-apis-vibrator.md index fa467916b3..f8fe9d6630 100644 --- a/en/application-dev/reference/apis/js-apis-vibrator.md +++ b/en/application-dev/reference/apis/js-apis-vibrator.md @@ -85,7 +85,7 @@ Triggers vibration with a specific effect. This API uses a promise to return the **Parameters** | Name | Type | Mandatory | Description | | -------- | --------------------- | ---- | ------------- | -| effectId | [EffectId](#effectid) | Yes | String that indicates the vibration effect. | +| effectId | [EffectId](#effectid) | Yes | Vibration effect. | **Return value** | Type | Description | @@ -115,7 +115,7 @@ Triggers vibration with a specific effect. This API uses an asynchronous callbac **Parameters** | Name | Type | Mandatory | Description | | -------- | ------------------------- | ---- | ----------------------- | -| effectId | [EffectId](#effectid) | Yes | String that indicates the vibration effect. | +| effectId | [EffectId](#effectid) | Yes | Vibration effect. | | callback | AsyncCallback<void> | No | Callback used to indicate whether the vibration is triggered successfully. | **Example** @@ -182,7 +182,7 @@ Stops the vibration based on the specified **stopMode**. This API uses an asynch if(error){ console.log("error.code"+error.code+"error.message"+error.message); }else{ - console.log("Callback returned to indicate successful."); + console.log("Callback returned to indicate a successful stop."); } }) ``` diff --git a/en/application-dev/reference/apis/js-apis-wantAgent.md b/en/application-dev/reference/apis/js-apis-wantAgent.md index 49cc55c70d..6a088fe933 100644 --- a/en/application-dev/reference/apis/js-apis-wantAgent.md +++ b/en/application-dev/reference/apis/js-apis-wantAgent.md @@ -783,7 +783,7 @@ Checks whether two **WantAgent** objects are equal. This API uses an asynchronou | Name | Readable| Writable| Type | Mandatory| Description | | ---------- | --- | ---- | ------------------------ | ---- | --------------------------------------- | | agent | Yes | No | WantAgent | Yes | The first **WantAgent** object. | -| otherAgent | Yes | No | WantAgent | Yes | The second **WantAgent** object. | +| otherAgent | Yes | No | WantAgent | Yes | The second **WantAgent** object. | | callback | Yes | No | AsyncCallback\ | Yes | Callback used to return the result.| **Example** @@ -858,7 +858,7 @@ Checks whether two **WantAgent** objects are equal. This API uses a promise to r | Name | Readable| Writable| Type | Mandatory| Description | | ---------- | --- | ---- | --------- | ---- | ------------- | | agent | Yes | No | WantAgent | Yes | The first **WantAgent** object.| -| otherAgent | Yes | No | WantAgent | Yes | The second **WantAgent** object.| +| otherAgent | Yes | No | WantAgent | Yes | The second **WantAgent** object. | **Return value** @@ -936,10 +936,10 @@ Obtains the operation type of a **WantAgent** object. This API uses an asynchron ```js import WantAgent from '@ohos.wantAgent'; -//wantAgent���� +// wantAgent object var wantAgent; -//WantAgentInfo���� +// WantAgentInfo object var wantAgentInfo = { wants: [ { @@ -989,13 +989,13 @@ Obtains the operation type of a **WantAgent** object. This API uses a promise to | Name | Readable | Writable | Type | Mandatory | Description | | ---------- | --- | ---- | --------- | ---- | ------------- | -| agent | Yes | No | WantAgent | Yes | WantAgent���� | +| agent | Yes | No | WantAgent | Yes | Target **WantAgent** object. | **Return value** | Type | Description | | ----------------- | ------------------------------------------ | -| Promise\ | Promise used to return the operation type. | +| Promise\ | Promise used to return the operation type. | **Example** @@ -1003,10 +1003,10 @@ Obtains the operation type of a **WantAgent** object. This API uses a promise to ```js import WantAgent from '@ohos.wantAgent'; -//wantAgent���� +// wantAgent object var wantAgent; -//WantAgentInfo���� +// WantAgentInfo object var wantAgentInfo = { wants: [ { diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md index 881b281ffe..6c4890a972 100644 --- a/en/application-dev/reference/apis/js-apis-window.md +++ b/en/application-dev/reference/apis/js-apis-window.md @@ -77,7 +77,7 @@ This is a system API and cannot be called by third-party applications. | Name | Type | Readable| Writable| Description | | --------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ | -| type | [WindowType](#windowtype) | Yes | Yes | Type of the system bar whose properties are changed. Only the navigation bar and status bar are supported.| +| type | [WindowType](#windowtype) | Yes | Yes | Type of the system bar whose properties are changed. Only the status bar and navigation bar are supported.| | isEnable | boolean | Yes | Yes | Whether the system bar is displayed. | | region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. | | backgroundColor | string | Yes | Yes | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **\#00FF00** or **\#FF00FF00**.| @@ -488,7 +488,7 @@ Obtains the top window of the current application. This API uses a promise to re on(type: 'systemBarTintChange', callback: Callback<SystemBarTintState>): void -Enables listening for the properties changes of the status bar and navigation bar. +Enables listening for properties changes of the status bar and navigation bar. This is a system API and cannot be called by third-party applications. @@ -514,7 +514,7 @@ This is a system API and cannot be called by third-party applications. off(type: 'systemBarTintChange', callback?: Callback<SystemBarTintState >): void -Disables listening for the properties changes of the status bar and navigation bar. +Disables listening for properties changes of the status bar and navigation bar. This is a system API and cannot be called by third-party applications. @@ -1062,7 +1062,7 @@ Sets whether to enable the full-screen mode for the window layout. This API uses | Name | Type | Mandatory| Description | | ------------------ | ------------------------- | ---- | ------------------------------------------------------------ | -| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.| +| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed.| | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. | **Example** @@ -1090,7 +1090,7 @@ Sets whether to enable the full-screen mode for the window layout. This API uses | Name | Type | Mandatory| Description | | ------------------ | ------- | ---- | ------------------------------------------------------------ | -| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.| +| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed.| **Return value** @@ -1781,8 +1781,9 @@ setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void Sets the dimness of the window that is not on top. This API uses an asynchronous callback to return the result. -> This API is supported since API version 7 and deprecated since API version 9. +> **NOTE** > +> This API is supported since API version 7 and deprecated since API version 9. **System capability**: SystemCapability.WindowManager.WindowManager.Core @@ -1811,8 +1812,9 @@ setDimBehind(dimBehindValue: number): Promise<void> Sets the dimness of the window that is not on top. This API uses a promise to return the result. -> This API is supported since API version 7 and deprecated since API version 9. +> **NOTE** > +> This API is supported since API version 7 and deprecated since API version 9. **System capability**: SystemCapability.WindowManager.WindowManager.Core @@ -1911,7 +1913,7 @@ Sets whether to keep the screen always on. This API uses an asynchronous callbac | Name | Type | Mandatory| Description | | -------------- | ------------------------- | ---- | ------------------------ | -| isKeepScreenOn | boolean | Yes | Sets whether to keep the screen always on.| +| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.| | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. | **Example** @@ -1933,8 +1935,9 @@ setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): vo Sets whether the area outside the subwindow is touchable. This API uses an asynchronous callback to return the result. -> This API is supported since API version 7 and deprecated since API version 9. +> **NOTE** > +> This API is supported since API version 7 and deprecated since API version 9. **System capability**: SystemCapability.WindowManager.WindowManager.Core @@ -1963,8 +1966,9 @@ setOutsideTouchable(touchable: boolean): Promise<void> Sets whether the area outside the subwindow is touchable. This API uses a promise to return the result. -> This API is supported since API version 7 and deprecated since API version 9. +> **NOTE** > +> This API is supported since API version 7 and deprecated since API version 9. **System capability**: SystemCapability.WindowManager.WindowManager.Core @@ -2003,7 +2007,7 @@ Sets whether to keep the screen always on. This API uses a promise to return the | Name | Type | Mandatory| Description | | -------------- | ------- | ---- | ------------------------ | -| isKeepScreenOn | boolean | Yes | Sets whether to keep the screen always on.| +| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.| **Return value** -- GitLab