@@ -8,14 +8,17 @@ This module provides the following common ability-related functions:
-[Callee](#callee): implements callbacks for registration and deregistration of caller notifications.
> **NOTE**
>
> 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 are deprecated since API version 9. You are advised to use [@ohos.app.ability.UIAbility (UIAbility)](js-apis-app-ability-uiAbility.md) instead.
>
> 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.
## Modules to Import
```ts
importUIAbilityfrom'@ohos.app.ability.UIAbility';
importUIAbilityfrom'@ohos.application.Ability';
```
## Attributes
...
...
@@ -72,7 +75,7 @@ Called when a **WindowStage** is created for this ability.
**Example**
```ts
classmyAbilityextendsAbility{
exportdefaultclassEntryAbilityextendsUIAbility{
onWindowStageCreate(windowStage){
console.log('onWindowStageCreate');
}
...
...
@@ -91,7 +94,7 @@ Called when the **WindowStage** is destroyed for this ability.
**Example**
```ts
classmyAbilityextendsAbility{
exportdefaultclassEntryAbilityextendsUIAbility{
onWindowStageDestroy(){
console.log('onWindowStageDestroy');
}
...
...
@@ -116,7 +119,7 @@ Called when the **WindowStage** is restored during the migration of this ability
**Example**
```ts
classmyAbilityextendsAbility{
exportdefaultclassEntryAbilityextendsUIAbility{
onWindowStageRestore(windowStage){
console.log('onWindowStageRestore');
}
...
...
@@ -133,9 +136,9 @@ Called when this ability is destroyed to clear resources.
@@ -256,9 +260,9 @@ Called when the global configuration is updated.
| config | [Configuration](js-apis-application-configuration.md) | Yes| Callback invoked when the global configuration is updated. The global configuration indicates the configuration of the environment where the application is running and includes the language and color mode.|
@@ -305,9 +309,9 @@ Called when the system has decided to adjust the memory level. For example, this
| level | [AbilityConstant.MemoryLevel](js-apis-application-abilityConstant.md#abilityconstantmemorylevel) | Yes| Memory level that indicates the memory usage status. When the specified memory level is reached, a callback will be invoked and the system will start adjustment.|
Obtains information about the applications that are running in the foreground. This API uses an asynchronous callback to return the result. The application information is defined by [AppStateData](js-apis-inner-application-appStateData.md).
@@ -10,7 +10,7 @@ The **AbilityDelegator** module provides APIs for managing **AbilityMonitor** in
An **AbilityDelegator** object is obtained by calling [getAbilityDelegator](js-apis-app-ability-abilityDelegatorRegistry.md#abilitydelegatorregistrygetabilitydelegator) in **AbilityDelegatorRegistry**.