@@ -6,6 +6,12 @@ The **AbilityDelegator** module provides APIs for managing **AbilityMonitor** in
>
> 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.
An **AbilityDelegator** object is obtained by calling [getAbilityDelegator](js-apis-app-ability-abilityDelegatorRegistry.md#abilitydelegatorregistrygetabilitydelegator) in **AbilityDelegatorRegistry**.
...
...
@@ -30,10 +36,18 @@ Adds an **AbilityMonitor** instance. This API uses an asynchronous callback to r
@@ -480,10 +598,18 @@ Schedules the lifecycle state of an ability to **Foreground**. This API uses an
| ability | UIAbility | Yes | Target ability. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result.<br>\-**true**: The operation is successful.<br>\-**false**: The operation failed.|
**Error codes**
| ID| Error Message|
| ------- | -------- |
| 16000100 | DoAbilityForeground failed. |
For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
@@ -547,10 +681,18 @@ Schedules the lifecycle state of an ability to **Background**. This API uses an
| ability | UIAbility | Yes | Target ability. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result.<br>\-**true**: The operation is successful.<br>\-**false**: The operation failed.|
**Error codes**
| ID| Error Message|
| ------- | -------- |
| 16000100 | DoAbilityBackground failed. |
For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
| callback | AsyncCallback\<AbilityStage> | Yes | Callback used to return the result. If the operation is successful, an **AbilityStage** instance is returned. Otherwise, no value is returned. |
**Error codes**
| ID| Error Message|
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
@@ -1023,10 +1229,18 @@ Waits for an **AbilityStage** instance that matches the conditions set in an **A
| -------------- | ------------------- |
| Promise\<AbilityStage> | Promise used to return the result. If the operation is successful, an **AbilityStage** instance is returned. Otherwise, no value is returned.|
**Error codes**
| ID| Error Message|
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
@@ -1059,10 +1273,18 @@ Waits a period of time for an **AbilityStage** instance that matches the conditi
| timeout | number | No | Maximum waiting time, in milliseconds.|
| callback | AsyncCallback\<AbilityStage> | Yes | Callback used to return the result. If the operation is successful, an **AbilityStage** instance is returned. Otherwise, no value is returned. |
**Error codes**
| ID| Error Message|
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
For details about the error codes, see [Ability Error Codes](../errorcodes/errorcode-ability.md).
@@ -6,6 +6,12 @@ The **AbilityMonitor** module provides monitors for abilities that meet specifie
>
> 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.
**AbilityMonitor** can be used as an input parameter of [addAbilityMonitor](js-apis-inner-application-abilityDelegator.md#addabilitymonitor9) in **abilityDelegator** to listen for lifecycle changes of an ability.
@@ -6,6 +6,12 @@ The **AbilityRunningInfo** module defines the running information and state of a
>
> 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 ability running information is obtained by calling [getAbilityRunningInfos](js-apis-app-ability-abilityManager.md#getabilityrunninginfos) in **abilityManager**.
...
...
@@ -31,7 +37,7 @@ The ability running information is obtained by calling [getAbilityRunningInfos](
The **AbilityStageMonitor** module provides conditions for matching **AbilityStage** instances. The most recently matched **AbilityStage** instance is saved in an **AbilityStageMonitor** instance.
The **AbilityStageMonitor** module provides conditions for matching **AbilityStage** instances. The most recently matched **AbilityStage** instance is saved in an **AbilityStageMonitor** instance.
@@ -6,6 +6,12 @@ The **ProcessInformation** module defines the running information of a process.
>
> 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 process information is obtained by calling [getRunningProcessInformation](js-apis-app-ability-appManager.md#appmanagergetrunningprocessinformation9) of the **appManager** module.
...
...
@@ -14,7 +20,7 @@ The process information is obtained by calling [getRunningProcessInformation](js
@@ -6,6 +6,12 @@ The **ShellCmdResult** module provides the shell command execution 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.