提交 974ece4d 编写于 作者: W wusongqing

updated docs against master updates

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 a4969725
......@@ -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\<string> | Yes | No | Capabilities required for module running.|
| deviceTypes | Array\<string> | Yes | No | An array of supported device types.|
| abilityInfo | Array\\<AbilityInfo> | Yes | No | Ability information. |
| deviceTypes | Array\<string> | Yes | No | Device types supported by the module.|
| abilityInfo | Array\<AbilityInfo> | 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
......
......@@ -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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | Yes| Callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result.|
| Promise&lt;void&gt; | 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&lt;Caller&gt; | Promise used to return the caller object to communicate with.|
| Promise&lt;Caller&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | Yes| Callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result.|
| Promise&lt;void&gt; | 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&lt;void&gt; | Yes| Callback used to return the result indicating whether the API is successfully called.|
| callback | AsyncCallback&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result indicating whether the API is successfully called.|
| Promise&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result.|
| Promise&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result.|
| Promise&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | Promise used to return the result indicating whether the API is successfully called.|
| Promise&lt;void&gt; | 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&lt;string&gt; | Yes| Permissions to request.|
| callback | AsyncCallback&lt;PermissionRequestResult&gt; | Yes| Callback used to return the result indicating whether the API is successfully called.|
| permissions | Array&lt;string&gt; | Yes| Permissions to request.|
| callback | AsyncCallback&lt;PermissionRequestResult&gt; | 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&lt;string&gt; | Yes| Permissions to request.|
| permissions | Array&lt;string&gt; | Yes| Permissions to request.|
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| Promise&lt;PermissionRequestResult&gt; | Promise used to return the result indicating whether the API is successfully called.|
| Promise&lt;PermissionRequestResult&gt; | 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**
......
......@@ -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
......
......@@ -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));
});
```
......
......@@ -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**
......
# Camera Management
> **NOTE**<br/>
> **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
......
......@@ -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
......
......@@ -43,7 +43,7 @@ Defines the data structure of the fault log information.
querySelfFaultLog(faultType: FaultType, callback: AsyncCallback&lt;Array&lt;FaultLogInfo&gt;&gt;) : 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
......
# 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\<number>): 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\<number>
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\<AbilityResult>): 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\<AbilityResult>
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>): 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\<void>
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\<boolean>): 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\<boolean>
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\<Want>): 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\<Want>
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>): 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\<void>
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>): 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\<void>
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\<window.Window>): 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\<window.Window>;
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
......
......@@ -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**
......
......@@ -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) => {
......
......@@ -618,7 +618,7 @@ Switches a given mission to the foreground. This API uses an asynchronous callba
moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback&lt;void&gt;): 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&lt;void&gt;;
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
......
# 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.
......
......@@ -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()
```
......
......@@ -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&lt;void&gt; | 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.");
}
})
```
......
......@@ -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\<boolean\> | 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\<number\> | Promise used to return the operation type. |
| Promise\<number> | 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: [
{
......
......@@ -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&lt;SystemBarTintState&gt;): 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&lt;SystemBarTintState &gt;): 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&lt;void&gt; | 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&lt;void&gt;): 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&lt;void&gt;
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&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example**
......@@ -1933,8 +1935,9 @@ setOutsideTouchable(touchable: boolean, callback: AsyncCallback&lt;void&gt;): 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&lt;void&gt;
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**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册