@@ -43,10 +43,10 @@ Starts an ability. This API uses an asynchronous callback to return the result.
...
@@ -43,10 +43,10 @@ Starts an ability. This API uses an asynchronous callback to return the result.
**Parameters**
**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.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -71,11 +71,11 @@ Starts an ability with **options** specified. This API uses an asynchronous call
...
@@ -71,11 +71,11 @@ Starts an ability with **options** specified. This API uses an asynchronous call
**Parameters**
**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.|
| 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**
**Example**
...
@@ -104,16 +104,16 @@ Starts an ability with **options** specified. This API uses a promise to return
...
@@ -104,16 +104,16 @@ Starts an ability with **options** specified. This API uses a promise to return
**Parameters**
**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.|
| options | StartOptions | Yes| Parameters used for starting the ability.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise<void> | Promise used to return the result.|
| Promise<void> | Promise used to return the result.|
**Example**
**Example**
```js
```js
...
@@ -143,15 +143,15 @@ Obtains the caller interface of the specified ability, and if the specified abil
...
@@ -143,15 +143,15 @@ Obtains the caller interface of the specified ability, and if the specified abil
**Parameters**
**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**
**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**
**Example**
...
@@ -184,11 +184,11 @@ Starts an ability with **accountId** specified. This API uses an asynchronous ca
...
@@ -184,11 +184,11 @@ Starts an ability with **accountId** specified. This API uses an asynchronous ca
**Parameters**
**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. |
| accountId | number | Yes| Account ID. |
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -214,12 +214,12 @@ Starts an ability with **accountId** and **options** specified. This API uses an
...
@@ -214,12 +214,12 @@ Starts an ability with **accountId** and **options** specified. This API uses an
**Parameters**
**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. |
| accountId | number | Yes| Account ID. |
| options | StartOptions | Yes| Parameters used for starting the 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**
**Example**
...
@@ -249,17 +249,17 @@ Starts an ability with **accountId** and **options** specified. This API uses a
...
@@ -249,17 +249,17 @@ Starts an ability with **accountId** and **options** specified. This API uses a
**Parameters**
**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. |
| accountId | number | Yes| Account ID. |
| options | StartOptions | No| Parameters used for starting the ability.|
| options | StartOptions | No| Parameters used for starting the ability.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise<void> | Promise used to return the result.|
| Promise<void> | Promise used to return the result.|
**Example**
**Example**
```js
```js
...
@@ -349,7 +349,7 @@ Starts an ability with **options** specified. This API uses a promise to return
...
@@ -349,7 +349,7 @@ Starts an ability with **options** specified. This API uses a promise to return
**Parameters**
**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.|
| 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
...
@@ -446,7 +446,7 @@ Starts an ability with **accountId** and **options** specified. This API uses a
**Parameters**
**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. |
| accountId | number | Yes| Account ID. |
...
@@ -482,15 +482,15 @@ Terminates this ability. This API uses an asynchronous callback to return the re
...
@@ -482,15 +482,15 @@ Terminates this ability. This API uses an asynchronous callback to return the re
**Parameters**
**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.|
@@ -785,16 +785,16 @@ Requests permissions from end users in the form of a dialog box. This API uses a
...
@@ -785,16 +785,16 @@ Requests permissions from end users in the form of a dialog box. This API uses a
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| permissions | Array<string> | Yes| Permissions to request.|
| permissions | Array<string> | Yes| Permissions to request.|
| callback | AsyncCallback<PermissionRequestResult> | Yes| Callback used to return the result indicating whether the API is successfully called.|
| callback | AsyncCallback<PermissionRequestResult> | Yes| Callback used to return the result indicating whether the API is successfully called.|
| 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.|
| 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. |
| callback | (position: number) => {} | Yes | Callback invoked when the event is triggered. |
> 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.
> 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.
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.
> 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.
> 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
## Constraints
...
@@ -17,7 +18,7 @@ import featureAbility from '@ohos.ability.featureAbility'
...
@@ -17,7 +18,7 @@ import featureAbility from '@ohos.ability.featureAbility'
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.
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.
> - 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 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.
> - 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.
| 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. |
| isEnable | boolean | Yes | Yes | Whether the system bar is displayed. |
| region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. |
| 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**.|
| 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
...
@@ -488,7 +488,7 @@ Obtains the top window of the current application. This API uses a promise to re
| 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. |
| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
**Example**
...
@@ -1090,7 +1090,7 @@ Sets whether to enable the full-screen mode for the window layout. This API uses
...
@@ -1090,7 +1090,7 @@ Sets whether to enable the full-screen mode for the window layout. This API uses
| 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.|