> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...
@@ -10,7 +9,7 @@ Provides the snapshot of a mission.
...
@@ -10,7 +9,7 @@ Provides the snapshot of a mission.
## Modules to Import
## Modules to Import
```
```
import abilitymanager from '@ohos.application.abilityManager';
import missionManager from '@ohos.application.missionManager'
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
Provides the context for running code, including **applicationInfo** and **resourceManager**.
Provides the context for running code, including **applicationInfo** and **resourceManager**.
...
@@ -19,43 +20,43 @@ You must extend **AbilityContext** to implement this module.
...
@@ -19,43 +20,43 @@ You must extend **AbilityContext** to implement this module.
> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The initial APIs of this module are supported since API 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
Implements event subscription, unsubscription, and triggering.
Implements event subscription, unsubscription, and triggering.
...
@@ -14,11 +15,8 @@ import Ability from '@ohos.application.Ability'
...
@@ -14,11 +15,8 @@ import Ability from '@ohos.application.Ability'
## Usage
## Usage
Before using any APIs in the **EventHub**, you must obtain an **EventHub** instance through the member variable **context** of the **Ability** instance.
Before using any APIs in the **EventHub**, you must obtain an **EventHub** instance through the member variable **context** of the **Ability** instance.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Provides extension running information.
Provides extension running information.
## Modules to Import
## Modules to Import
...
@@ -14,11 +14,8 @@ import abilitymanager from '@ohos.application.abilityManager';
...
@@ -14,11 +14,8 @@ import abilitymanager from '@ohos.application.abilityManager';
## Usage
## Usage
The extension running information is obtained through an **abilityManager** instance.
The extension running information is obtained through an **abilityManager** instance.
> 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.
> The APIs of this module can be used only in the FA model.
## Constraints
## Constraints
...
@@ -923,7 +925,7 @@ Enumerates operation types of the Data ability.
...
@@ -923,7 +925,7 @@ Enumerates operation types of the Data ability.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
## Modules to Import
...
@@ -38,12 +39,20 @@ Creates a **FormBindingData** object.
...
@@ -38,12 +39,20 @@ Creates a **FormBindingData** object.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
Implements the context that provides the capabilities and APIs of **FormExtension**. This class is inherited from **ExtensionContext**.
Implements the context that provides the capabilities and APIs of **FormExtension**. This class is inherited from **ExtensionContext**.
...
@@ -21,11 +23,11 @@ Updates a widget. This method uses a callback to return the result.
...
@@ -21,11 +23,11 @@ Updates a widget. This method uses a callback to return the result.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
missionManager provides APIs to lock, unlock, and clear missions, and switch a mission to the foreground.
missionManager provides APIs to lock, unlock, and clear missions, and switch a mission to the foreground.
...
@@ -26,15 +27,15 @@ Registers a listener to observe the mission status.
...
@@ -26,15 +27,15 @@ Registers a listener to observe the mission status.
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| listener | MissionListener | Yes| Listener to register.|
| listener | MissionListener | Yes| Listener to register.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| number | Returns the unique index of the mission status listener, which is created by the system and allocated when the listener is registered.|
| number | Returns the unique index of the mission status listener, which is created by the system and allocated when the listener is registered.|
**Example**
**Example**
...
@@ -62,10 +63,10 @@ Deregisters a mission status listener. This API uses an asynchronous callback to
...
@@ -62,10 +63,10 @@ Deregisters a mission status listener. This API uses an asynchronous callback to
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.|
| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -96,15 +97,15 @@ Deregisters a mission status listener. This API uses a promise to return the res
...
@@ -96,15 +97,15 @@ Deregisters a mission status listener. This API uses a promise to return the res
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.|
| listenerId | number | Yes| Unique index of the mission status listener to unregister. It is returned by **registerMissionListener**.|
**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**
...
@@ -135,11 +136,11 @@ Obtains the information about a given mission. This API uses an asynchronous cal
...
@@ -135,11 +136,11 @@ Obtains the information about a given mission. This API uses an asynchronous cal
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| callback | AsyncCallback<[MissionInfo](#missioninfo)> | Yes| Callback used to return the mission information obtained.|
| callback | AsyncCallback<[MissionInfo](#missioninfo)> | Yes| Callback used to return the mission information obtained.|
**Example**
**Example**
...
@@ -169,16 +170,16 @@ Obtains the information about a given mission. This API uses a promise to return
...
@@ -169,16 +170,16 @@ Obtains the information about a given mission. This API uses a promise to return
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise<[MissionInfo](#missioninfo)> | Promise used to return the mission information obtained.|
| Promise<[MissionInfo](#missioninfo)> | Promise used to return the mission information obtained.|
**Example**
**Example**
...
@@ -201,11 +202,11 @@ Obtains information about all missions. This API uses an asynchronous callback t
...
@@ -201,11 +202,11 @@ Obtains information about all missions. This API uses an asynchronous callback t
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| numMax | number | Yes| Maximum number of missions whose information can be obtained.|
| numMax | number | Yes| Maximum number of missions whose information can be obtained.|
| callback | AsyncCallback<Array<[MissionInfo](#missioninfo)>> | Yes| Callback used to return the array of mission information obtained.|
| callback | AsyncCallback<Array<[MissionInfo](#missioninfo)>> | Yes| Callback used to return the array of mission information obtained.|
**Example**
**Example**
...
@@ -230,16 +231,16 @@ Obtains information about all missions. This API uses a promise to return the re
...
@@ -230,16 +231,16 @@ Obtains information about all missions. This API uses a promise to return the re
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| numMax | number | Yes| Maximum number of missions whose information can be obtained.|
| numMax | number | Yes| Maximum number of missions whose information can be obtained.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise<Array<[MissionInfo](#missioninfo)>> | Promise used to return the array of mission information obtained.|
| Promise<Array<[MissionInfo](#missioninfo)>> | Promise used to return the array of mission information obtained.|
**Example**
**Example**
...
@@ -262,11 +263,11 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback
...
@@ -262,11 +263,11 @@ Obtains the snapshot of a given mission. This API uses an asynchronous callback
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| callback | AsyncCallback<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Yes| Callback used to return the snapshot information obtained.|
| callback | AsyncCallback<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Yes| Callback used to return the snapshot information obtained.|
**Example**
**Example**
...
@@ -297,16 +298,16 @@ Obtains the snapshot of a given mission. This API uses a promise to return the r
...
@@ -297,16 +298,16 @@ Obtains the snapshot of a given mission. This API uses a promise to return the r
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| deviceId | string | Yes| Device ID. It is a null string by default for the local device.|
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| Promise<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Promise used to return the snapshot information obtained.|
| Promise<[MissionSnapshot](js-apis-application-MissionSnapshot.md)> | Promise used to return the snapshot information obtained.|
**Example**
**Example**
...
@@ -337,10 +338,10 @@ Locks a given mission. This API uses an asynchronous callback to return the resu
...
@@ -337,10 +338,10 @@ Locks a given mission. This API uses an asynchronous callback to return the resu
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -370,15 +371,15 @@ Locks a given mission. This API uses a promise to return the result.
...
@@ -370,15 +371,15 @@ Locks a given mission. This API uses a promise to return the result.
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
**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**
...
@@ -441,15 +442,15 @@ Unlocks a given mission. This API uses a promise to return the result.
...
@@ -441,15 +442,15 @@ Unlocks a given mission. This API uses a promise to return the result.
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
**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**
...
@@ -483,10 +484,10 @@ Clears a given mission, regardless of whether it is locked. This API uses an asy
...
@@ -483,10 +484,10 @@ Clears a given mission, regardless of whether it is locked. This API uses an asy
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -516,15 +517,15 @@ Clears a given mission, regardless of whether it is locked. This API uses a prom
...
@@ -516,15 +517,15 @@ Clears a given mission, regardless of whether it is locked. This API uses a prom
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
**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**
...
@@ -574,9 +575,9 @@ Clears all unlocked missions. This API uses a promise to return the result.
...
@@ -574,9 +575,9 @@ Clears all unlocked missions. This API uses a promise to return the result.
**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**
...
@@ -598,10 +599,10 @@ Switches a given mission to the foreground. This API uses an asynchronous callba
...
@@ -598,10 +599,10 @@ Switches a given mission to the foreground. This API uses an asynchronous callba
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -631,11 +632,11 @@ Switches a given mission to the foreground, with the startup parameters for the
...
@@ -631,11 +632,11 @@ Switches a given mission to the foreground, with the startup parameters for the
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| options | StartOptions | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.|
| options | StartOptions | Yes| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
| callback | AsyncCallback<void> | Yes| Callback used to return the result.|
**Example**
**Example**
...
@@ -665,16 +666,16 @@ Switches a given mission to the foreground, with the startup parameters for the
...
@@ -665,16 +666,16 @@ Switches a given mission to the foreground, with the startup parameters for the
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| missionId | number | Yes| Mission ID.|
| missionId | number | Yes| Mission ID.|
| options | StartOptions | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.|
| options | StartOptions | No| Startup parameters, which are used to specify the window mode and device ID for switching the mission to the foreground.|
**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**
...
@@ -700,13 +701,13 @@ Describes the mission information.
...
@@ -700,13 +701,13 @@ Describes the mission information.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Provides process running information.
Provides process running information.
## Modules to Import
## Modules to Import
...
@@ -14,11 +14,8 @@ import appManager from '@ohos.application.appManager'
...
@@ -14,11 +14,8 @@ import appManager from '@ohos.application.appManager'
## Usage
## Usage
The process running information is obtained through an **appManager** instance.
The process running information is obtained through an **appManager** instance.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.