diff --git a/.gitattributes b/.gitattributes
index 51c63e295e0232f7095a8ee8e03713837e37f419..e723e1197d0db7c523e27d00cc64d13e847318fb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -13,3 +13,6 @@
*.so filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
+OpenHarmony_Icons.zip filter=lfs diff=lfs merge=lfs -text
+zip filter=lfs diff=lfs merge=lfs -text
+figures/OpenHarmony_Icons.zip filter=lfs diff=lfs merge=lfs -text
diff --git a/en/application-dev/application-models/access-dataability.md b/en/application-dev/application-models/access-dataability.md
index 24dc9305f194a61c974c63db224f2e7727689f5f..b32d38354e7e67fb8757c022fc6e65c737bb297e 100644
--- a/en/application-dev/application-models/access-dataability.md
+++ b/en/application-dev/application-models/access-dataability.md
@@ -11,7 +11,7 @@ The basic dependency packages include:
- @ohos.data.dataAbility
-- @ohos.data.rdb
+- @ohos.data.relationalStore
The sample code for accessing a DataAbility is as follows:
@@ -23,7 +23,7 @@ The sample code for accessing a DataAbility is as follows:
// 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'
+ import relationalStore from '@ohos.data.relationalStore'
let urivar = "dataability:///com.ix.DataAbility"
let DAHelper = featureAbility.acquireDataAbilityHelper(urivar);
diff --git a/en/application-dev/application-models/accessibilityextensionability.md b/en/application-dev/application-models/accessibilityextensionability.md
index c14b4b95921f8adef52c83b20253d26b774b16fa..42968456fe88c836e5befe9c096eb2f3892729e1 100644
--- a/en/application-dev/application-models/accessibilityextensionability.md
+++ b/en/application-dev/application-models/accessibilityextensionability.md
@@ -1,4 +1,4 @@
-# AccessibilityExtensionAbility Development
+# AccessibilityExtensionAbility
The **AccessibilityExtensionAbility** module provides accessibility extension capabilities based on the **ExtensionAbility** framework. You can develop your accessibility applications by applying the **AccessibilityExtensionAbility** template to enhance usability.
@@ -10,14 +10,6 @@ The **AccessibilityExtensionAbility** module provides accessibility extension ca
>
> Model: stage
-This document is organized as follows:
-
-- [AccessibilityExtensionAbility Overview](#accessibilityextensionability-overview)
-- [Creating an Accessibility Extension Service](#creating-an-accessibility-extension-service)
-- [Processing an Accessibility Event](#processing-an-accessibility-event)
-- [Declaring Capabilities of Accessibility Extension Services](#declaring-capabilities-of-accessibility-extension-services)
-- [Enabling a Custom Accessibility Extension Service](#enabling-a-custom-accessibility-extension-service)
-
## AccessibilityExtensionAbility Overview
Accessibility is about giving equal access to everyone so that they can access and use information equally and conveniently under any circumstances. It helps narrow the digital divide between people of different classes, regions, ages, and health status in terms of information understanding, information exchange, and information utilization, so that they can participate in social life more conveniently and enjoy the benefits of technological advances.
diff --git a/en/application-dev/application-models/application-context-fa.md b/en/application-dev/application-models/application-context-fa.md
index 9f68b42a873782c9fd1693c73724354cbf347ced..7d39fb17878bb8f261eded88ae82faaff6ecd5dd 100644
--- a/en/application-dev/application-models/application-context-fa.md
+++ b/en/application-dev/application-models/application-context-fa.md
@@ -48,13 +48,13 @@ For details about the APIs, see [API Reference](../reference/apis/js-apis-inner-
```ts
import featureAbility from '@ohos.ability.featureAbility'
- import bundle from '@ohos.bundle';
+ import bundleManager from '@ohos.bundle.bundleManager';
export default {
onCreate() {
// Obtain the context and call related APIs.
let context = featureAbility.getContext();
- context.setDisplayOrientation(bundle.DisplayOrientation.LANDSCAPE).then(() => {
+ context.setDisplayOrientation(bundleManager.DisplayOrientation.LANDSCAPE).then(() => {
console.info("Set display orientation.")
})
console.info('Application onCreate')
diff --git a/en/application-dev/application-models/application-context-stage.md b/en/application-dev/application-models/application-context-stage.md
index 2063eee286c25e360a1700d3e1771d865b875f1c..8c26d7fbb70a19db0ab07ada99f4df8cc0b290df 100644
--- a/en/application-dev/application-models/application-context-stage.md
+++ b/en/application-dev/application-models/application-context-stage.md
@@ -1,16 +1,19 @@
# Context (Stage Model)
+
## Overview
-[Context](../reference/apis/js-apis-inner-application-context.md) is the context of an object in an application. It provides basic information about the application, for example, **resourceManager**, **applicationInfo**, **dir** (application development path), and **area** (encrypted level). It also provides basic methods such as **createBundleContext()** and **getApplicationContext()**. The UIAbility component and ExtensionAbility derived class components have their own **Context** classes, for example, the base class **Context**, **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, **ExtensionContext**, and **ServiceExtensionContext**.
+[Context](../reference/apis/js-apis-inner-application-context.md) is the context of an object in an application. It provides basic information about the application, for example, **resourceManager**, **applicationInfo**, **dir** (application file path), and **area** (encryption level). It also provides basic methods such as **createBundleContext()** and **getApplicationContext()**. The UIAbility component and ExtensionAbility derived class components have their own **Context** classes, for example, the base class **Context**, **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, **ExtensionContext**, and **ServiceExtensionContext**.
+
+- The figure below illustrates the inheritance relationship of contexts.
-- The figure below illustrates the inheritance relationship of contexts.

-- The figure below illustrates the holding relationship of contexts.
- 
+- The figure below illustrates the holding relationship of contexts.
-The following describes the information provided by different 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 an application component, obtain the application component configuration, and more.
```ts
@@ -67,79 +70,81 @@ The following describes the information provided by different contexts.
This topic describes how to use the context in the following scenarios:
-- [Obtaining the Application Development Path](#obtaining-the-application-development-path)
+- [Obtaining Application File Paths](#obtaining-application-file-paths)
- [Obtaining and Modifying Encryption Levels](#obtaining-and-modifying-encryption-levels)
- [Creating Context of Another Application or Module](#creating-context-of-another-application-or-module)
- [Subscribing to UIAbility Lifecycle Changes in a Process](#subscribing-to-uiability-lifecycle-changes-in-a-process)
-### Obtaining the Application Development Path
+### Obtaining Application File Paths
-The following table describes the application development paths obtained from context.
+The base class [Context](../reference/apis/js-apis-inner-application-context.md) provides the capability of obtaining application file paths. **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext** inherit this capability. The application file paths are a type of application sandbox paths. For details, see [Application Sandbox Directory](../file-management/app-sandbox-directory.md).
-**Table 1** Application development paths
+The application file paths obtained by the preceding contexts are different.
-| Name| Type| Readable| Writable| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| bundleCodeDir | string | Yes | No | Path for storing the application's installation package, that is, installation directory of the application on the internal storage. |
-| cacheDir | string | Yes| No| Path for storing the cache files, that is, cache directory of the application on the internal storage.
It is the content of **Storage** of an application under **Settings > Apps & services > Apps**.|
-| filesDir | string | Yes | No | Path for storing the common files, that is, file directory of the application on the internal storage.
Files in this directory may be synchronized to other directories during application migration or backup.|
-| preferencesDir | string | Yes | Yes | Path for storing the preference files, that is, preferences directory of the application. |
-| tempDir | string | Yes | No | Path for storing the temporary files.
Files in this directory are deleted after the application is uninstalled.|
-| databaseDir | string | Yes | No | Path for storing the application's database, that is, storage directory of the local database. |
-| distributedFilesDir | string | Yes| No| Path for storing the distributed files.|
+- The application file path obtained through **ApplicationContext** is at the application level. This path is recommended for storing global application information, and the files in the path will be deleted when the application is uninstalled.
-The capability of obtaining the application development path is provided by the base class **Context**. This capability is also provided by **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext**. However, the paths obtained from different contexts may differ, as shown below.
-
-**Figure 1** Application development paths obtained from context
-
-
-
-- 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|
+ | 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}**/|
+ | bundleCodeDir | /el1/bundle/|
+ | cacheDir | //base/cache/|
+ | filesDir | //base/files/|
+ | preferencesDir | //base/preferences/|
+ | tempDir | //base/temp/|
+ | databaseDir | //database/|
+ | distributedFilesDir | /el2/distributedFiles/|
+
+ The sample code is as follows:
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+
+ export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ let applicationContext = this.context.getApplicationContext();
+ let cacheDir = applicationContext.cacheDir;
+ let tempDir = applicationContext.tempDir;
+ let filesDir = applicationContext.filesDir;
+ let databaseDir = applicationContext.databaseDir;
+ let bundleCodeDir = applicationContext.bundleCodeDir;
+ let distributedFilesDir = applicationContext.distributedFilesDir;
+ let preferencesDir = applicationContext.preferencesDir;
+ ...
+ }
+ }
+ ```
-The sample code for obtaining the application development paths is as follows:
+- The application file path obtained through **AbilityStageContext**, **UIAbilityContext**, or **ExtensionContext** is at the HAP level. This path is recommended for storing HAP-related information, and the files in this path are deleted when the HAP is uninstalled. However, the deletion does not affect the files in the application-level path unless all HAPs of the application are uninstalled.
+ | Name| Path|
+ | -------- | -------- |
+ | bundleCodeDir | /el1/bundle/|
+ | cacheDir | //base/**haps/\**/cache/|
+ | filesDir | //base/**haps/\**/files/|
+ | preferencesDir | //base/**haps/\**/preferences/|
+ | tempDir | //base/**haps/\**/temp/|
+ | databaseDir | //database/**\**/|
+ | distributedFilesDir | /el2/distributedFiles/**\**/|
-```ts
-import UIAbility from '@ohos.app.ability.UIAbility';
+ The sample code is as follows:
-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;
- ...
+ ```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;
+ ...
+ }
}
-}
-```
+ ```
-> **NOTE**
->
-> The sample code obtains the sandbox path of the application development path. The absolute path can be obtained by running the **find / -name ** command in the hdc shell after file creation or modification.
### Obtaining and Modifying Encryption Levels
@@ -153,22 +158,23 @@ In practice, you need to select a proper encryption level based on scenario-spec
>
> - AreaMode.EL2: user-level encryption. Directories with this encryption level are accessible only after the device is powered on and the password is entered (for the first time).
-You can obtain and set the encryption level by reading and writing the [area attribute in Context](../reference/apis/js-apis-inner-application-context.md).
+You can obtain and set the encryption level by reading and writing the **area** attribute in [Context](../reference/apis/js-apis-inner-application-context.md).
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
+import contextConstant from '@ohos.app.ability.contextConstant';
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.
+ if (this.context.area === contextConstant.AreaMode.EL2) { // Obtain the area.
+ this.context.area = contextConstant.AreaMode.EL1; // 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.
+ if (this.context.area === contextConstant.AreaMode.EL1) { // Obtain the area.
+ this.context.area = contextConstant.AreaMode.EL2; // Modify the area.
}
// Store sensitive information.
}
@@ -178,7 +184,7 @@ export default class EntryAbility extends UIAbility {
### Creating Context of Another Application or Module
-The base class **Context** provides [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) to create 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.
+The base class **Context** provides [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) to create the context of other applications or modules, so as to obtain the resource information, for example, [obtaining application file paths](#obtaining-application-development-paths) of other modules.
- Call **createBundleContext(bundleName:string)** to create the context of another application.
> **NOTE**
@@ -188,9 +194,9 @@ The base class **Context** provides [createBundleContext(bundleName:string)](../
> - Request the **ohos.permission.GET_BUNDLE_INFO_PRIVILEGED** permission. For details, see [Declaring Permissions in the Configuration File](../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';
@@ -203,7 +209,7 @@ The base class **Context** provides [createBundleContext(bundleName:string)](../
}
}
```
-
+
- 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**
>
diff --git a/en/application-dev/application-models/arkts-ui-widget-working-principles.md b/en/application-dev/application-models/arkts-ui-widget-working-principles.md
index a0edb6c6c68d9ada32cd3ff34f5117d5cc012ed6..b1b09dc409380da8e530f571b2e5711ec63edd10 100644
--- a/en/application-dev/application-models/arkts-ui-widget-working-principles.md
+++ b/en/application-dev/application-models/arkts-ui-widget-working-principles.md
@@ -3,42 +3,45 @@
## Implementation Principles
- **Figure 1** ArkTS widget implementation principles
+**Figure 1** ArkTS widget implementation principles
+

- Widget host: an application that displays the widget content and controls the widget location. Only the system application can function as a widget host.
- Widget provider: an application that provides the widget content to display and controls how widget components are laid out and how they interact with users.
-- Widget Manager: a resident agent that manages widgets in the system. It provides the [formProvider](../reference/apis/js-apis-app-form-formProvider.md) and [formHost](../reference/apis/js-apis-app-form-formHost.md) APIs as well as widget management, usage, and periodic updates.
+- Widget Manager: a resident agent that manages widgets in the system. It provides the [formProvider](../reference/apis/js-apis-app-form-formProvider.md) and [formHost](../reference/apis/js-apis-app-form-formHost.md) APIs as well as the APIs for widget management, usage, and periodic updates.
- Widget rendering service: a service that manages widget rendering instances. Widget rendering instances are bound to the [widget components](../reference/arkui-ts/ts-basic-components-formcomponent.md) on the widget host on a one-to-one basis. The widget rendering service runs the widget page code **widgets.abc** for rendering, and sends the rendered data to the corresponding widget component on the widget host.
**Figure 2** Working principles of the ArkTS widget rendering service

-Unlike JS widgets, ArkTS widgets support logic code running. To avoid potential ArkTS widget issues from affecting the use of applications, the widget page code **widgets.abc** is executed by the widget rendering service, which is managed by the Widget Manager. Each widget component of a widget host corresponds to a rendering instance in the widget rendering service. Rendering instances of an application provider run in the same virtual machine operating environment, and rendering instances of different application providers run in different virtual machine operating environments. In this way, the resources and state data are isolated between widgets of different application providers. During development, pay attention to the use of the [globalThis](uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) object. Use one **globalThis** object for widgets by the same application provider, and different **globalThis** objects for widgets by different application providers.
+Unlike JS widgets, ArkTS widgets support logic code running. The widget page code **widgets.abc** is executed by the widget rendering service, which is managed by the Widget Manager. Each widget component of a widget host corresponds to a rendering instance in the widget rendering service. Rendering instances of a widget provider run in the same virtual machine operating environment, and rendering instances of different widget providers run in different virtual machine operating environments. In this way, the resources and state data are isolated between widgets of different widget providers. During development, pay attention to the use of the [globalThis](uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) object. Use one **globalThis** object for widgets from the same widget provider, and different **globalThis** objects for widgets from different widget providers.
## Advantages of ArkTS Widgets
-As a quick entry to applications, ArkTS widgets have the following advantages over JS widgets:
+As a quick entry to applications, ArkTS widgets outperform JS widgets in the following aspects:
- Improved development experience and efficiency, thanks to the unified development paradigm
+
ArkTS widgets share the same declarative UI development framework as application pages. This means that the page layouts can be directly reused in widgets, improving development experience and efficiency.
-
- **Figure 3** Comparison of widget project structures
+
+ **Figure 3** Comparison of widget project structures
+

-
+
- More widget features
- - Animation: The ArkTS widget supports the [attribute animation](../reference/arkui-ts/ts-animatorproperty.md) and [explicit animation](../reference/arkui-ts/ts-explicit-animation.md) capabilities, which can be leveraged to deliver a more engaging experience.
- - Custom drawing: The ArkTS widget allows you to draw graphics with the [Canvas](../reference/arkui-ts/ts-components-canvas-canvas.md) component to present information more vividly.
- - Logic code execution: The capability to run logic code in widgets means that service logic can be self-closed in widgets, expanding the service application scenarios of widgets.
+ - Animation: ArkTS widgets support the [attribute animation](../reference/arkui-ts/ts-animatorproperty.md) and [explicit animation](../reference/arkui-ts/ts-explicit-animation.md) capabilities, which can be leveraged to deliver a more engaging experience.
+ - Custom drawing: ArkTS widgets allow you to draw graphics with the [\