diff --git a/en/application-dev/ability/fa-pageability.md b/en/application-dev/ability/fa-pageability.md index 024c3397450b40858f31dfeef5ca3fe66dc2435e..461e0565721d047922cac8fbaf0b1b46a26031c3 100644 --- a/en/application-dev/ability/fa-pageability.md +++ b/en/application-dev/ability/fa-pageability.md @@ -33,6 +33,19 @@ Description of ability lifecycle states: You can override the lifecycle callbacks provided by the Page ability in the **app.js/app.ets** file. Currently, the **app.js** file provides only the **onCreate** and **onDestroy** callbacks, and the **app.ets** file provides the full lifecycle callbacks. +### Launch Type +The ability supports three launch types: singleton, multi-instance, and instance-specific. +The **launchType** item in the **config.json** file is used to specify the launch type. + +| Launch Type | Description |Description | +| ----------- | ------- |---------------- | +| stand | Multi-instance | A new instance is started each time an ability starts.| +| singleton | Singleton | Only one instance exists in the system. If an instance already exists when an ability is started, that instance is reused.| +| specified | Instance-specific| The internal service of an ability determines whether to create multiple instances during running.| + +By default, **stand** is used. + + ## Development Guidelines ### Available APIs @@ -69,7 +82,7 @@ You can override the lifecycle callbacks provided by the Page ability in the **a authReadUriPermission: true, // Grant the permission to perform write operations on the URI. authWriteUriPermission: true, - // Support forwarding the Want result to the ability. + // support forwarding the Want result to the ability. abilityForwardResult: true, // Enable abiligy continuation. abilityContinuation: true, diff --git a/en/application-dev/ability/stage-ability.md b/en/application-dev/ability/stage-ability.md index c33df53cad89c40e5b26532c62d4442ea2ad9187..ec9cf40f0c62d7b88dac7d8b8a90cdcc9772054b 100644 --- a/en/application-dev/ability/stage-ability.md +++ b/en/application-dev/ability/stage-ability.md @@ -10,6 +10,18 @@ The stage model is an application development model introduced in API version 9. - Connect to and disconnect from the Service ability. For details, see [Service Extension Ability Development](stage-serviceextension.md). - Continue the application on another device. For details, see [Ability Continuation Development](stage-ability-continuation.md). +### Launch Type +The ability supports three launch types: singleton, multi-instance, and instance-specific. +The **launchType** item in the **module.json** file is used to specify the launch type. + +| Launch Type | Description |Description | +| ----------- | ------- |---------------- | +| stand | Multi-instance | A new instance is started each time an ability starts.| +| singleton | Singleton | Only one instance exists in the system. If an instance already exists when an ability is started, that instance is reused.| +| specified | Instance-specific| The internal service of an ability determines whether to create multiple instances during running.| + +By default, **stand** is used. + ## Available APIs The table below describes the APIs provided by the **AbilityStage** class, which has the **context** attribute. For details about the APIs, see [AbilityStage](../reference/apis/js-apis-application-abilitystage.md).