\ No newline at end of file
diff --git a/en/application-dev/application-models/abilitystage.md b/en/application-dev/application-models/abilitystage.md
new file mode 100644
index 0000000000000000000000000000000000000000..fa3aa07c60287688749c13035451d0b470e621ea
--- /dev/null
+++ b/en/application-dev/application-models/abilitystage.md
@@ -0,0 +1,58 @@
+# AbilityStage Component Container
+
+
+AbilityStage is a component container at the [module](../quick-start/application-package-structure-stage.md) level. When the HAP of an application is loaded for the first time, an AbilityStage instance is created. You can perform operations such as initialization on the instance.
+
+
+An AbilityStage instance corresponds to a module.
+
+
+AbilityStage is not automatically generated in the default project of DevEco Studio. To use AbilityStage, you can manually create an AbilityStage file. The procedure is as follows:
+
+
+1. In the **ets** directory of the **Module** project, right-click and choose **New > Directory** to create a directory named **myabilitystage**.
+
+2. In the **myabilitystage** directory, right-click and choose **New > ts File** to create a file named **MyAbilityStage.ts**.
+
+3. Open the **MyAbilityStage.ts** file, and import the dependency package of AbilityStage. Customize a class that inherits from AbilityStage, and add the required lifecycle callbacks. The following code snippet adds the **onCreate()** lifecycle callback.
+
+ ```ts
+ import AbilityStage from '@ohos.app.ability.AbilityStage';
+
+ export default class MyAbilityStage extends AbilityStage {
+ onCreate() {
+ // When the HAP of the application is loaded for the first time, initialize the module.
+ }
+ onAcceptWant(want) {
+ // Triggered only for the ability with the specified launch type.
+ return "MyAbilityStage";
+ }
+ }
+ ```
+
+
+[AbilityStage](../reference/apis/js-apis-app-ability-abilityStage.md) has the lifecycle callback [onCreate()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageoncreate) and the event callbacks [onAcceptWant()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonacceptwant), [onConfigurationUpdated()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonconfigurationupdate), and [onMemoryLevel()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonmemorylevel).
+
+
+- **onCreate()** lifecycle callback: Before the first UIAbility instance of a module is loaded, an AbilityStage instance is created. This callback is invoked when the AbilityStage instance is created. The AbilityStage module notifies you of when you can perform module initialization such as resource pre-loading and thread creation during module loading.
+
+- **onAcceptWant()** event callback: triggered when the UIAbility is started in [specified mode](uiability-launch-type.md#specified). For details, see [UIAbility Component Launch Type](uiability-launch-type.md).
+
+- **onConfigurationUpdated()** event callback: triggered when the global system configuration changes. The global system configuration, such as the system language and theme, are defined in the [Configuration](../reference/apis/js-apis-app-ability-configuration.md) class before project configuration.
+
+- **onMemoryLevel()** event callback: triggered when the system adjusts the memory.
+
+When an application is switched to the background, it is cached in the background. This adversely affects the overall system performance. When system resources are insufficient, the system reclaims memory from applications in multiple ways. For example, the system may stop applications to release memory for executing key tasks. To further maintain the balance of the system memory and prevent the system from stopping application processes, you can subscribe to the system memory changes in the **onMemoryLevel()** lifecycle callback of AbilityStage to release unnecessary resources.
+
+
+ ```ts
+ import AbilityStage from '@ohos.app.ability.AbilityStage';
+
+ export default class MyAbilityStage extends AbilityStage {
+ onMemoryLevel(level) {
+ // Release unnecessary memory based on the change of available system memory.
+ }
+ }
+ ```
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/access-dataability.md b/en/application-dev/application-models/access-dataability.md
new file mode 100644
index 0000000000000000000000000000000000000000..24dc9305f194a61c974c63db224f2e7727689f5f
--- /dev/null
+++ b/en/application-dev/application-models/access-dataability.md
@@ -0,0 +1,204 @@
+# Accessing a DataAbility
+
+
+To access a DataAbility, import the basic dependency packages and obtain the URI string for communicating with the DataAbility.
+
+
+The basic dependency packages include:
+
+
+- @ohos.ability.featureAbility
+
+- @ohos.data.dataAbility
+
+- @ohos.data.rdb
+
+
+The sample code for accessing a DataAbility is as follows:
+
+
+1. Create a **DataAbilityHelper** instance.
+
+ ```ts
+ // Different from the URI defined in the config.json file, the URI passed in the parameter has an extra slash (/), three slashes in total.
+ import featureAbility from '@ohos.ability.featureAbility'
+ import ohos_data_ability from '@ohos.data.dataAbility'
+ import ohos_data_rdb from '@ohos.data.rdb'
+
+ let urivar = "dataability:///com.ix.DataAbility"
+ let DAHelper = featureAbility.acquireDataAbilityHelper(urivar);
+ ```
+
+2. Construct RDB data.
+
+ ```ts
+ let valuesBucket = {"name": "gaolu"}
+ let da = new ohos_data_ability.DataAbilityPredicates()
+ let valArray =new Array("value1");
+ let cars = new Array({"batchInsert1" : "value1",});
+ ```
+
+ For details about DataAbilityPredicates, see [DataAbility Predicates](../reference/apis/js-apis-data-ability.md).
+
+3. Use **insert** to insert data to the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.insert(
+ urivar,
+ valuesBucket,
+ (error, data) => {
+ console.info("DAHelper insert result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let datainsert = await DAHelper.insert(urivar, valuesBucket).then((data) => {
+ console.info("insert success.");
+ }).catch((error) => {
+ console.error("insert failed.");
+ });
+ ```
+
+4. Use **delete** to delete data from the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.delete(
+ urivar,
+ da,
+ (error, data) => {
+ console.info("DAHelper delete result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let datadelete = await DAHelper.delete(
+ urivar,
+ da,
+ );
+ ```
+
+5. Use **update** to update data in the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.update(
+ urivar,
+ valuesBucket,
+ da,
+ (error, data) => {
+ console.info("DAHelper update result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let dataupdate = await DAHelper.update(
+ urivar,
+ valuesBucket,
+ da,
+ );
+ ```
+
+6. Use **query** to query data in the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.query(
+ urivar,
+ valArray,
+ da,
+ (error, data) => {
+ console.info("DAHelper query result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let dataquery = await DAHelper.query(
+ urivar,
+ valArray,
+ da
+ );
+ ```
+
+7. Use **batchInsert** to insert data in batches to the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.batchInsert(
+ urivar,
+ cars,
+ (error, data) => {
+ console.info("DAHelper batchInsert result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let databatchInsert = await DAHelper.batchInsert(
+ urivar,
+ cars
+ );
+ ```
+
+8. Use **executeBatch** to process data in batches in the DataAbility.
+
+ ```ts
+ // Callback mode:
+ DAHelper.executeBatch(
+ urivar,
+ [
+ {
+ uri: urivar,
+ type: featureAbility.DataAbilityOperationType.TYPE_INSERT,
+ valuesBucket: {"executeBatch" : "value1",},
+ predicates: da,
+ expectedCount:0,
+ predicatesBackReferences: null,
+ interrupted:true,
+ }
+ ],
+ (error, data) => {
+ console.info("DAHelper executeBatch result: " + data)
+ }
+ );
+ ```
+
+
+ ```ts
+ // Promise mode (await needs to be used in the asynchronous method):
+ let dataexecuteBatch = await DAHelper.executeBatch(
+ urivar,
+ [
+ {
+ uri: urivar,
+ type: featureAbility.DataAbilityOperationType.TYPE_INSERT,
+ valuesBucket:
+ {
+ "executeBatch" : "value1",
+ },
+ predicates: da,
+ expectedCount:0,
+ predicatesBackReferences: null,
+ interrupted:true,
+ }
+ ]
+ );
+ ```
+
+
+The APIs for operating a DataAbility are provided by **DataAbilityHelper**. For details about the APIs, see [DataAbilityHelper](../reference/apis/js-apis-inner-ability-dataAbilityHelper.md).
diff --git a/en/application-dev/application-models/access-datashareextensionability-from-fa.md b/en/application-dev/application-models/access-datashareextensionability-from-fa.md
new file mode 100644
index 0000000000000000000000000000000000000000..0abc7e3b8e948529b9916f936bf59b4a60a93637
--- /dev/null
+++ b/en/application-dev/application-models/access-datashareextensionability-from-fa.md
@@ -0,0 +1,52 @@
+# Accessing a DataShareExtensionAbility from the FA Model
+
+
+## Overview
+
+Regardless of the FA model or stage model, the data read/write function consists of the client and server.
+
+- In the FA model, the client uses the **DataAbilityHelper** class to provide external APIs, and the server uses the **DataAbility** class to provide database read and write services.
+
+- In the stage model, the client uses the **DataShareHelper** class to provide external APIs, and the server uses the **DataShareExtensionAbility** class to provide database read and write services.
+
+If the client uses the FA model whereas the server is upgraded to the stage model, the client cannot access the server.
+
+To resolve this issue, OpenHarmony provides a solution on the framework side for smooth evolution.
+
+
+## Basic Principles
+
+A compatible method is that **DataAbilityHelper** determines whether to call the **DataShareHelper** APIs based on the URI prefix (either **DataAbility** or **DataShare**). However, this method requires modification to the URI in the original client code.
+
+Instead of manual modification, OpenHarmony adopts the following processing:
+
+1. The system attempts to start the DataAbility based on the URI passed in. If the startup fails, the system converts the URI prefix to **DataShare** and attempts to start the DataShareExtensionAbility.
+
+2. If the URI does not map to any DataAbility or DataShareExtensionAbility, the startup fails. Otherwise, either the DataAbility or DataShareExtensionAbility is started.
+
+
+## Constraints
+
+1. When you switch a DataAbility to a DataShareExtensionAbility, only the URI prefix can be modified.
+
+2. The **DataShareHelper** class implements only certain APIs of **DataAbilityHelper**. For details about the APIs, see the table below.
+
+ **Table 1** APIs invoked when the FA model accesses a DataShareExtensionAbility of the stage model
+
+ | API| Provided by DataAbilityHelper| Provided by DataShareHelper| Compatible|
+ | -------- | -------- | -------- | -------- |
+ | on | Yes| Yes| Yes|
+ | off | Yes| Yes| Yes|
+ | notifyChange | Yes| Yes| Yes|
+ | insert | Yes| Yes| Yes|
+ | delete | Yes| Yes| Yes|
+ | query | Yes| Yes| Yes|
+ | update | Yes| Yes| Yes|
+ | batchInsert | Yes| Yes| Yes|
+ | getType | Yes| No| No|
+ | getFileTypes | Yes| No| No|
+ | normalizeUri | Yes| Yes| Yes|
+ | denormalizeUri | Yes| Yes| Yes|
+ | openFile | Yes| No| No|
+ | call | Yes| No| No|
+ | executeBatch | Yes| No| No|
diff --git a/en/application-dev/application-models/actions-entities.md b/en/application-dev/application-models/actions-entities.md
new file mode 100644
index 0000000000000000000000000000000000000000..2479ab317cfdff8bc642f3f307fb4d8423efe112
--- /dev/null
+++ b/en/application-dev/application-models/actions-entities.md
@@ -0,0 +1,25 @@
+# Common action and entities Values
+
+The [action](../reference/apis/js-apis-ability-wantConstant.md#wantconstantaction) field specifies the common operation (such as viewing, sharing, and application details) to be performed by the caller. In implicit Want, you can define this field and use it together with **uri** or **parameters** to specify the operation to be performed on the data, for example, viewing URI data. For example, if the URI is a website and the action is **ohos.want.action.viewData**, the ability that supports website viewing is matched. Declaring the **action** field in Want indicates that the invoked application should support the declared operation. The **actions** field under **skills** in the configuration file indicates the operations supported by the application.
+
+**Common action Values**
+
+
+- **ACTION_HOME**: action of starting the application entry component. It must be used together with **ENTITY_HOME**. The application icon on the home screen is an explicit entry component. Users can touch the icon to start the entry component. Multiple entry components can be configured for an application.
+
+- **ACTION_CHOOSE**: action of selecting local resource data, such as Contacts and Gallery. Generally, the system has corresponding Picker applications for different types of data.
+
+- **ACTION_VIEW_DATA**: action of viewing data. A website URI indicates the action for opening the website.
+
+- **ACTION_VIEW_MULTIPLE_DATA**: action of launching the UI for sending multiple data records.
+
+The [entities](../reference/apis/js-apis-ability-wantConstant.md#wantconstantentity) field specifies the additional category information (such as browser and video player) of the target ability. It is a supplement to **action** in implicit Want. You can define this field to filter application categories, for example, browser. Declaring the **entities** field in Want indicates that the invoked application should belong to the declared category. The **entities** field under **skills** in the configuration file indicates the categories supported by the application.
+
+**Common entities Values**
+
+
+- **ENTITY_DEFAULT**: default category, which is meaningless.
+
+- **ENTITY_HOME**: abilities with an icon displayed on the home screen.
+
+- **ENTITY_BROWSABLE**: browser type.
diff --git a/en/application-dev/application-models/api-switch-overview.md b/en/application-dev/application-models/api-switch-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..461e321d410a7f0036f5b4a1700c6176d7d451da
--- /dev/null
+++ b/en/application-dev/application-models/api-switch-overview.md
@@ -0,0 +1,41 @@
+# API Switching Overview
+
+
+Due to the differences in the thread model and process model, certain APIs (marked with **FAModelOnly** in the SDK) can be used only in the FA model. When switching an application from the FA model to the stage model, replace the APIs marked with **FAModelOnly** in the application with the APIs supported in the stage model. This topic uses the switching of **startAbility()** as an example.
+
+
+
+
+
+- Sample code of **startAbility()** in the FA model:
+
+ ```ts
+ import fa from '@ohos.ability.featureAbility';
+ let parameter = {
+ "want": {
+ bundleName: "ohos.samples.demo",
+ abilityName: "ohos.samples.demo.MainAbility"
+ }
+ }
+ fa.startAbility(parameter).then((data) => {
+ console.info('startAbility success');
+ }).catch((error) => {
+ console.error('startAbility failed.');
+ })
+ ```
+
+- Sample code of **startAbility()** in the stage model:
+
+ ```ts
+ // context is a member of the ability object and is required for invoking inside a non-ability object.
+ // Pass in the Context object.
+ let wantInfo = {
+ bundleName: "ohos.samples.demo",
+ abilityName: "ohos.samples.demo.MainAbility"
+ };
+ this.context.startAbility(wantInfo).then((data) => {
+ console.info('startAbility success.');
+ }).catch((error) => {
+ console.error('startAbility failed.');
+ })
+ ```
diff --git a/en/application-dev/application-models/app-deviceconfig-switch.md b/en/application-dev/application-models/app-deviceconfig-switch.md
new file mode 100644
index 0000000000000000000000000000000000000000..8630746cb46979d1a7e37c2c6e30787ad5fe91ec
--- /dev/null
+++ b/en/application-dev/application-models/app-deviceconfig-switch.md
@@ -0,0 +1,31 @@
+# Switching of app and deviceConfig
+
+
+To help you better maintain the configuration of application-level attributes, OpenHarmony has extracted the **app** and **deviceConfig** tags from the **config.json** file to the **app.json5** file and changed certain tag names in the stage model.
+
+**Table 1** Comparison of the app tag in the configuration files
+
+| Configuration Item| app in config.json| app in app.json5|
+| -------- | -------- | -------- |
+| Internal version number of an application| "version": {
+
+- The figure below illustrates the holding relationship of contexts.
+
+
+- The following describes the information provided by different contexts.
+ - [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md): Each UIAbility has the **Context** attribute, which provides APIs to operate the ability, obtain the ability configuration, request permissions from users, and more.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let uiAbilityContext = this.context;
+ // ...
+ }
+ }
+ ```
+ - Scenario-specific [ExtensionContext](../reference/apis/js-apis-inner-application-extensionContext.md): For example, ServiceExtensionContext, inherited from ExtensionContext, provides APIs related to background services.
+
+ ```ts
+ import ServiceExtensionAbility from '@ohos.app.ability.ServiceExtensionAbility';
+ export default class MyService extends ServiceExtensionAbility {
+ onCreate(want) {
+ let serviceExtensionContext = this.context;
+ // ...
+ }
+ }
+ ```
+ - [AbilityStageContext](../reference/apis/js-apis-inner-application-abilityStageContext.md): module-level context. It provides **HapModuleInfo** and **Configuration** in addition to those provided by the base class **Context**.
+
+ ```ts
+ import AbilityStage from "@ohos.app.ability.AbilityStage";
+ export default class MyAbilityStage extends AbilityStage {
+ onCreate() {
+ let abilityStageContext = this.context;
+ // ...
+ }
+ }
+ ```
+ - [ApplicationContext](../reference/apis/js-apis-inner-application-applicationContext.md): application-level context. It provides APIs for subscribing to ability lifecycle changes, system memory changes, and system environment changes. The application-level context can be obtained from UIAbility, ExtensionAbility, and AbilityStage.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let applicationContext = this.context.getApplicationContext();
+ // ...
+ }
+ }
+ ```
+
+
+## Typical Usage Scenarios of Context
+
+
+This topic describes how to use the context in the following scenarios:
+
+
+- [Obtaining the Application Development Path](#obtaining-the-application-development-path)
+
+- [Obtaining and Modifying Encrypted Areas](#obtaining-and-modifying-encrypted-areas)
+
+- [Creating Context of Another Application or Module](#creating-context-of-another-application-or-module)
+
+- [Subscribing to Ability Lifecycle Changes in a Process](#subscribing-to-ability-lifecycle-changes-in-a-process)
+
+- [Requesting Permissions from Users Through AbilityContext](#requesting-permissions-from-users-through-uiabilitycontext)
+
+
+### Obtaining the Application Development Path
+
+The following table describes the application development paths obtained from context.
+
+**Table 1** Application development paths
+
+| Name| Type| Readable| Writable| Description|
+| -------- | -------- | -------- | -------- | -------- |
+| cacheDir | string | Yes| No| Cache directory of the application on the internal storage.
+
+- Obtain the application-level path through **ApplicationContext**. It is recommended that global application information be stored in this path. Files stored in this path will be deleted only when the application is uninstalled.
+ | Name| Path|
+ | -------- | -------- |
+ | bundleCodeDir | {Path prefix}/el1/bundle/|
+ | cacheDir | {Path prefix}/{Encryption level}/base/cache/|
+ | filesDir | {Path prefix}/{Encryption level}/base/files/|
+ | preferencesDir | {Path prefix}/{Encryption level}/base/preferences/|
+ | tempDir | {Path prefix}/{Encryption level}/base/temp/|
+ | databaseDir | {Path prefix}/{Encryption level}/database/|
+ | distributedFilesDir | {Path prefix}/el2/distributedFiles/|
+
+- Obtain the HAP level path through **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext**. It is recommended that the HAP information be stored in this path. The file content stored in this path will be deleted when the HAP is uninstalled. The file content in the application-level path will be deleted only after all the HAPs of the application are uninstalled.
+ | Name| Path|
+ | -------- | -------- |
+ | bundleCodeDir | {Path prefix}/el1/bundle/|
+ | cacheDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/cache/|
+ | filesDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/files/|
+ | preferencesDir | {path prefix}/{encryption level}/base/**haps/{moduleName}**/preferences/|
+ | tempDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/temp/|
+ | databaseDir | {Path prefix}/{Encryption level}/database/**{moduleName}**/|
+ | distributedFilesDir | {Path prefix}/el2/distributedFiles/**{moduleName}**/|
+
+The sample code for obtaining the application development paths is as follows:
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let cacheDir = this.context.cacheDir;
+ let tempDir = this.context.tempDir;
+ let filesDir = this.context.filesDir;
+ let databaseDir = this.context.databaseDir;
+ let bundleCodeDir = this.context.bundleCodeDir;
+ let distributedFilesDir = this.context.distributedFilesDir;
+ let preferencesDir = this.context.preferencesDir;
+ // ...
+ }
+}
+```
+
+
+### Obtaining and Modifying Encrypted Areas
+
+You can read and write [the area attribute in the context](../reference/apis/js-apis-inner-application-context.md) to obtain and set an encrypted area. Two encryption levels are supported:
+
+- AreaMode.EL1: device-level encryption area, which is accessible after the device is powered on.
+
+- AreaMode.EL2: user-level encryption area, which is accessible only after the device is powered on and the password is entered (for the first time).
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ // Before storing common information, switch the encryption level to EL1.
+ if (this.context.area === 1) {// Obtain the area.
+ this.context.area = 0; // Modify the area.
+ }
+ // Store common information.
+
+ // Before storing sensitive information, switch the encryption level to EL2.
+ if (this.context.area === 0) { // Obtain the area.
+ this.context.area = 1; // Modify the area.
+ }
+ // Store sensitive information.
+ }
+}
+```
+
+
+### Creating Context of Another Application or Module
+
+The base class **Context** provides the [createBundleContext(bundleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatebundlecontext), [createModuleContext(moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext), and [createModuleContext(bundleName:string, moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext-1) methods for creating the context of other applications or modules, so as to obtain the resource information, for example, [obtaining the application development paths](#obtaining-the-application-development-path) of other modules.
+
+- Call **createBundleContext(bundleName:string)** to create the context of another application.
+ > **NOTE**
+ >
+ > To obtain the context of another application:
+ >
+ > - Request the **ohos.permission.GET_BUNDLE_INFO_PRIVILEGED** permission. For details, see [Permission Application Guide](../security/accesstoken-guidelines.md#declaring-permissions-in-the-configuration-file).
+ >
+> - This is a system API and cannot be called by third-party applications.
+
+ For example, application information displayed on the home screen includes the application name and icon. The home screen application calls the foregoing method to obtain the context information, so as to obtain the resource information including the application name and icon.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let bundleName2 = "com.example.application";
+ let context2 = this.context.createBundleContext(bundleName2);
+ let label2 = context2.applicationInfo.label;
+ // ...
+ }
+ }
+ ```
+
+- Call **createModuleContext(bundleName:string, moduleName:string)** to obtain the context of a specified module of another application. After obtaining the context, you can obtain the resource information of that module.
+ > **NOTE**
+ >
+ > To obtain the context of a specified module of another application:
+ >
+ > - Request the **ohos.permission.GET_BUNDLE_INFO_PRIVILEGED** permission. For details, see [Permission Application Guide](../security/accesstoken-guidelines.md#declaring-permissions-in-the-configuration-file).
+ >
+> - This is a system API and cannot be called by third-party applications.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let bundleName2 = "com.example.application";
+ let moduleName2 = "module1";
+ let context2 = this.context.createModuleContext(bundleName2, moduleName2);
+ // ...
+ }
+ }
+ ```
+
+- Call **createModuleContext(moduleName:string)** to obtain the context of another module in the current application. After obtaining the context, you can obtain the resource information of that module.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let moduleName2 = "module1";
+ let context2 = this.context.createModuleContext(moduleName2);
+ // ...
+ }
+ }
+ ```
+
+
+### Subscribing to Ability Lifecycle Changes in a Process
+
+In the DFX statistics scenario of an application, if you need to collect statistics on the stay duration and access frequency of a page, you can subscribe to ability lifecycle changes.
+
+When the ability lifecycle changes in a process, for example, being created or destroyed, becoming visible or invisible, or gaining or losing focus, the corresponding callback is triggered, and a listener ID is returned. The ID is incremented by 1 each time the listener is registered. When the number of listeners exceeds the upper limit (2^63-1), -1 is returned. The following uses [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) as an example.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+const TAG: string = "[Example].[Entry].[EntryAbility]";
+
+export default class EntryAbility extends UIAbility {
+ lifecycleId: number;
+
+ onCreate(want, launchParam) {
+ let abilityLifecycleCallback = {
+ onAbilityCreate(ability) {
+ console.info(TAG, "onAbilityCreate ability:" + JSON.stringify(ability));
+ },
+ onWindowStageCreate(ability, windowStage) {
+ console.info(TAG, "onWindowStageCreate ability:" + JSON.stringify(ability));
+ console.info(TAG, "onWindowStageCreate windowStage:" + JSON.stringify(windowStage));
+ },
+ onWindowStageActive(ability, windowStage) {
+ console.info(TAG, "onWindowStageActive ability:" + JSON.stringify(ability));
+ console.info(TAG, "onWindowStageActive windowStage:" + JSON.stringify(windowStage));
+ },
+ onWindowStageInactive(ability, windowStage) {
+ console.info(TAG, "onWindowStageInactive ability:" + JSON.stringify(ability));
+ console.info(TAG, "onWindowStageInactive windowStage:" + JSON.stringify(windowStage));
+ },
+ onWindowStageDestroy(ability, windowStage) {
+ console.info(TAG, "onWindowStageDestroy ability:" + JSON.stringify(ability));
+ console.info(TAG, "onWindowStageDestroy windowStage:" + JSON.stringify(windowStage));
+ },
+ onAbilityDestroy(ability) {
+ console.info(TAG, "onAbilityDestroy ability:" + JSON.stringify(ability));
+ },
+ onAbilityForeground(ability) {
+ console.info(TAG, "onAbilityForeground ability:" + JSON.stringify(ability));
+ },
+ onAbilityBackground(ability) {
+ console.info(TAG, "onAbilityBackground ability:" + JSON.stringify(ability));
+ },
+ onAbilityContinue(ability) {
+ console.info(TAG, "onAbilityContinue ability:" + JSON.stringify(ability));
+ }
+ }
+ // 1. Obtain the application context through the context attribute.
+ let applicationContext = this.context.getApplicationContext();
+ // 2. Register a listener for the lifecycle changes through the application context.
+ this.lifecycleId = applicationContext.on("abilityLifecycle", abilityLifecycleCallback);
+ console.info(TAG, "register callback number: " + JSON.stringify(this.lifecycleId));
+ }
+
+ onDestroy() {
+ let applicationContext = this.context.getApplicationContext();
+ applicationContext.off("abilityLifecycle", this.lifecycleId, (error, data) => {
+ console.info(TAG, "unregister callback success, err: " + JSON.stringify(error));
+ });
+ }
+}
+```
+
+
+### Requesting Permissions from Users Through UIAbilityContext
+
+Each ability has the **Context** attribute. The ability is used to process the lifecycle. Methods use to operate the ability (such as **startAbility()**, **connectServiceExtensionAbility()**, and **terminateSelf()**) are implemented in the corresponding context. The context also provides methods for obtaining the ability configuration and requesting permissions from users. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability).
+
+
+When an application needs to obtain users' privacy information or use system capabilities, for example, to obtain location information, to access the calendar, or to use the camera to take photos or record videos, the application must request permissions from users, as shown below. For details, see [Permission Application Guide](../security/accesstoken-guidelines.md).
+
+**Figure 2** Requesting the permission to access the calendar from users
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/application-model-composition.md b/en/application-dev/application-models/application-model-composition.md
new file mode 100644
index 0000000000000000000000000000000000000000..2d7ed88490136c6e94277e94da375278fcab0adf
--- /dev/null
+++ b/en/application-dev/application-models/application-model-composition.md
@@ -0,0 +1,27 @@
+# Elements of the Application Model
+
+
+The application model is the abstraction of capabilities required by OpenHarmony applications. It provides necessary components and running mechanisms for applications. With application models, you can develop applications based on a unified set of models, making application development simpler and more efficient.
+
+
+The OpenHarmony application model consists of the following elements:
+
+
+- Application component
+
+ An application component is the basic unit and running entry of an application. When a user starts, uses, or exits an application, the application component transits in different states. This is called the application component lifecycle. The application component provides lifecycle callback functions, through which you can detect application [status changes](uiability-lifecycle.md). When compiling an application, you needs to compile application components and their lifecycle callback functions, and configure related information in the application configuration file. In this way, the operating system creates an application component instance based on the configuration file during running, and schedules the lifecycle callback functions, so as to execute your code.
+- Application process model
+
+ The application process model defines how application processes are created, destroyed, and communicate with each other.
+
+- Application thread model
+
+ The application thread model defines how a thread in an application process is created and destroyed, how the main thread and UI thread are created, and how the threads communicate with each other.
+
+- Application mission management model
+
+ The application mission management model defines how a mission is created and destroyed, and the relationship between missions and components. A mission is a record about the use of an application component instance. Each time a user starts an application component instance, a mission is generated. For example, when a user starts a video application, the video application mission is displayed on the **Recents** page. When the user clicks the mission, the system switches the mission to the foreground. If the video editing functionality in the video application is compiled by using an application component, an application component instance for video editing is created when the user starts video editing. In this case, both the video application mission and video editing mission are displayed on the **Recents** page.
+
+- Application configuration file
+
+ The application configuration file contains information about the application configuration, application components, and permissions, as well as custom information. The information will be provided for the compiler, application market, and operating system in the build, distribution, and running phases.
diff --git a/en/application-dev/application-models/application-model-description.md b/en/application-dev/application-models/application-model-description.md
new file mode 100644
index 0000000000000000000000000000000000000000..2c15a15ee2aa30c9e56a04fb21497af01969cd07
--- /dev/null
+++ b/en/application-dev/application-models/application-model-description.md
@@ -0,0 +1,61 @@
+# Interpretation of the Application Model
+
+
+## Application Model Overview
+
+Along its evolution, OpenHarmony has provided two application models:
+
+- Feature Ability (FA) model. This model is supported by OpenHarmony API version 7 and 8. It is no longer recommended.
+
+- Stage model. This model is supported since OpenHarmony API version 9. It is recommended and will evolve for a long time. In this model, classes such as **AbilityStage** and **WindowStage** are provided as the stage of application components and windows. That's why it is named stage model.
+
+The stage model is designed based on the following considerations, which make it become the recommended model:
+
+1. **Designed for complex applications**
+
+ - In the stage model, multiple application components share an ArkTS engine (VM running the programming language ArkTS) instance, making it easy for application components to share objects and status while requiring less memory.
+- The object-oriented development mode makes the code of complex applications easy to read, maintain, and scale.
+
+2. **Native support for [cross-device migration](hop-cross-device-migration.md) and [multi-device collaboration](hop-multi-device-collaboration.md) at the application component level**
+
+ The stage model decouples application components from User Interfaces (UIs).
+
+ - In cross-device migration scenarios, after the system migrates application component data or status between devices, it can use the declarative feature of ArkUI to restore the UI based on the data or status saved in the application components.
+
+ - In multi-device collaboration scenarios, application components can initiate Remote Procedure Calls (RPCs) and support interaction with cross-device application components.
+
+3. **Support for multiple device types and window forms**
+
+ Application component management and window management are decoupled at the architecture level. This decoupling makes it:
+
+ - Easy to tailor application components. For example, windows can be tailored for devices without screens.
+
+ - Easy to extend the window forms.
+
+ - Possible for application components to use the same lifecycle on multiple devices (such as desktop devices and mobile devices).
+
+4. **Well balanced application capabilities and system management costs**
+
+ The stage model redefines the boundary of application capabilities to well balance application capabilities and system management costs.
+
+ - Diverse application components (such as widgets and input methods) for specific scenarios.
+ - Standardized background process management. To deliver a better user experience, the stage model manages background application processes in a more orderly manner. Applications cannot reside in the background randomly, and their background behavior is strictly managed to minimize malicious behavior.
+
+
+## Differences Between the FA Model and Stage Model
+
+In the stage model, multiple application components share the same ArkTS engine instance. In the FA model, each application component exclusively uses an ArkTS engine instance. This is their biggest difference. In the stage model, application components can easily share objects and status while requiring less memory. Therefore, you are advised to use the stage model when developing complex applications in distributed scenarios.
+
+The table below describes their differences in detail.
+
+ **Table 1** Differences between the FA model and stage model
+
+| Item| FA model| Stage model|
+| -------- | -------- | -------- |
+| **Application component**| 1. Component classification
+
+ In the preceding code, the **ability.want.params.INTENT** field is nested Want. In this field, **action** and **type** are used for implicit matching by the application selector. For details about implicit matching, see [Implicit Want Matching Rules](explicit-implicit-want-mappings.md#interpretation-of-implicit-want-matching-rules). After the user selects an application, the nested Want of the **ability.want.params.INTENT** field is passed to that application.
+
+- Shared party
+ 1. As mentioned above, the application selector performs implicit matching based on the **ability.want.params.INTENT** field. Therefore, you must set **skills** in the ability configuration file (**module.json5** file in the stage model) of the shared party as follows:
+
+ ```ts
+ "skills": [
+ {
+ "entities": [
+ // ...
+ ],
+ "actions": [
+ "ohos.want.action.sendData"
+ // ...
+ ],
+ "uris": [
+ {
+ "type": "application/pdf"
+ },
+ // ...
+ ]
+ },
+ ]
+ ```
+
+ The **actions** and **type** fields in **uris** match the **action** and **type** fields in **ability.want.params.INTENT**, respectively.
+
+ Files can be transferred in FD mode, but not URI mode. In implicit matching, the **type** field in Want must match the **type** field in **uris** under **skills** of the shared party. Therefore, specify only the **type** field in **uris**. If **host** and **port** are specified, the matching fails. The application selector initiates implicit matching based on **ability.want.params.INTENT**. Therefore, when the **uri** field added to **ability.want.params.INTENT** matches the **uris** field under **skills**, the matching is successful and additional data can be transferred.
+ 2. After the application selector starts the shared party, the system calls **onCreate** and passes **ability.want.params.INTENT** to the **want** parameter.
+
+ ```ts
+ onCreate(want, launchParam) {
+ // When keyFd is undefined, the application crashes.
+ if (want["parameters"]["keyFd"] !== undefined) {
+ // Receive the file descriptor.
+ let fd = want["parameters"]["keyFd"].value;
+ // ...
+ }
+ }
+ ```
diff --git a/en/application-dev/application-models/dataability-configuration.md b/en/application-dev/application-models/dataability-configuration.md
new file mode 100644
index 0000000000000000000000000000000000000000..d3618ea7a026311004524a9eb79ff3d1951d6a93
--- /dev/null
+++ b/en/application-dev/application-models/dataability-configuration.md
@@ -0,0 +1,62 @@
+# DataAbility Component Configuration
+
+
+## URI Introduction
+
+A Uniform Resource Identifier (URI) is used to identify a specific data item, such as a table in the database or a file on the disk. URIs used in OpenHarmony comply with the commonly used URI standard. A URI consists of the components:
+
+
+
+- **scheme**: name of the scheme used by the DataAbility. The value is fixed at **dataability**.
+
+- **authority**: device ID. To access data on a remote device, set this component to the ID of the remote device. To access data on the local device, leave this component empty.
+
+- **path**: location of the specific resource to access.
+
+- **query**: query parameters.
+
+- **fragment**: subordinate resources to access.
+
+Example URIs:
+
+- Cross-device communication: dataability://*device*id_/*com.domainname.dataability.persondata*/*person*/*10*
+
+- Local-device communication: dataability:///*com.domainname.dataability.persondata*/*person*/*1*
+
+> **NOTE**
+>
+> In the case of local-device communication, **device_id** is empty, and therefore, there are three slashes (/) after **dataability:**.
+
+
+## Introduction to Certain Configuration Items
+
+Similar to a PageAbility, a DataAbility is configured in **abilities** under **module** of the **config.json** file. The difference between a DataAbility and PageAbility lies in the **type** and **uri** fields.
+
+**Table 1** DataAbility configuration items
+
+| Name| Description|
+| -------- | -------- |
+| "name" | Ability name.|
+| "type" | Type of the ability. The value **data** indicates a DataAbility.|
+| "uri" | URI used for communication.|
+| "visible" | Whether the ability is visible to other applications. Data sharing is allowed only when the value is **true**.|
+
+The following is an example **config.json** file:
+
+
+```json
+"abilities": [{
+ "srcPath": "DataAbility",
+ "name": ".DataAbility",
+ "icon": "$media:icon",
+ "srcLanguage": "ets",
+ "description": "$string:description_dataability",
+ "type": "data",
+ "visible": true,
+ "uri": "dataability://ohos.samples.etsdataability.DataAbility"
+}]
+```
+
+For details about the configuration items, see [Internal Structure of module](../quick-start/module-structure.md).
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/dataability-lifecycle.md b/en/application-dev/application-models/dataability-lifecycle.md
new file mode 100644
index 0000000000000000000000000000000000000000..f35f46ffd9504a29897694054efc15f9a8465a57
--- /dev/null
+++ b/en/application-dev/application-models/dataability-lifecycle.md
@@ -0,0 +1,23 @@
+# DataAbility Lifecycle
+
+
+You can override lifecycle callbacks (described in the table below) for a DataAbility based on service requirements.
+
+
+**Table 1** DataAbility lifecycle APIs
+
+| API| Description|
+| -------- | -------- |
+| onInitialized?(info: AbilityInfo): void | Called during ability initialization to initialize the relational database (RDB).|
+| update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void | Updates data in the database.|
+| query?(uri: string, columns: Array<string>, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<ResultSet>): void | Queries data in the database.|
+| delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void | Deletes one or more data records from the database.|
+| normalizeUri?(uri: string, callback: AsyncCallback<string>): void | Normalizes the URI. A normalized URI applies to cross-device use, persistence, backup, and restore. When the context changes, it ensures that the same data item can be referenced.|
+| batchInsert?(uri: string, valueBuckets: Array<rdb.ValuesBucket>, callback: AsyncCallback<number>): void | Inserts multiple data records into the database.|
+| denormalizeUri?(uri: string, callback: AsyncCallback<string>): void | Converts a normalized URI generated by **normalizeUri** into a denormalized URI.|
+| insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback<number>): void | Inserts a data record into the database.|
+| openFile?(uri: string, mode: string, callback: AsyncCallback<number>): void | Opens a file.|
+| getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback<Array<string>>): void | Obtains the MIME type of a file.|
+| getType?(uri: string, callback: AsyncCallback<string>): void | Obtains the MIME type matching the data specified by the URI.|
+| executeBatch?(ops: Array<DataAbilityOperation>, callback: AsyncCallback<Array<DataAbilityResult>>): void | Operates data in the database in batches.|
+| call?(method: string, arg: string, extras: PacMap, callback: AsyncCallback<PacMap>): void | Calls a custom API.|
diff --git a/en/application-dev/application-models/dataability-overview.md b/en/application-dev/application-models/dataability-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..b89ee68bb5fe6cda341dea332a24cf1010c4935f
--- /dev/null
+++ b/en/application-dev/application-models/dataability-overview.md
@@ -0,0 +1,10 @@
+# DataAbility Component Overview
+
+
+A DataAbility is an ability that uses the Data template. It provides unified data access for external systems, but not a UI for user interaction. A DataAbility can be started by a PageAbility, a ServiceAbility, or other applications. It remains to run in the background even after the user switches to another application.
+
+
+A DataAbility helps applications manage access to data stored by themselves and other applications, and provides methods for sharing data with other applications, either on the same device or across devices.
+
+
+Data can be stored in a database or files on disks. The DataAbility provide methods for inserting, deleting, updating, and querying data, and opening files. You should implement these methods.
diff --git a/en/application-dev/application-models/dataability-permission-control.md b/en/application-dev/application-models/dataability-permission-control.md
new file mode 100644
index 0000000000000000000000000000000000000000..25c5e82726dbc3a7dba8158a0847b5c59ea0c98e
--- /dev/null
+++ b/en/application-dev/application-models/dataability-permission-control.md
@@ -0,0 +1,60 @@
+# DataAbility Permission Control
+
+
+The DataAbility uses permission control to determine whether an ability can access the data service it provides. There are static and dynamic permission controls.
+
+
+## Static Permission Control
+
+The DataAbility functions as the server. When being started, the DataAbility verifies the client permissions against the settings of the optional fields **readPermission**, **writePermission**, and **Permission** fields in the **config.json** file. The following is an example:
+
+
+```json
+"abilities": [{
+ "srcPath": "DataAbility",
+ "name": ".DataAbility",
+ "icon": "$media:icon",
+ "srcLanguage": "ets",
+ "description": "$string:description_dataability",
+ "type": "data",
+ "visible": true,
+ "uri": "dataability://ohos.samples.etsdataability.DataAbility",
+ "readPermission":"ohos.permission.READ_CONTACTS",
+ "writePermission":"ohos.permission.WRITE_CONTACTS"
+}]
+```
+
+The client permission is configured in **reqPermissions** under **module** in the **config.json** file. The following is an example:
+
+
+```json
+{
+ "module": {
+ "reqPermissions":{
+ {
+ "name":"ohos.permission.READ_CONTACTS"
+ },
+ {
+ "name":"ohos.permission.WRITE_CONTACTS"
+ }
+ }
+ }
+}
+```
+
+
+## Dynamic Permission Control
+
+Static permission control determines whether a DataAbility can be started by another ability or application. It does not verify the permission of each read/write interface.
+
+Dynamic permission control verifies whether the client has the corresponding permission for every read/write interface. The table below lists the permissions required for calling these interfaces.
+
+**Table 1** Permission configuration for data read/write interfaces
+
+| Interface with the Read Permission| Interface with the Write Permission| Interface with the Read/Write Permission Based on Actual Requirements|
+| -------- | -------- | -------- |
+| query, normalizeUri, denormalizeUri, openfile (with **mode** set to **'r'**)| insert, batchInsert, delete, update, openfile (with **mode** set to **'w'**)| executeBatch |
+
+For interfaces that require the read permission, the server must have **readPermission** specified, and the client must obtain the read permission before calling them.
+
+For interfaces that require the write permission, the server must have **writePermission** specified, and the client must obtain the write permission before calling them.
diff --git a/en/application-dev/application-models/dataability-switch.md b/en/application-dev/application-models/dataability-switch.md
new file mode 100644
index 0000000000000000000000000000000000000000..b91d50ca37a97fdc1d4824a93a6093bac7cd0f77
--- /dev/null
+++ b/en/application-dev/application-models/dataability-switch.md
@@ -0,0 +1,44 @@
+# DataAbility Switching
+
+
+The DataAbility component in the FA model corresponds to the DataShareExtensionAbility component in the stage model.
+
+
+The DataShareExtensionAbility class provides system APIs. Only system applications can create DataShareExtensionAbility instances. Therefore, DataAbility switching adopts different policies for system applications and third-party applications.
+
+
+## Switching a DataAbility of a System Application
+
+The procedure for switching a DataAbility of a system application is similar to the procedure of PageAbility switching.
+
+1. Create a DataShareExtensionAbility in the stage model.
+
+2. Migrate the DataAbility code to the DataShareExtensionAbility.
+
+ The table below describes the lifecycle comparison of the DataAbility and DataShareExtensionAbility.
+
+ | DataAbility| DataShareExtensionAbility| Comparison Description|
+ | -------- | -------- | -------- |
+ | onInitialized?(info: AbilityInfo): void | onCreate?(want: Want, callback: AsyncCallback<void>): void
+
+
+### Matching Rules of entities in the want Parameter
+
+The system matches the [entities](../reference/apis/js-apis-ability-wantConstant.md#wantconstantentity) attribute in the **want** parameter passed by the caller against **entities** under **skills** of the abilities.
+
+- If **entities** in the passed **want** parameter is unspecified but **entities** under **skills** of an ability is specified, the matching is successful.
+
+- If **entities** in the passed **want** parameter is unspecified but **entities** under **skills** of an ability is unspecified, the matching is successful.
+
+- If **entities** in the passed **want** parameter is specified but **entities** under **skills** of an ability is unspecified, the matching fails.
+
+- If **entities** in the passed **want** parameter is specified, and **entities** under **skills** of an ability is specified and contains **entities** in the passed **want** parameter, the matching is successful.
+
+- If **entities** in the passed **want** parameter is specified, and **entities** under **skills** of an ability is specified but does not contain **entities** in the passed **want** parameter, the matching fails.
+
+ Figure 2 Matching rule of entities in the want parameter
+
+
+
+### Matching Rules of uri and type in the want Parameter
+
+When the **uri** and **type** parameters are specified in the **want** parameter to initiate a component startup request, the system traverses the list of installed components and matches the **uris** array under **skills** of the abilities one by one. If one of the **uris** arrays under **skills** matches the **uri** and **type** in the passed **want**, the matching is successful.
+
+Figure 3 Matching rules when uri and type are specified in the want parameter
+
+
+There are four combinations of **uri** and **type** settings. The matching rules are as follows:
+
+- Neither **uri** or **type** is specified in the **want** parameter.
+ - If the **uris** array under **skills** of an ability is unspecified, the matching is successful.
+ - If the **uris** array under **skills** of an ability contains an URI element whose **scheme** and **type** are unspecified, the matching is successful.
+ - In other cases, the matching fails.
+
+- Only **uri** is specified in the **want** parameter.
+ - If the **uris** array under **skills** of an ability is unspecified, the matching fails.
+ - If the **uris** array under **skills** of an ability contains an element whose [uri is matched](#matching-rules-of-uri) and **type** is unspecified, the matching is successful. Otherwise, the matching fails.
+
+- Only **type** is specified in the **want** parameter.
+ - If the **uris** array under **skills** of an ability is unspecified, the matching fails.
+ - If the **uris** array under **skills** of an ability contains an URI element whose **scheme** is unspecified and [type is matched](#matching-rules-of-type), the matching is successful. Otherwise, the matching fails.
+
+- Both **uri** and **type** are specified in the **want** parameter, as shown in Figure 3.
+ - If the **uris** array under **skills** of an ability is unspecified, the matching fails.
+ - If the **uris** array under **skills** of an ability contains an element whose [uri is matched](#matching-rules-of-uri) and [type is matched](#matching-rules-of-type), the matching is successful. Otherwise, the matching fails.
+
+
+To simplify the description, **uri** and **type** passed in the **want** parameter are called **w_uri** and **w_type**, respectively; the **uris** array under **skills** of an ability to match is called **s_uris**; each element in the array is called **s_uri**. Matching is performed from top to bottom.
+
+Figure 4 Matching rules of uri and type in the want parameter
+
+
+
+### Matching Rules of uri
+
+To simplify the description, **uri** in the passed **want** parameter is called **w_uri**; **uri** under **skills** of an ability to match is called **s_uri**. The matching rules are as follows:
+
+- If **scheme** of **s_uri** is unspecified and **w_uri** is unspecified, the matching is successful. Otherwise, the matching fails.
+
+- If **host** of **s_uri** is unspecified and **scheme** of **w_uri** and **scheme** of **s_uri** are the same, the matching is successful. Otherwise, the matching fails.
+
+- If **path**, **pathStartWith**, and **pathRegex** of **s_uri** are unspecified and **w_uri** and **s_uri** are the same, the matching is successful. Otherwise, the matching fails.
+
+- If **path** of **s_uri** is specified and the **full path expressions** of **w_uri** and **s_uri** are the same, the matching is successful. Otherwise, the matching of **pathStartWith** continues.
+
+- If **pathStartWith** of **s_uri** is specified and **w_uri** contains the prefix expression of **s_uri**, the matching is successful. Otherwise, **pathRegex** matching continues.
+
+- If **pathRegex** of **s_uri** is specified and **w_uri** meets the regular expression of **s_uri**, the matching is successful. Otherwise, the matching fails.
+
+> **NOTE**
+>
+> The **scheme**, **host**, **port**, **path**, **pathStartWith**, and **pathRegex** attributes of **uris** under **skills** of an ability are concatenated. If **path**, **pathStartWith**, and **pathRegex** are declared in sequence, **uris** can be concatenated into the following expressions:
+>
+> - **Full path expression**: `scheme://host:port/path`
+>
+> - **Prefix expression**: `scheme://host:port/pathStartWith`
+>
+> - **Regular expression**: `scheme://host:port/pathRegex`
+
+
+### Matching Rules of type
+
+> **NOTE**
+>
+> The matching rules of **type** described in this section are based on the fact that **type** in the **want** parameter is specified. If **type** is unspecified, follow the [matching rules of uri and type in the want parameter](#matching-rules-of-uri-and-type-in-the-want-parameter).
+
+To simplify the description, **uri** in the passed **want** parameter is called **w_type**, and **type** of **uris** under **skills** of an ability to match is called **s_type**. The matching rules are as follows:
+
+- If **s_type** is unspecified, the matching fails.
+
+- If **s_type** or **w_type** contains the wildcard `*/*`, the matching is successful.
+
+- If the last character of **s_type** is the wildcard `*`, for example, `prefixType/*`, the matching is successful only when **w_type** contains `prefixType/`.
+
+- If the last character of **w_type** is the wildcard `*`, for example, `prefixType/*`, the matching is successful only when **s_type** contains `prefixType/`.
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/extensionability-overview.md b/en/application-dev/application-models/extensionability-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..d85f02ace879e409a8d42d6f09408680a99f8056
--- /dev/null
+++ b/en/application-dev/application-models/extensionability-overview.md
@@ -0,0 +1,58 @@
+# ExtensionAbility Component Overview
+
+
+The ExtensionAbility component is used for specific scenarios such as widgets and input methods.
+
+
+An [ExtensionAbilityType](../reference/apis/js-apis-bundleManager.md#extensionabilitytype) is provided for every specific scenario. All types of ExtensionAbility components are managed by the corresponding system services in a unified manner. For example, the InputMethodExtensionAbility component is managed by the input method management service. The following ExtensionAbility types are supported:
+
+
+- [FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md): ExtensionAbility component of the form type, which provides APIs related to widgets.
+
+- [WorkSchedulerExtensionAbility](../reference/apis/js-apis-resourceschedule-workScheduler.md): ExtensionAbility component of the work_scheduler type, which provides APIs for registering, canceling, and querying Work Scheduler tasks.
+
+- [InputMethodExtensionAbility](../reference/apis/js-apis-inputmethod.md): ExtensionAbility component of the input_method type, which provides an input method framework that can be used to hide the keyboard, obtain the list of installed input methods, display the dialog box for input method selection, and more.
+
+- [ServiceExtensionAbility](../reference/apis/js-apis-app-ability-serviceExtensionAbility.md): ExtensionAbility component of the service type, which provides APIs related to background service scenarios.
+
+- [AccessibilityExtensionAbility](../reference/apis/js-apis-application-accessibilityExtensionAbility.md): ExtensionAbility component of the accessibility type, which provides APIs related to the accessibility feature.
+
+- [DataShareExtensionAbility](../reference/apis/js-apis-application-dataShareExtensionAbility.md): ExtensionAbility component of the data_share type, which provides APIs for data sharing.
+
+- [StaticSubscriberExtensionAbility](../reference/apis/js-apis-application-staticSubscriberExtensionAbility.md): ExtensionAbility component of the static_subscriber type, which provides APIs for static broadcast.
+
+- [WindowExtensionAbility](../reference/apis/js-apis-application-windowExtensionAbility.md): ExtensionAbility component of the window type, which allows system applications to display UIs of other applications.
+
+- [EnterpriseAdminExtensionAbility](../reference/apis/js-apis-EnterpriseAdminExtensionAbility.md): ExtensionAbility component of the enterprise_admin type, which provides APIs for processing enterprise management events, such as application installation events on devices and events indicating too many incorrect screen-lock password attempts.
+
+
+## Using ExtensionAbility of the Specified Type
+
+All types of ExtensionAbility components are started by the corresponding system management service, rather than applications, so that their lifecycles are under control by the system. The caller of the ExtensionAbility component does not need to care about its lifecycle.
+
+The following uses [InputMethodExtensionAbility](../reference/apis/js-apis-inputmethod.md) as an example. As shown in the figure below, when an application calls the InputMethodExtensionAbility component, the input method management service is called first. The input method management service starts the InputMethodExtensionAbility component, returns the component to the application, and starts to manage its lifecycle.
+
+**Figure 1** Using the InputMethodExtensionAbility component
+
+
+
+## Implementing ExtensionAbility of the Specified Type
+
+The following uses [FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md) as an example. The widget framework provides the base class [FormExtensionAbility](../reference/apis/js-apis-app-form-formExtensionAbility.md). You derive this base class to create your own class (such as **MyFormExtensionAbility**), implement the callbacks, such as **onCreate()** and **onUpdateForm()**, to provide specific widget functionalities. For details, see [FormExtensionAbility](Widget-development-stage.md).
+
+You do not need to care when to add or delete a widget. The lifecycle of the FormExtensionAbility instance and the lifecycle of the ExtensionAbility process where the FormExtensionAbility instance is located are scheduled and managed by FormManagerService.
+
+
+
+
+> **NOTE**
+>
+> For an application, all ExtensionAbility components of the same type run in an independent process, whereas UIAbility, ServiceExtensionAbility, and DataShareExtensionAbility run in another independent process. For details, see [Process Model (Stage Model)](process-model-stage.md).
+>
+> For example, an application has one UIAbility component, one ServiceExtensionAbility, one DataShareExtensionAbility, two FormExtensionAbility, and one ImeExtensionAbility. When the application is running, there are three processes:
+>
+> - UIAbility, ServiceExtensionAbility, and DataShareExtensionAbility run in an independent process.
+>
+> - The two FormExtensionAbility components run in an independent process.
+>
+> - The two ImeExtensionAbility components run in an independent process.
diff --git a/en/application-dev/application-models/fa-model-development-overview.md b/en/application-dev/application-models/fa-model-development-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..07e7ef8a0bdaea927762c15e4123ae728c026cb7
--- /dev/null
+++ b/en/application-dev/application-models/fa-model-development-overview.md
@@ -0,0 +1,15 @@
+# FA Model Development Overview
+
+
+During application development based on the Feature Ability (FA) model, the following tasks are involved in the application model.
+
+
+ **Table 1** FA model development process
+
+| Task| Introduction| Guide|
+| -------- | -------- | -------- |
+| Application component development| Use the PageAbility, ServiceAbility, DataAbility, and widgets of the FA model to develop applications.| - [Application- or Component-Level Configuration](application-component-configuration-fa.md)
+
+- Cross-device migration task management: The initiator accepts a migration request from the user, provides a migration entry, and displays the migration result. (This capability is unavailable yet.)
+
+- Multi-device collaboration task management: The initiator accepts an application registration request and provides management capabilities such as starting or stopping collaboration and status display. (This capability is unavailable yet.)
+
+- Distributed component management: provides capabilities such as remote service startup, remote service connection, and remote migration, and enables cross-device migration or multi-device collaboration of applications based on a combination of these capabilities.
+
+- Distributed security authentication: provides an E2E encrypted channel for cross-device transmission between applications to ensure that the right person uses the right data through the right device.
+
+- DSoftBus: functions as a unified communication base for a wide range of devices such as tablets, wearables, and smart TVs, and enables unified distributed communication between these devices.
diff --git a/en/application-dev/application-models/itc-fa-overview.md b/en/application-dev/application-models/itc-fa-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..112a89edd8ba8236fca714a65d6f93287dcbe41d
--- /dev/null
+++ b/en/application-dev/application-models/itc-fa-overview.md
@@ -0,0 +1,4 @@
+# Inter-Thread Communication (FA Model)
+
+
+For details, see [Inter-Thread Communication](thread-model-stage.md) in the stage model.
diff --git a/en/application-dev/application-models/itc-with-emitter.md b/en/application-dev/application-models/itc-with-emitter.md
new file mode 100644
index 0000000000000000000000000000000000000000..2966bd8eea41e04893814f20a3c5b2f9e4e456c9
--- /dev/null
+++ b/en/application-dev/application-models/itc-with-emitter.md
@@ -0,0 +1,49 @@
+# Using Emitter for Inter-Thread Communication
+
+[Emitter](../reference/apis/js-apis-emitter.md) provides APIs for sending and processing events between threads, including the APIs for processing events that are subscribed to in persistent or one-shot manner, unsubscribing from events, and emitting events to the event queue.
+
+
+To develop the Emitter mode, perform the following steps:
+
+
+1. Subscribe to an event.
+
+ ```ts
+ import emitter from "@ohos.events.emitter";
+
+ // Define an event with eventId 1.
+ let event = {
+ eventId: 1
+ };
+
+ // Trigger the callback after the event with eventId 1 is received.
+ let callback = (eventData) => {
+ console.info('event callback');
+ };
+
+ // Subscribe to the event with eventId 1.
+ emitter.on(event, callback);
+ ```
+
+2. Emit the event.
+
+ ```ts
+ import emitter from "@ohos.events.emitter";
+
+ // Define an event with eventId 1 and priority Low.
+ let event = {
+ eventId: 1,
+ priority: emitter.EventPriority.LOW
+ };
+
+ let eventData = {
+ data: {
+ "content": "c",
+ "id": 1,
+ "isEmpty": false,
+ }
+ };
+
+ // Emit the event with eventId 1 and event content eventData.
+ emitter.emit(event, eventData);
+ ```
diff --git a/en/application-dev/application-models/itc-with-worker.md b/en/application-dev/application-models/itc-with-worker.md
new file mode 100644
index 0000000000000000000000000000000000000000..8cbe53eeea067ae1875a8ff4b73bc4cde7bdd629
--- /dev/null
+++ b/en/application-dev/application-models/itc-with-worker.md
@@ -0,0 +1,79 @@
+# Using Worker for Inter-Thread Communication
+
+[Worker](../reference/apis/js-apis-worker.md) is an independent thread running in parallel with the main thread. The thread that creates the worker thread is referred to as the host thread. The script file passed in during worker creation is executed in the worker thread. Generally, time-consuming operations are processed in the worker thread. However, pages cannot be directly updated in the worker thread.
+
+
+To develop the Worker mode, perform the following steps:
+
+
+1. Configure the **buildOption** field in the [module-level build-profile.json5](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-building-configuration-0000001218440654#section6887184182020) file of the project.
+
+ ```ts
+ "buildOption": {
+ "sourceOption": {
+ "workers": [
+ "./src/main/ets/workers/worker.ts"
+ ]
+ }
+ }
+ ```
+
+2. Create the **worker.js** file based on the configuration in **build-profile.json5**.
+
+ ```ts
+ import worker from '@ohos.worker';
+
+ let parent = worker.workerPort;
+
+ // Process messages from the main thread.
+ parent.onmessage = function(message) {
+ console.info("onmessage: " + message)
+ // Send a message to the main thread.
+ parent.postMessage("message from worker thread.")
+ }
+ ```
+
+3. In the main thread, use the following method to initialize and use the worker thread.
+ - Stage model:
+
+ ```ts
+ import worker from '@ohos.worker';
+
+ let wk = new worker.ThreadWorker("entry/ets/workers/worker.ts");
+
+ // Send a message to the worker thread.
+ wk.postMessage("message from main thread.")
+
+ // Process messages from the worker thread.
+ wk.onmessage = function(message) {
+ console.info("message from worker: " + message)
+
+ // Stop the worker thread based on service requirements.
+ wk.terminate()
+ }
+ ```
+
+ - FA model:
+
+ ```ts
+ import worker from '@ohos.worker';
+
+ let wk = new worker.ThreadWorker("../workers/worker.js");
+
+ // Send a message to the worker thread.
+ wk.postMessage("message from main thread.")
+
+ // Process messages from the worker thread.
+ wk.onmessage = function(message) {
+ console.info("message from worker: " + message)
+
+ // Stop the worker thread based on service requirements.
+ wk.terminate()
+ }
+ ```
+
+> **NOTE**
+>
+> - If the relative path of **worker.ts** configured in **build-profile.json5** is **./src/main/ets/workers/worker.ts**, pass in the path **entry/ets/workers/worker.ts** when creating a worker thread in the stage model, and pass in the path **../workers/worker.js** when creating a worker thread in the FA model.
+>
+> - For details about the data types supported between the main thread and worker thread, see [Sequenceable Data Types](../reference/apis/js-apis-worker.md#sequenceable-data-types).
diff --git a/en/application-dev/application-models/lifecycleapp-switch.md b/en/application-dev/application-models/lifecycleapp-switch.md
new file mode 100644
index 0000000000000000000000000000000000000000..892a8915bfed9927c2707364bdaffa1547f71bf6
--- /dev/null
+++ b/en/application-dev/application-models/lifecycleapp-switch.md
@@ -0,0 +1,21 @@
+# LifecycleApp Switching
+
+
+ | API in the FA Model| Corresponding d.ts File in the Stage Model| Corresponding API in the Stage Model|
+| -------- | -------- | -------- |
+| onShow?(): void; | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)
+
+
+The following describes how to use **globalThis** in three scenarios. Precautions are provided as well.
+
+- [Using globalThis Between UIAbility and Page](#using-globalthis-between-uiability-and-page)
+- [Using globalThis Between UIAbility and UIAbility](##using-globalthis-between-uiability-and-uiability)
+- [Use globalThis Between UIAbility and ExtensionAbility](#using-globalthis-between-uiability-and-extensionability)
+- [Precautions for Using globalThis](#precautions-for-using-globalthis)
+
+### Using globalThis Between UIAbility and Page
+
+You can use **globalThis** to bind attributes or methods to implement data synchronization between the UIAbility component and UI. For example, if you bind the **want** parameter in the UIAbility component, you can use the **want** parameter information on the UI corresponding to the UIAbility component.
+
+1. When **startAbility()** is called to start a UIAbility instance, the **onCreate()** callback is invoked, and the **want** parameter can be passed in the callback. Therefore, you can bind the **want** parameter to **globalThis**.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launch) {
+ globalThis.entryAbilityWant = want;
+ // ...
+ }
+
+ // ...
+ }
+ ```
+
+2. Use **globalThis** on the UI to obtain the **want** parameter information.
+
+ ```ts
+ let entryAbilityWant;
+
+ @Entry
+ @Component
+ struct Index {
+ aboutToAppear() {
+ entryAbilityWant = globalThis.entryAbilityWant;
+ }
+
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
+
+
+### Using globalThis Between UIAbility and UIAbility
+
+To implement data synchronization between two UIAbility components in the same application, you can bind data to **globalThis**. For example, you can save data in **globalThis** in AbilityA and obtain the data from AbilityB.
+
+1. AbilityA stores a string and binds it to globalThis.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityA extends UIAbility {
+ onCreate(want, launch) {
+ globalThis.entryAbilityStr = 'AbilityA'; // AbilityA stores the string "AbilityA" to globalThis.
+ // ...
+ }
+ }
+ ```
+
+2. Obtain the data from AbilityB.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityB extends UIAbility {
+ onCreate(want, launch) {
+ // AbilityB reads the name from globalThis and outputs it.
+ console.info('name from entryAbilityStr: ' + globalThis.entryAbilityStr);
+ // ...
+ }
+ }
+ ```
+
+
+### Using globalThis Between UIAbility and ExtensionAbility
+
+To implement data synchronization between the UIAbility and ExtensionAbility components in the same application, you can bind data to **globalThis**. For example, you can save data in **globalThis** in AbilityA and obtain the data from ServiceExtensionAbility.
+
+1. AbilityA stores a string and binds it to globalThis.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityA extends UIAbility {
+ onCreate(want, launch) {
+ // AbilityA stores the string "AbilityA" to globalThis.
+ globalThis.entryAbilityStr = 'AbilityA';
+ // ...
+ }
+ }
+ ```
+
+2. Obtain the data from ExtensionAbility.
+
+ ```ts
+ import Extension from '@ohos.app.ability.ServiceExtensionAbility'
+
+ export default class ServiceExtAbility extends Extension {
+ onCreate(want) {
+ / / ServiceExtAbility reads name from globalThis and outputs it.
+ console.info('name from entryAbilityStr: ' + globalThis.entryAbilityStr);
+ // ...
+ }
+ }
+ ```
+
+
+### Precautions for Using globalThis
+
+ **Figure 2** Precautions for globalThis
+
+
+- In the stage model, all the UIAbility components in a process share one ArkTS engine instance. When using **globalThis**, do not store objects with the same name. For example, if AbilityA and AbilityB use **globalThis** to store two objects with the same name, the object stored earlier will be overwritten.
+
+- This problem does not occur in the FA model because each UIAbility component uses an independent engine.
+
+- The lifecycle of an object bound to **globalThis** is the same as that of the ArkTS engine instance. You are advised to assign the value **null** after using the object to minimize memory usage.
+
+The following provides an example to describe the object overwritten problem in the stage model.
+
+1. In the AbilityA file, [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) is stored in **globalThis**.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityA extends UIAbility {
+ onCreate(want, launch) {
+ globalThis.context = this.context; // AbilityA stores the context in globalThis.
+ // ...
+ }
+ }
+ ```
+
+2. Obtain and use [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) on the page of Ability A. After the AbilityA instance is used, switch it to the background.
+
+ ```ts
+ @Entry
+ @Component
+ struct Index {
+ onPageShow() {
+ let ctx = globalThis.context; // Obtain the context from globalThis and use it.
+ let permissions = ['com.example.permission']
+ ctx.requestPermissionsFromUser(permissions,(result) => {
+ // ...
+ });
+ }
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
+
+3. In the AbilityB file, [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) is stored in **globalThis** and has the same name as that in the AbilityA file.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityB extends UIAbility {
+ onCreate(want, launch) {
+ // AbilityB overwrites the context stored by AbilityA in globalThis.
+ globalThis.context = this.context;
+ // ...
+ }
+ }
+ ```
+
+4. Obtain and use [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) on the page of Ability B. The obtained **globalThis.context** is the value of [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) in AbilityB.
+
+ ```ts
+ @Entry
+ @Component
+ struct Index {
+ onPageShow() {
+ let ctx = globalThis.context; // Obtain the context from globalThis and use it.
+ let permissions = ['com.example.permission']
+ ctx.requestPermissionsFromUser(permissions,(result) => {
+ console.info('requestPermissionsFromUser result:' + JSON.stringify(result));
+ });
+ }
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
+
+5. Switch the AbilityB instance to the background and switch the AbilityA instance to the foreground. In this case, AbilityA will not enter the **onCreate()** lifecycle again.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class AbilityA extends UIAbility {
+ onCreate(want, launch) { // AbilityA will not enter this lifecycle.
+ globalThis.context = this.context;
+ // ...
+ }
+ }
+ ```
+
+6. When the page of AbilityA is displayed, the obtained **globalThis.context** is [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) of AbilityB instead of AbilityA. An error occurs.
+
+ ```ts
+ @Entry
+ @Component
+ struct Index {
+ onPageShow() {
+ let ctx = globalThis.context; // The context in globalThis is the context of AbilityB.
+ let permissions=['com.example.permission'];
+ ctx.requestPermissionsFromUser(permissions,(result) => { // Using this object causes a process breakdown.
+ console.info('requestPermissionsFromUser result:' + JSON.stringify(result));
+ });
+ }
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
diff --git a/en/application-dev/application-models/uiability-intra-device-interaction.md b/en/application-dev/application-models/uiability-intra-device-interaction.md
new file mode 100644
index 0000000000000000000000000000000000000000..db85dfdffb0a7d9e60e78151d6654fcdd4a973aa
--- /dev/null
+++ b/en/application-dev/application-models/uiability-intra-device-interaction.md
@@ -0,0 +1,630 @@
+# Interaction Intra-Device Between UIAbility Components
+
+
+UIAbility is the minimum unit that can be scheduled by the system. Jumping between functional modules in a device involves starting of specific UIAbility components, which belong to the same or a different application (for example, starting UIAbility of a third-party payment application).
+
+
+This topic describes the UIAbility interaction modes in the following scenarios. For details about cross-device application component interaction, see [Inter-Device Application Component Interaction (Continuation)](inter-device-interaction-hop-overview.md).
+
+
+- [Starting UIAbility in the Same Application](#starting-uiability-in-the-same-application)
+
+- [Starting UIAbility in the Same Application and Obtaining the Return Result](#starting-uiability-in-the-same-application-and-obtaining-the-return-result)
+
+- [Starting UIAbility of Another Application](#starting-uiability-of-another-application)
+
+- [Starting UIAbility of Another Application and Obtaining the Return Result](#starting-uiability-of-another-application-and-obtaining-the-return-result)
+
+- [Starting a Specified Page of UIAbility](#starting-a-specified-page-of-uiability)
+
+- [Using Ability Call to Implement UIAbility Interaction](#using-ability-call-to-implement-uiability-interaction)
+
+
+## Starting UIAbility in the Same Application
+
+This scenario is possible when an application contains multiple UIAbility components. For example, in a payment application, you may need to start the payment UIAbility from the entry UIAbility.
+
+Assume that your application has two UIAbility components: EntryAbility and FuncAbility, either in the same module or different modules. You are required to start FuncAbility from EntryAbility.
+
+1. In EntryAbility, call **startAbility()** to start UIAbility. The [want](../reference/apis/js-apis-app-ability-want.md) parameter is the entry parameter for starting the UIAbility instance. In the **want** parameter, **bundleName** indicates the bundle name of the application to start; **abilityName** indicates the name of the UIAbility to start; **moduleName** is required only when the target UIAbility belongs to a different module; **parameters** is used to carry custom information. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability).
+
+ ```ts
+ let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ bundleName: 'com.example.myapplication',
+ abilityName: 'FuncAbility',
+ moduleName: 'module1', // moduleName is optional.
+ parameters: {// Custom information.
+ info: 'From the Index page of EntryAbility',
+ },
+ }
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbility(wantInfo).then(() => {
+ // ...
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+2. Use the FuncAbility lifecycle callback to receive the parameters passed from EntryAbility.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+ import Window from '@ohos.window';
+
+ export default class FuncAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ // Receive the parameters passed by the caller UIAbility.
+ let funcAbilityWant = want;
+ let info = funcAbilityWant?.parameters?.info;
+ // ...
+ }
+ }
+ ```
+
+3. To stop the **UIAbility** instance after the FuncAbility service is complete, call **terminateSelf()** in FuncAbility.
+
+ ```ts
+ // context is the ability context of the UIAbility instance to stop.
+ this.context.terminateSelf((err) => {
+ // ...
+ });
+ ```
+
+
+## Starting UIAbility in the Same Application and Obtaining the Return Result
+
+When starting FuncAbility from EntryAbility, you want the result to be returned after the FuncAbility service is finished. For example, your application uses two independent UIAbility components to carry the entry and sign-in functionalities. After the sign-in operation is finished in the sign-in UIAbility, the sign-in result needs to be returned to the entry UIAbility.
+
+1. In EntryAbility, call **startAbilityForResult()** to start FuncAbility. Use **data** in the asynchronous callback to receive information returned after FuncAbility stops itself. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability).
+
+ ```ts
+ let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ bundleName: 'com.example.myapplication',
+ abilityName: 'FuncAbility',
+ moduleName: 'module1', // moduleName is optional.
+ parameters: {// Custom information.
+ info: 'From the Index page of EntryAbility',
+ },
+ }
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbilityForResult(wantInfo).then((data) => {
+ // ...
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+2. Call **terminateSelfWithResult()** to stop FuncAbility. Use the input parameter **abilityResult** to carry the information that FuncAbility needs to return to EntryAbility.
+
+ ```ts
+ const RESULT_CODE: number = 1001;
+ let abilityResult = {
+ resultCode: RESULT_CODE,
+ want: {
+ bundleName: 'com.example.myapplication',
+ abilityName: 'FuncAbility',
+ moduleName: 'module1',
+ parameters: {
+ info: 'From the Index page of FuncAbility',
+ },
+ },
+ }
+ // context is the ability context of the callee UIAbility.
+ this.context.terminateSelfWithResult(abilityResult, (err) => {
+ // ...
+ });
+ ```
+
+3. After FuncAbility stops itself, EntryAbility uses the **startAbilityForResult()** method to receive the information returned by FuncAbility. The value of **RESULT_CODE** must be the same as the preceding value.
+
+ ```ts
+ const RESULT_CODE: number = 1001;
+
+ // ...
+
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbilityForResult(want).then((data) => {
+ if (data?.resultCode === RESULT_CODE) {
+ // Parse the information returned by the callee UIAbility.
+ let info = data.want?.parameters?.info;
+ // ...
+ }
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+
+## Starting UIAbility of Another Application
+
+Generally, the user only needs to do a common operation (for example, selecting a document application to view the document content) to start the UIAbility of another application. The [implicit Want launch mode](want-overview.md#types-of-want) is recommended. The system identifies a matched UIAbility and starts it based on the **want** parameter of the caller.
+
+There are two ways to start **UIAbility**: [explicit and implicit](want-overview.md).
+
+- Explicit Want launch: This mode is used to start a determined UIAbility component of an application. You need to set **bundleName** and **abilityName** of the target application in the **want** parameter.
+
+- Implicit Want launch: The user selects a UIAbility to start based on the matching conditions. That is, the UIAbility to start is not determined (the **abilityName** parameter is not specified). When the **startAbility()** method is called, the **want** parameter specifies a series of parameters such as [entities](../reference/apis/js-apis-ability-wantConstant.md#wantconstantentity) and [actions](../reference/apis/js-apis-ability-wantConstant.md#wantconstantaction). **entities** provides additional type information of the target UIAbility, such as the browser or video player. **actions** specifies the common operations to perform, such as viewing, sharing, and application details. Then the system analyzes the **want** parameter to find the right UIAbility to start. You usually do not know whether the target application is installed and what **bundleName** and **abilityName** of the target application are. Therefore, implicit Want launch is usually used to start the UIAbility of another application.
+
+This section describes how to start the UIAbility of another application through implicit Want.
+
+1. Install multiple document applications on your device. In the **module.json5** file of each UIAbility component, configure [entities](../reference/apis/js-apis-ability-wantConstant.md#wantconstantentity) and [actions](../reference/apis/js-apis-ability-wantConstant.md#wantconstantaction) under **skills**.
+
+ ```json
+ {
+ "module": {
+ "abilities": [
+ {
+ // ...
+ "skills": [
+ {
+ "entities": [
+ // ...
+ "entity.system.default"
+ ],
+ "actions": [
+ // ...
+ "ohos.want.action.viewData"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ```
+
+2. Include **entities** and **actions** of the caller's **want** parameter into **entities** and **actions** under **skills** of the target UIAbility. After the system matches the UIAbility that meets the **entities** and **actions** information, a dialog box is displayed, showing the list of matched UIAbility instances for users to select. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability).
+
+ ```ts
+ let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ // Uncomment the line below if you want to implicitly query data only in the specific bundle.
+ // bundleName: 'com.example.myapplication',
+ action: 'ohos.want.action.viewData',
+ // entities can be omitted.
+ entities: ['entity.system.default'],
+ }
+
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbility(wantInfo).then(() => {
+ // ...
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+ The following figure shows the effect. When you click **Open PDF**, a dialog box is displayed for you to select.
+
+
+3. To stop the **UIAbility** instance after the document application is used, call **terminateSelf()**.
+
+ ```ts
+ // context is the ability context of the UIAbility instance to stop.
+ this.context.terminateSelf((err) => {
+ // ...
+ });
+ ```
+
+
+## Starting UIAbility of Another Application and Obtaining the Return Result
+
+If you want to obtain the return result when using implicit Want to start the UIAbility of another application, use the **startAbilityForResult()** method. An example scenario is that the main application needs to start a third-party payment application and obtain the payment result.
+
+1. In the **module.json5** file of the UIAbility corresponding to the payment application, set [entities](../reference/apis/js-apis-ability-wantConstant.md#wantconstantentity) and [actions](../reference/apis/js-apis-ability-wantConstant.md#wantconstantaction) under **skills**.
+
+ ```json
+ {
+ "module": {
+ "abilities": [
+ {
+ // ...
+ "skills": [
+ {
+ "entities": [
+ // ...
+ "entity.system.default"
+ ],
+ "actions": [
+ // ...
+ "ohos.want.action.editData"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ```
+
+2. Call the **startAbilityForResult()** method to start the UIAbility of the payment application. Include **entities** and **actions** of the caller's **want** parameter into **entities** and **actions** under **skills** of the target UIAbility. Use **data** in the asynchronous callback to receive the information returned to the caller after the payment UIAbility stops itself. After the system matches the UIAbility that meets the **entities** and **actions** information, a dialog box is displayed, showing the list of matched UIAbility instances for users to select.
+
+ ```ts
+ let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ // Uncomment the line below if you want to implicitly query data only in the specific bundle.
+ // bundleName: 'com.example.myapplication',
+ action: 'ohos.want.action.editData',
+ // entities can be omitted.
+ entities: ['entity.system.default'],
+ }
+
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbilityForResult(wantInfo).then((data) => {
+ // ...
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+3. After the payment is finished, call the **terminateSelfWithResult()** method to stop the payment UIAbility and return the **abilityResult** parameter.
+
+ ```ts
+ const RESULT_CODE: number = 1001;
+ let abilityResult = {
+ resultCode: RESULT_CODE,
+ want: {
+ bundleName: 'com.example.myapplication',
+ abilityName: 'EntryAbility',
+ moduleName: 'entry',
+ parameters: {
+ payResult: 'OKay',
+ },
+ },
+ }
+ // context is the ability context of the callee UIAbility.
+ this.context.terminateSelfWithResult(abilityResult, (err) => {
+ // ...
+ });
+ ```
+
+4. Receive the information returned by the payment application in the callback of the **startAbilityForResult()** method. The value of **RESULT_CODE** must be the same as that returned by **terminateSelfWithResult()**.
+
+ ```ts
+ const RESULT_CODE: number = 1001;
+
+ let want = {
+ // Want parameter information.
+ };
+
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbilityForResult(want).then((data) => {
+ if (data?.resultCode === RESULT_CODE) {
+ // Parse the information returned by the callee UIAbility.
+ let payResult = data.want?.parameters?.payResult;
+ // ...
+ }
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+
+## Starting a Specified Page of UIAbility
+
+A UIAbility component can have multiple pages. When it is started in different scenarios, different pages can be displayed. For example, when a user jumps from a page of a UIAbility component to another UIAbility, you want to start a specified page of the target UIAbility. This section describes how to specify a startup page and start the specified page when the target UIAbility is started for the first time or when the target UIAbility is not started for the first time.
+
+
+### Specifying a Startup Page
+
+When the caller UIAbility starts another UIAbility, it usually needs to redirect to a specified page. For example, FuncAbility contains two pages: Index (corresponding to the home page) and Second (corresponding to function A page). You can configure the specified page URL in the **want** parameter by adding a custom parameter to **parameters** in **want**. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability).
+
+
+```ts
+let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ bundleName: 'com.example.myapplication',
+ abilityName: 'FuncAbility',
+ moduleName: 'module1', // moduleName is optional.
+ parameters: {// Custom parameter used to pass the page information.
+ router: 'funcA',
+ },
+}
+// context is the ability-level context of the initiator UIAbility.
+this.context.startAbility(wantInfo).then(() => {
+ // ...
+}).catch((err) => {
+ // ...
+})
+```
+
+
+### Starting a Page When the Target UIAbility Is Started for the First Time
+
+When the target UIAbility is started for the first time, in the **onWindowStageCreate()** callback of the target UIAbility, parse the **want** parameter passed by EntryAbility to obtain the URL of the page to be loaded, and pass the URL to the **windowStage.loadContent()** method.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility'
+import Window from '@ohos.window'
+
+export default class FuncAbility extends UIAbility {
+ funcAbilityWant;
+
+ onCreate(want, launchParam) {
+ // Receive the parameters passed by the caller UIAbility.
+ this.funcAbilityWant = want;
+ }
+
+ onWindowStageCreate(windowStage: Window.WindowStage) {
+ // Main window is created. Set a main page for this ability.
+ let url = 'pages/Index';
+ if (this.funcAbilityWant?.parameters?.router) {
+ if (this.funcAbilityWant.parameters.router === 'funA') {
+ url = 'pages/Second';
+ }
+ }
+ windowStage.loadContent(url, (err, data) => {
+ // ...
+ });
+ }
+}
+```
+
+
+### Starting a Page When the Target UIAbility Is Not Started for the First Time
+
+You start application A, and its home page is displayed. Then you return to the home screen and start application B. Now you need to start application A again from application B and have a specified page of application A displayed. An example scenario is as follows: When you open the home page of the SMS application and return to the home screen, the SMS application is in the opened state and its home page is displayed. Then you open the home page of the Contacts application, access user A's details page, and touch the SMS icon to send an SMS message to user A. The SMS application is started again and the sending page is displayed.
+
+
+
+In summary, when a UIAbility instance of application A has been created and the main page of the UIAbility instance is displayed, you need to start the UIAbility of application A from application B and have a different page displayed.
+
+1. In the target UIAbility, the **Index** page is loaded by default. The UIAbility instance has been created, and the **onNewWant()** callback rather than **onCreate()** and **onWindowStageCreate()** will be invoked. In the **onNewWant()** callback, parse the **want** parameter and bind it to the global variable **globalThis**.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility'
+
+ export default class FuncAbility extends UIAbility {
+ onNewWant(want, launchParam) {
+ // Receive the parameters passed by the caller UIAbility.
+ globalThis.funcAbilityWant = want;
+ // ...
+ }
+ }
+ ```
+
+2. In FuncAbility, use the router module to implement redirection to the specified page on the **Index** page. Because the **Index** page of FuncAbility is active, the variable will not be declared again and the **aboutToAppear()** callback will not be triggered. Therefore, the page routing functionality can be implemented in the **onPageShow()** callback of the **Index** page.
+
+ ```ts
+ import router from '@ohos.router';
+
+ @Entry
+ @Component
+ struct Index {
+ onPageShow() {
+ let funcAbilityWant = globalThis.funcAbilityWant;
+ let url2 = funcAbilityWant?.parameters?.router;
+ if (url2 && url2 === 'funcA') {
+ router.replaceUrl({
+ url: 'pages/Second',
+ })
+ }
+ }
+
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
+
+> **NOTE**
+>
+> When the [launch type of the callee UIAbility](uiability-launch-type.md) is set to **standard**, a new instance is created each time the callee UIAbility is started. In this case, the [onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant) callback will not be invoked.
+
+
+## Using Ability Call to Implement UIAbility Interaction
+
+This feature applies only to system applications. Ability call is an extension of the UIAbility capability. It enables the UIAbility to be invoked by and communicate with external systems. The UIAbility invoked can be either started in the foreground or created and run in the background. You can use the ability call to implement data sharing between two UIAbility instances (caller ability and callee ability) through IPC.
+
+The core API used for the ability call is **startAbilityByCall**, which differs from **startAbility** in the following ways:
+
+- **startAbilityByCall** supports ability launch in the foreground and background, whereas **startAbility** supports ability launch in the foreground only.
+
+- The caller ability can use the caller object returned by **startAbilityByCall** to communicate with the callee ability, but **startAbility** does not provide the communication capability.
+
+Ability call is usually used in the following scenarios:
+
+- Communicating with the callee ability
+
+- Starting the callee ability in the background
+
+**Table 1** Terms used in the ability call
+
+| **Term**| Description|
+| -------- | -------- |
+| CallerAbility | UIAbility that triggers the ability call.|
+| CalleeAbility | UIAbility invoked by the ability call.|
+| Caller | Object returned by **startAbilityByCall** and used by the caller ability to communicate with the callee ability.|
+| Callee | Object held by the callee ability to communicate with the caller ability.|
+
+The following figure shows the ability call process.
+
+Figure 1 Ability call process
+
+
+- The caller ability uses **startAbilityByCall** to obtain a caller object and uses **call()** of the caller object to send data to the callee ability.
+
+- The callee ability, which holds a **Callee** object, uses **on()** of the **Callee** object to register a callback. This callback is invoked when the callee ability receives data from the caller ability.
+
+> **NOTE**
+> 1. Currently, only system applications can use the ability call.
+>
+> 2. The launch type of the callee ability must be **singleton**.
+>
+> 3. Both local (intra-device) and cross-device ability calls are supported. The following describes how to initiate a local call. For details about how to initiate a cross-device ability call, see [Using Cross-Device Ability Call](hop-multi-device-collaboration.md#using-cross-device-ability-call).
+
+
+### Available APIs
+
+The following table describes the main APIs used for the ability call. For details, see [AbilityContext](../reference/apis/js-apis-app-ability-uiAbility.md#caller).
+
+ **Table 2** Ability call APIs
+
+| API| Description|
+| -------- | -------- |
+| startAbilityByCall(want: Want): Promise<Caller> | Starts a UIAbility in the foreground (through the **want** configuration) or background (default) and obtains the caller object for communication with the UIAbility. For details, see [AbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md#abilitycontextstartabilitybycall) or [ServiceExtensionContext](../reference/apis/js-apis-inner-application-serviceExtensionContext.md#serviceextensioncontextstartabilitybycall).|
+| on(method: string, callback: CalleeCallBack): void | Callback invoked when the callee ability registers a method.|
+| off(method: string): void | Callback invoked when the callee ability deregisters a method.|
+| call(method: string, data: rpc.Sequenceable): Promise<void> | Sends agreed sequenceable data to the callee ability.|
+| callWithResult(method: string, data: rpc.Sequenceable): Promise<rpc.MessageParcel> | Sends agreed sequenceable data to the callee ability and obtains the agreed sequenceable data returned by the callee ability.|
+| release(): void | Releases the caller object.|
+| on(type: "release", callback: OnReleaseCallback): void | Callback invoked when the caller object is released.|
+
+The implementation of using the ability call for UIAbility interaction involves two parts.
+
+- [Creating a Callee Ability](#creating-a-callee-ability)
+
+- [Accessing the Callee Ability](#accessing-the-callee-ability)
+
+
+### Creating a Callee Ability
+
+For the callee ability, implement the callback to receive data and the methods to marshal and unmarshal data. When data needs to be received, use **on()** to register a listener. When data does not need to be received, use **off()** to deregister the listener.
+
+1. Configure the ability launch type.
+
+
+Set **launchType** of the callee ability to **singleton** in the **module.json5** file.
+
+| JSON Field| Description|
+| -------- | -------- |
+| "launchType" | Ability launch type. Set this parameter to **singleton**.|
+
+An example of the ability configuration is as follows:
+
+
+ ```json
+ "abilities":[{
+ "name": ".CalleeAbility",
+ "srcEntrance": "./ets/CalleeAbility/CalleeAbility.ts",
+ "launchType": "singleton",
+ "description": "$string:CalleeAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:CalleeAbility_label",
+ "visible": true
+ }]
+ ```
+
+2. Import the **UIAbility** module.
+
+ ```ts
+ import Ability from '@ohos.app.ability.UIAbility';
+ ```
+
+3. Define the agreed sequenceable data.
+
+ The data formats sent and received by the caller and callee abilities must be consistent. In the following example, the data formats are number and string.
+
+
+ ```ts
+ export default class MySequenceable {
+ num: number = 0
+ str: string = ""
+
+ constructor(num, string) {
+ this.num = num
+ this.str = string
+ }
+
+ marshalling(messageParcel) {
+ messageParcel.writeInt(this.num)
+ messageParcel.writeString(this.str)
+ return true
+ }
+
+ unmarshalling(messageParcel) {
+ this.num = messageParcel.readInt()
+ this.str = messageParcel.readString()
+ return true
+ }
+ }
+ ```
+
+4. Implement **Callee.on** and **Callee.off**.
+
+ The time to register a listener for the callee ability depends on your application. The data sent and received before the listener is registered and that after the listener is deregistered are not processed. In the following example, the **MSG_SEND_METHOD** listener is registered in **onCreate** of the ability and deregistered in **onDestroy**. After receiving sequenceable data, the application processes the data and returns the data result. You need to implement processing based on service requirements. The sample code is as follows:
+
+
+ ```ts
+ const TAG: string = '[CalleeAbility]';
+ const MSG_SEND_METHOD: string = 'CallSendMsg';
+
+ function sendMsgCallback(data) {
+ console.info('CalleeSortFunc called');
+
+ // Obtain the sequenceable data sent by the caller ability.
+ let receivedData = new MySequenceable(0, '');
+ data.readSequenceable(receivedData);
+ console.info(`receiveData[${receivedData.num}, ${receivedData.str}]`);
+
+ // Process the data.
+ // Return the sequenceable data result to the caller ability.
+ return new MySequenceable(receivedData.num + 1, `send ${receivedData.str} succeed`);
+ }
+
+ export default class CalleeAbility extends Ability {
+ onCreate(want, launchParam) {
+ try {
+ this.callee.on(MSG_SEND_METHOD, sendMsgCallback);
+ } catch (error) {
+ console.info(`${MSG_SEND_METHOD} register failed with error ${JSON.stringify(error)}`);
+ }
+ }
+
+ onDestroy() {
+ try {
+ this.callee.off(MSG_SEND_METHOD);
+ } catch (error) {
+ console.error(TAG, `${MSG_SEND_METHOD} unregister failed with error ${JSON.stringify(error)}`);
+ }
+ }
+ }
+ ```
+
+
+### Accessing the Callee Ability
+
+1. Import the **UIAbility** module.
+
+ ```ts
+ import Ability from '@ohos.app.ability.UIAbility';
+ ```
+
+2. Obtain the caller interface.
+
+
+ The **context** attribute of the ability implements **startAbilityByCall** to obtain the caller object for communication. The following example uses **this.context** to obtain the **context** attribute of the ability, uses **startAbilityByCall** to start the callee ability, obtain the caller object, and register the **onRelease** listener of the caller ability. You need to implement processing based on service requirements.
+
+ ```ts
+ // Register the onRelease() listener of the caller ability.
+ private regOnRelease(caller) {
+ try {
+ caller.on("release", (msg) => {
+ console.info(`caller onRelease is called ${msg}`);
+ })
+ console.info('caller register OnRelease succeed');
+ } catch (error) {
+ console.info(`caller register OnRelease failed with ${error}`);
+ }
+ }
+
+ async onButtonGetCaller() {
+ try {
+ this.caller = await context.startAbilityByCall({
+ bundleName: 'com.samples.CallApplication',
+ abilityName: 'CalleeAbility'
+ })
+ if (this.caller === undefined) {
+ console.info('get caller failed')
+ return
+ }
+ console.info('get caller success')
+ this.regOnRelease(this.caller)
+ } catch (error) {
+ console.info(`get caller failed with ${error}`)
+ }
+ }
+ ```
diff --git a/en/application-dev/application-models/uiability-launch-type.md b/en/application-dev/application-models/uiability-launch-type.md
new file mode 100644
index 0000000000000000000000000000000000000000..c64d7fb3ffc0e3fa31741924439998118449068a
--- /dev/null
+++ b/en/application-dev/application-models/uiability-launch-type.md
@@ -0,0 +1,158 @@
+# UIAbility Component Launch Type
+
+
+The launch type of the UIAbility component refers to the state of the UIAbility instance at startup. The system provides three launch types:
+
+
+- [Singleton](#singleton)
+
+- [Standard](#standard)
+
+- [Specified](#specified)
+
+
+## Singleton
+
+**singleton** is the default launch type.
+
+Each time [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) is called, if a UIAbility instance of this type already exists in the application process, the instance is reused. Therefore, only one UIAbility instance of this type exists in the system, that is, displayed in **Recents**.
+
+**Figure 1** Demonstration effect in singleton mode
+
+
+> **NOTE**
+>
+> Assume that the application already has a UIAbility instance created, and the launch type of the UIAbility instance is set to **singleton**. If [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) is called again to start the UIAbility instance, the original UIAbility instance is started, and no new UIAbility instance is created. In this case, the [onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant) callback is invoked, but the [onCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityoncreate) and [onWindowStageCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityonwindowstagecreate) callbacks are not.
+
+To use the singleton mode, set **launchType** in the [module.json5 configuration file](../quick-start/module-configuration-file.md) to **singleton**.
+
+
+```json
+{
+ "module": {
+ // ...
+ "abilities": [
+ {
+ "launchType": "singleton",
+ // ...
+ }
+ ]
+ }
+}
+```
+
+
+## Standard
+
+In standard mode, each time [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) is called, a new UIAbility instance of this type is created in the application process. Multiple UIAbility instances of this type are displayed in **Recents**.
+
+**Figure 2** Demonstration effect in standard mode
+
+
+To use the standard mode, set **launchType** in the [module.json5 configuration file](../quick-start/module-configuration-file.md) to **standard**.
+
+
+```json
+{
+ "module": {
+ // ...
+ "abilities": [
+ {
+ "launchType": "standard",
+ // ...
+ }
+ ]
+ }
+}
+```
+
+
+## Specified
+
+The **specified** mode is used in some special scenarios. For example, in a document application, you want a document instance to be created each time you create a document, but you want to use the same document instance when you repeatedly open an existing document.
+
+**Figure 3** Demonstration effect in specified mode
+
+
+For example, there are EntryAbility and SpecifiedAbility, and the launch type of SpecifiedAbility is set to **specified**. You are required to start SpecifiedAbility from EntryAbility.
+
+1. In SpecifiedAbility, set the **launchType** field in the [module.json5 configuration file](../quick-start/module-configuration-file.md) to **specified**.
+
+ ```json
+ {
+ "module": {
+ // ...
+ "abilities": [
+ {
+ "launchType": "specified",
+ // ...
+ }
+ ]
+ }
+ }
+ ```
+
+2. Before a UIAbility instance is created, you can create a unique string key for the instance. The key is bound to the UIAbility instance when it is created. Each time [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) is called, the application is asked which UIAbility instance is used to respond to the [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) request.
+ In EntryAbility, add a custom parameter, for example, **instanceKey**, to the **want** parameter in [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) to distinguish the UIAbility instances.
+
+ ```ts
+ // Configure an independent key for each UIAbility instance.
+ // For example, in the document usage scenario, use the document path as the key.
+ function getInstance() {
+ // ...
+ }
+
+ let want = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ bundleName: 'com.example.myapplication',
+ abilityName: 'SpecifiedAbility',
+ moduleName: 'module1', // moduleName is optional.
+ parameters: {// Custom information.
+ instanceKey: getInstance(),
+ },
+ }
+ // context is the ability-level context of the initiator UIAbility.
+ this.context.startAbility(want).then(() => {
+ // ...
+ }).catch((err) => {
+ // ...
+ })
+ ```
+
+3. During running, the internal service of UIAbility determines whether to create multiple instances. If the key is matched, the UIAbility instance bound to the key is started. Otherwise, a new UIAbility instance is created.
+ The launch type of SpecifiedAbility is set to **specified**. Before SpecifiedAbility is started, the [onAcceptWant()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonacceptwant) callback of the corresponding AbilityStage instance is invoked to parse the input **want** parameter and obtain the custom parameter **instanceKey**. A string key identifier is returned through the [onAcceptWant()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonacceptwant) callback of the AbilityStage instance. [If the returned key corresponds to a started UIAbility instance](mission-management-launch-type.md#fig14520125175314), that UIAbility instance is switched to the foreground and gains focus again. Otherwise, a new instance is created and started.
+
+ ```ts
+ import AbilityStage from '@ohos.app.ability.AbilityStage';
+
+ export default class MyAbilityStage extends AbilityStage {
+ onAcceptWant(want): string {
+ // In the AbilityStage instance of the callee, a key value corresponding to a UIAbility instance is returned for UIAbility whose launch type is specified.
+ // In this example, SpecifiedAbility of module1 is returned.
+ if (want.abilityName === 'SpecifiedAbility') {
+ // The returned string key is a custom string.
+ return `SpecifiedAbilityInstance_${want.parameters.instanceKey}`;
+ }
+
+ return '';
+ }
+ }
+ ```
+
+ > **NOTE**
+ >
+ > 1. Assume that the application already has a UIAbility instance created, and the launch type of the UIAbility instance is set to **specified**. If [startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability) is called again to start the UIAbility instance, and the [onAcceptWant()](../reference/apis/js-apis-app-ability-abilityStage.md#abilitystageonacceptwant) callback of [AbilityStage](../reference/apis/js-apis-app-ability-abilityStage.md) matches a created UIAbility instance, the original UIAbility instance is started, and no new UIAbility instance is created. In this case, the [onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant) callback is invoked, but the [onCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityoncreate) and [onWindowStageCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityonwindowstagecreate) callbacks are not.
+ > 2. AbilityStage is not automatically generated in the default project of DevEco Studio. For details about how to create an AbilityStage file, see [AbilityStage Component Container](abilitystage.md).
+
+ For example, in the document application, different key values are bound to different document instances. Each time a document is created, a new key value (for example, file path) is passed, and a new UIAbility instance is created when UIAbility is started in AbilityStage. However, when you open an existing document, the same UIAbility instance is started again in AbilityStage.
+
+ The following steps are used as an example.
+ 1. Open file A. A UIAbility instance, for example, UIAbility instance 1, is started.
+
+ 2. Close the process of file A in **Recents**. UIAbility instance 1 is destroyed. Return to the home screen and open file A again. A new UIAbility instance is started, for example, UIAbility instance 2.
+
+ 3. Return to the home screen and open file B. A new UIAbility instance is started, for example, UIAbility instance 3.
+
+ 4. Return to the home screen and open file A again. UIAbility instance 2 is started.
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/uiability-lifecycle.md b/en/application-dev/application-models/uiability-lifecycle.md
new file mode 100644
index 0000000000000000000000000000000000000000..b530a7bda5c4f3c4fe0dd2eb96d53991083a5ff4
--- /dev/null
+++ b/en/application-dev/application-models/uiability-lifecycle.md
@@ -0,0 +1,147 @@
+# UIAbility Component Lifecycle
+
+
+## Overview
+
+When a user opens, switches, and returns to an application, the UIAbility instances in the application transit in their different states. The UIAbility class provides a series of callbacks. Through these callbacks, you can know the state changes of the UIAbility instance, for example, being created or destroyed, or running in the foreground or background.
+
+The lifecycle of UIAbility has four states: **Create**, **Foreground**, **Background**, and **Destroy**, as shown in the figure below.
+
+ **Figure 1** UIAbility lifecycle states
+
+
+
+## Description of Lifecycle States
+
+
+### Create
+
+The **Create** state is triggered when the UIAbility instance is created during application loading. The system invokes the **onCreate()** callback. In this callback, you can perform application initialization operations, for example, defining variables or loading resources.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ // Initialize the application.
+ }
+ // ...
+}
+```
+
+
+### WindowStageCreate and WindowStageDestory
+
+After the UIAbility instance is created but before it enters the **Foreground** state, the system creates a WindowStage instance and triggers the **onWindowStageCreate()** callback. You can set UI loading and WindowStage event subscription in the callback.
+
+ **Figure 2** WindowStageCreate and WindowStageDestory
+
+
+In the **onWindowStageCreate()** callback, use [loadContent()](../reference/apis/js-apis-window.md#loadcontent9-2) to set the page to be loaded, and call [on('windowStageEvent')](../reference/apis/js-apis-window.md#onwindowstageevent9) to subscribe to [WindowStage events](../reference/apis/js-apis-window.md#windowstageeventtype9), for example, having or losing focus, or becoming visible or invisible.
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ // ...
+
+ onWindowStageCreate(windowStage: Window.WindowStage) {
+ // Subscribe to the WindowStage events (having or losing focus, or becoming visible or invisible).
+ try {
+ windowStage.on('windowStageEvent', (data) => {
+ console.info('Succeeded in enabling the listener for window stage event changes. Data: ' +
+ JSON.stringify(data));
+ });
+ } catch (exception) {
+ console.error('Failed to enable the listener for window stage event changes. Cause:' +
+ JSON.stringify(exception));
+ };
+
+ // Set the UI loading.
+ windowStage.loadContent('pages/Index', (err, data) => {
+ // ...
+ });
+ }
+}
+```
+
+> **NOTE**
+>
+> For details about how to use WindowStage, see [Window Development](../windowmanager/application-window-stage.md).
+
+Before the UIAbility instance is destroyed, the **onWindowStageDestroy()** callback is invoked to release UI resources. In this callback, you can unsubscribe from the WindowStage events.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ // ...
+
+ onWindowStageDestroy() {
+ // Release UI resources.
+ // Unsubscribe from the WindowStage events such as having or losing focus in the onWindowStageDestroy() callback.
+ try {
+ windowStage.off('windowStageEvent');
+ } catch (exception) {
+ console.error('Failed to disable the listener for window stage event changes. Cause:' +
+ JSON.stringify(exception));
+ };
+ }
+}
+```
+
+
+### Foreground and Background
+
+The **Foreground** and **Background** states are triggered when the UIAbility instance is switched to the foreground and background respectively. They correspond to the **onForeground()** and **onBackground()** callbacks.
+
+The **onForeground()** callback is triggered before the UI of the UIAbility instance becomes visible, for example, when the UIAbility instance is switched to the foreground. In this callback, you can apply for resources required by the system or re-apply for resources that have been released in the **onBackground()** callback.
+
+The **onBackground()** callback is triggered after the UI of the UIAbility component is completely invisible, for example, when the UIAbility instance is switched to the background. In this callback, you can release useless resources or perform time-consuming operations such as saving the status.
+
+For example, an application needs to use positioning, and the application has requested the positioning permission from the user. Before the UI is displayed, you can enable positioning in the **onForeground()** callback to obtain the location information.
+
+When the application is switched to the background, you can disable positioning in the **onBackground()** callback to reduce system resource consumption.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+
+export default class EntryAbility extends UIAbility {
+ // ...
+
+ onForeground() {
+ // Apply for the resources required by the system or re-apply for the resources released in onBackground().
+ }
+
+ onBackground() {
+ // Release useless resources when the UI is invisible, or perform time-consuming operations in this callback,
+ // for example, saving the status.
+ }
+}
+```
+
+
+### Destroy
+
+The **Destroy** state is triggered when the UIAbility instance is destroyed. You can perform operations such as releasing system resources and saving data in the **onDestroy()** callback.
+
+The UIAbility instance is destroyed when **terminateSelf()** is called or the user closes the instance in **Recents**.
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ // ...
+
+ onDestroy() {
+ // Release system resources and save data.
+ }
+}
+```
diff --git a/en/application-dev/application-models/uiability-overview.md b/en/application-dev/application-models/uiability-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..ec26d2ca9b360259d7f7c00c37cba53bd5db8756
--- /dev/null
+++ b/en/application-dev/application-models/uiability-overview.md
@@ -0,0 +1,40 @@
+# UIAbility Component Overview
+
+
+## Overview
+
+UIAbility has the UI and is mainly used for user interaction.
+
+UIAbility is the basic unit scheduled by the system and provides a window for applications to draw UIs. A UIAbility component can implement a functional module through multiple pages. Each UIAbility component instance corresponds to a mission in **Recents**.
+
+
+## Privacy Statement Configuration
+
+To enable an application to properly use a UIAbility component, declare the UIAbility name, entry, and tags under [abilities](../quick-start/module-configuration-file.md#abilities) in the [module.json5 configuration file](../quick-start/module-configuration-file.md).
+
+
+```json
+{
+ "module": {
+ // ...
+ "abilities": [
+ {
+ "name": "EntryAbility", // Name of the UIAbility component.
+ "srcEntrance": "./ets/entryability/EntryAbility.ts", // Code path of the UIAbility component.
+ "description": "$string:EntryAbility_desc", // Description of the UIAbility component.
+ "icon": "$media:icon", // Icon of the UIAbility component.
+ "label": "$string:EntryAbility_label", // Label of the UIAbility component.
+ "startWindowIcon": "$media:icon", // Index of the icon resource file.
+ "startWindowBackground": "$color:start_window_background", // Index of the background color resource file.
+ // ...
+ }
+ ]
+ }
+}
+```
+
+> **NOTE**
+>
+> For the ability composition, see [Adding an Ability to a Module](https://developer.harmonyos.com/en/docs/documentation/doc-guides-V3/ohos-adding-ability-0000001218280664-V3).
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/uiability-usage.md b/en/application-dev/application-models/uiability-usage.md
new file mode 100644
index 0000000000000000000000000000000000000000..ccd80625f460ea704f689f9b7dfa83f6b42fa47f
--- /dev/null
+++ b/en/application-dev/application-models/uiability-usage.md
@@ -0,0 +1,99 @@
+# UIAbility Component Usage
+
+
+When using the UIAbility component, you must specify a startup page and obtain the context, [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md).
+
+
+## Specifying the Startup Page of UIAbility
+
+If no startup page is specified, a white screen occurs after the application is started. You can use **loadContent()** of [WindowStage](../reference/apis/js-apis-window.md#windowstage9) to set the startup page in the **onWindowStageCreate()** callback of the UIAbility instance.
+
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ onWindowStageCreate(windowStage: Window.WindowStage) {
+ // Main window is created. Set a main page for this ability.
+ windowStage.loadContent('pages/Index', (err, data) => {
+ // ...
+ });
+ }
+
+ // ...
+}
+```
+
+> **NOTE**
+>
+> When you create UIAbility in DevEco Studio, the UIAbility instance loads the **Index** page by default. Therefore, you only need to replace the **Index** page path with the required startup page path.
+
+
+## Obtaining the Context of UIAbility
+
+The UIAbility class has its own context, which is an instance of the [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md) class. The UIAbilityContext class has attributes such as **abilityInfo** and **currentHapModuleInfo**. UIAbilityContext can be used to obtain the UIAbility configuration information, such as the bundle code path, bundle name, ability name, and environment status required by the application. It can also be used to obtain methods to operate the UIAbility instance, such as **startAbility()**, **connectServiceExtensionAbility()**, and **terminateSelf()**.
+
+- You can use **this.context** to obtain the context of a UIAbility instance.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ // Obtain the context of the UIAbility instance.
+ let context = this.context;
+
+ // ...
+ }
+ }
+ ```
+
+- Import the context module and define the **context** variable in the component.
+
+ ```ts
+ import common from '@ohos.app.ability.common';
+
+ @Entry
+ @Component
+ struct Index {
+ private context = getContext(this) as common.UIAbilityContext;
+
+ startAbilityTest() {
+ let want = {
+ // Want parameter information.
+ };
+ this.context.startAbility(want);
+ }
+
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
+
+ You can also define variables after importing the context module but before using [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md).
+
+
+ ```ts
+ import common from '@ohos.app.ability.common';
+
+ @Entry
+ @Component
+ struct Index {
+
+ startAbilityTest() {
+ let context = getContext(this) as common.UIAbilityContext;
+ let want = {
+ // Want parameter information.
+ };
+ context.startAbility(want);
+ }
+
+ // Page display.
+ build() {
+ // ...
+ }
+ }
+ ```
diff --git a/en/application-dev/application-models/want-fa.md b/en/application-dev/application-models/want-fa.md
new file mode 100644
index 0000000000000000000000000000000000000000..5ef82daf1f6ac353200131fd8195cbea35725e3c
--- /dev/null
+++ b/en/application-dev/application-models/want-fa.md
@@ -0,0 +1,4 @@
+# Want (FA Model)
+
+
+For details, see "[Want](want-overview.md)" in the stage model.
diff --git a/en/application-dev/application-models/want-overview.md b/en/application-dev/application-models/want-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..784f190ad6b23a85c60995c44babdc8dd34d576d
--- /dev/null
+++ b/en/application-dev/application-models/want-overview.md
@@ -0,0 +1,51 @@
+# Want Overview
+
+
+## Definition and Usage of Want
+
+[Want](../reference/apis/js-apis-app-ability-want.md) is used as the carrier to transfer information between application components. It is used as a parameter of **startAbility()** to specify the startup target and information that needs to be carried during startup, for example, **bundleName** and **abilityName**, which respectively indicate the bundle name of the target ability and the ability name in the bundle. For example, when UIAbilityA starts UIAbilityB and needs to transfer some data to UIAbilityB, it can use Want to transfer the data.
+
+**Figure 1** Want usage
+
+
+
+## Types of Want
+
+- **Explicit Want**: A type of Want with **abilityName** and **bundleName** specified when starting an ability.
+ When there is an explicit object to process the request, the target ability can be started by specifying the bundle name and ability name in Want. Explicit Want is usually used to start a known ability.
+
+ ```ts
+ let wantInfo = {
+ deviceId: '', // An empty deviceId indicates the local device.
+ bundleName: 'com.example.myapplication',
+ abilityName: 'FuncAbility',
+ }
+ ```
+
+- **Implicit Want**: A type of Want with **abilityName** unspecified when starting the ability.
+ Implicit Want can be used when the object used to process the request is unclear and the current application wants to use a capability (defined by the [skills tag](../quick-start/module-configuration-file.md#skills-tag)) provided by another application. For example, you can use implicit Want to describe a request for opening a link, since you do not care which application is used to open the link. The system matches all applications that support the request.
+
+
+ ```ts
+ let wantInfo = {
+ // Uncomment the line below if you want to implicitly query data only in the specific bundle.
+ // bundleName: 'com.example.myapplication',
+ action: 'ohos.want.action.search',
+ // entities can be omitted.
+ entities: [ 'entity.system.browsable' ],
+ uri: 'https://www.test.com:8080/query/student',
+ type: 'text/plain',
+ };
+ ```
+
+ > **NOTE**
+ > - Depending on the ability matching result, the following cases may be possible when you attempt to use implicit Want to start the ability.
+ > - No ability is matched. The startup fails.
+ > - An ability that meets the conditions is matched. That ability is started.
+ > - Multiple abilities that meet the conditions are matched. A dialog box is displayed for users to select one of them.
+ >
+ > - If the **want** parameter passed does not contain **abilityName** or **bundleName**, the ServiceExtensionAbility components of all applications cannot be started through implicit Want.
+ >
+ > - If the **want** parameter passed contains **bundleName**, the **startServiceExtensionAbility()** method can be used to implicitly start ServiceExtensionAbility. By default, ServiceExtensionAbility with the highest priority is returned. If all the matching ServiceExtensionAbility components have the same priority, the first ServiceExtensionAbility is returned.
+
+
\ No newline at end of file
diff --git a/en/application-dev/application-models/widget-development-fa.md b/en/application-dev/application-models/widget-development-fa.md
new file mode 100644
index 0000000000000000000000000000000000000000..c170f134932af44c4e8b55888e216926ef51186e
--- /dev/null
+++ b/en/application-dev/application-models/widget-development-fa.md
@@ -0,0 +1,546 @@
+# Widget Development
+
+
+## Widget Overview
+
+A service widget (also called widget) is a set of UI components that display important information or operations specific to an application. It provides users with direct access to a desired application service, without the need to open the application first.
+
+A widget usually appears as a part of the UI of another application (which currently can only be a system application) and provides basic interactive features such as opening a UI page or sending a message.
+
+Before you get started, it would be helpful if you have a basic understanding of the following concepts:
+
+- Widget host: an application that displays the widget content and controls the widget location.
+
+- Widget Manager: a resident agent that provides widget management features such as periodic widget updates.
+
+- Widget provider: an atomic service that provides the widget content to display and controls how widget components are laid out and how they interact with users.
+
+
+## Working Principles
+
+Figure 1 shows the working principles of the widget framework.
+
+**Figure 1** Widget framework working principles in the FA model
+
+
+The widget host consists of the following modules:
+
+- Widget usage: provides operations such as creating, deleting, or updating a widget.
+
+- Communication adapter: provided by the OpenHarmony SDK for communication with the Widget Manager. It sends widget-related operations to the Widget Manager.
+
+The Widget Manager consists of the following modules:
+
+- Periodic updater: starts a scheduled task based on the update policy to periodically update a widget after it is added to the Widget Manager.
+
+- Cache manager: caches view information of a widget after it is added to the Widget Manager to directly return the cached data when the widget is obtained next time. This reduces the latency greatly.
+
+- Lifecycle manager: suspends update when a widget is switched to the background or is blocked, and updates and/or clears widget data during upgrade and deletion.
+
+- Object manager: manages RPC objects of the widget host. It is used to verify requests from the widget host and process callbacks after the widget update.
+
+- Communication adapter: communicates with the widget host and provider through RPCs.
+
+The widget provider consists of the following modules:
+
+- Widget service: implemented by the widget provider developer to process requests on widget creation, update, and deletion, and to provide corresponding widget services.
+
+- Instance manager: implemented by the widget provider developer for persistent management of widget instances allocated by the Widget Manager.
+
+- Communication adapter: provided by the OpenHarmony SDK for communication with the Widget Manager. It pushes update data to the Widget Manager.
+
+> **NOTE**
+>
+> You only need to develop the widget provider. The system automatically handles the work of the widget host and Widget Manager.
+
+
+## Available APIs
+
+The **FormAbility** has the following APIs.
+
+| API| Description|
+| -------- | -------- |
+| onCreate(want: Want): formBindingData.FormBindingData | Called to notify the widget provider that a widget has been created.|
+| onCastToNormal(formId: string): void | Called to notify the widget provider that a temporary widget has been converted to a normal one.|
+| onUpdate(formId: string): void | Called to notify the widget provider that a widget has been updated.|
+| onVisibilityChange(newStatus: { [key: string]: number }): void | Called to notify the widget provider of the change in widget visibility.|
+| onEvent(formId: string, message: string): void | Called to instruct the widget provider to receive and process a widget event.|
+| onDestroy(formId: string): void | Called to notify the widget provider that a widget has been destroyed.|
+| onAcquireFormState?(want: Want): formInfo.FormState | Called to instruct the widget provider to receive the status query result of a widget.|
+| onShare?(formId: string): {[key: string]: any} | Called by the widget provider to receive shared widget data.|
+
+The **FormProvider** class has the following APIs. For details, see [FormProvider](../reference/apis/js-apis-app-form-formProvider.md).
+
+
+| API| Description|
+| -------- | -------- |
+| setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void;| Sets the next refresh time for a widget. This API uses an asynchronous callback to return the result.|
+| setFormNextRefreshTime(formId: string, minute: number): Promise<void>;| Sets the next refresh time for a widget. This API uses a promise to return the result.|
+| updateForm(formId: string, formBindingData: FormBindingData, callback: AsyncCallback<void>): void; | Updates a widget. This API uses an asynchronous callback to return the result.|
+| updateForm(formId: string, formBindingData: FormBindingData): Promise<void>; | Updates a widget. This API uses a promise to return the result.|
+
+
+The **FormBindingData** class has the following APIs. For details, see [FormBindingData](../reference/apis/js-apis-app-form-formBindingData.md).
+
+
+| API| Description|
+| -------- | -------- |
+| createFormBindingData(obj?: Object \ string): FormBindingData| | Creates a **FormBindingData** object.|
+
+
+## How to Develop
+
+The widget provider development based on the [FA model](fa-model-development-overview.md) involves the following key steps:
+
+- [Implementing Widget Lifecycle Callbacks](#implementing-widget-lifecycle-callbacks): Develop the **FormAbility** lifecycle callback functions.
+
+- [Configuring the Widget Configuration File](#configuring-the-widget-configuration-file): Configure the application configuration file **config.json**.
+
+- [Persistently Storing Widget Data](#persistently-storing-widget-data): Perform persistent management on widget information.
+
+- [Updating Widget Data](#updating-widget-data): Call **updateForm()** to update the information displayed on a widget.
+
+- [Developing the Widget UI Page](#developing-the-widget-ui-page): Use HML+CSS+JSON to develop a JS widget UI page.
+
+- [Developing Widget Events](#developing-widget-events): Add the router and message events for a widget.
+
+
+### Implementing Widget Lifecycle Callbacks
+
+To create a widget in the FA model, implement the widget lifecycle callbacks. Generate a widget template by referring to [Developing a Service Widget](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-development-service-widget-0000001263280425).
+
+1. Import related modules to **form.ts**.
+
+ ```ts
+ import formBindingData from '@ohos.app.form.formBindingData';
+ import formInfo from '@ohos.app.form.formInfo';
+ import formProvider from '@ohos.app.form.formProvider';
+ import dataStorage from '@ohos.data.storage';
+ ```
+
+2. Implement the widget lifecycle callbacks in **form.ts**.
+
+ ```ts
+ export default {
+ onCreate(want) {
+ console.info('FormAbility onCreate');
+ // Called when the widget is created. The widget provider should return the widget data binding class.
+ let obj = {
+ "title": "titleOnCreate",
+ "detail": "detailOnCreate"
+ };
+ let formData = formBindingData.createFormBindingData(obj);
+ return formData;
+ },
+ onCastToNormal(formId) {
+ // Called when the widget host converts the temporary widget into a normal one. The widget provider should do something to respond to the conversion.
+ console.info('FormAbility onCastToNormal');
+ },
+ onUpdate(formId) {
+ // Override this method to support scheduled updates, periodic updates, or updates requested by the widget host.
+ console.info('FormAbility onUpdate');
+ let obj = {
+ "title": "titleOnUpdate",
+ "detail": "detailOnUpdate"
+ };
+ let formData = formBindingData.createFormBindingData(obj);
+ formProvider.updateForm(formId, formData).catch((error) => {
+ console.info('FormAbility updateForm, error:' + JSON.stringify(error));
+ });
+ },
+ onVisibilityChange(newStatus) {
+ // Called when the widget host initiates an event about visibility changes. The widget provider should do something to respond to the notification. This callback takes effect only for system applications.
+ console.info('FormAbility onVisibilityChange');
+ },
+ onEvent(formId, message) {
+ // If the widget supports event triggering, override this method and implement the trigger.
+ console.info('FormAbility onEvent');
+ },
+ onDestroy(formId) {
+ // Delete widget data.
+ console.info('FormAbility onDestroy');
+ },
+ onAcquireFormState(want) {
+ console.info('FormAbility onAcquireFormState');
+ return formInfo.FormState.READY;
+ },
+ }
+ ```
+
+> **NOTE**
+>
+> FormAbility cannot reside in the background. Therefore, continuous tasks cannot be processed in the widget lifecycle callbacks.
+
+### Configuring the Widget Configuration File
+
+The widget configuration file is named **config.json**. Find the **config.json** file for the widget and edit the file depending on your need.
+
+- The **js** module in the **config.json** file provides JavaScript resources of the widget. The internal structure is described as follows:
+ | Name| Description| Data Type| Initial Value Allowed|
+ | -------- | -------- | -------- | -------- |
+ | name | Name of a JavaScript component. The default value is **default**.| String| No|
+ | pages | Route information about all pages in the JavaScript component, including the page path and page name. The value is an array, in which each element represents a page. The first element in the array represents the home page of the JavaScript FA.| Array| No|
+ | window | Window-related configurations.| Object| Yes|
+ | type | Type of the JavaScript component. The value can be: