@@ -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
@@ -492,10 +610,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).
@@ -563,10 +697,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).
@@ -1061,10 +1267,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).
@@ -1097,10 +1311,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).