diff --git a/README_zh.md b/README_zh.md
index 27ad5abed9665603e2bf925f5e59b5dcf221f658..b0ec331ced4a7496ab9d861007667b804bc19ed1 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -18,7 +18,7 @@
master:最新开发版本。
-发布OpenHarmony 3.1 Beta版本,[了解版本详情](zh-cn/release-notes/OpenHarmony-v3.1-beta.md)。
+发布OpenHarmony 3.1 Release版本,[了解版本详情](zh-cn/release-notes/OpenHarmony-v3.1-release.md)。
发布OpenHarmony 3.0 LTS版本,[了解版本详情](zh-cn/release-notes/OpenHarmony-v3.0-LTS.md)。该版本已更新至OpenHarmony 3.0.2 LTS,[了解版本详情](zh-cn/release-notes/OpenHarmony-v3.0.2-LTS.md)。
diff --git a/en/application-dev/ability/Readme-EN.md b/en/application-dev/ability/Readme-EN.md
index e0fb613133dd0854672bc5e27f44dbc63d9061ca..8be4858131c0b947639fdeed77bf4f99b3dfb10c 100644
--- a/en/application-dev/ability/Readme-EN.md
+++ b/en/application-dev/ability/Readme-EN.md
@@ -1,10 +1,9 @@
# Ability Development
- - [Ability Framework Overview](ability-brief.md)
- - FA Model
- - [FA Model Overview](fa-brief.md)
- - [Page Ability Development](fa-pageability.md)
- - [Service Ability Development](fa-serviceability.md)
- - [Data Ability Development](fa-dataability.md)
- - [FA Widget Development](fa-formability.md)
+- [FA Model Overview](fa-brief.md)
+- [Page Ability Development](fa-pageability.md)
+- [Service Ability Development](fa-serviceability.md)
+- [Data Ability Development](fa-dataability.md)
+- [FA Widget Development](fa-formability.md)
+
- Other
- [Ability Assistant Usage](ability-assistant-guidelines.md)
diff --git a/en/application-dev/ability/ability-brief.md b/en/application-dev/ability/ability-brief.md
deleted file mode 100644
index c923f428b579b94ed3745b711341c77ce8f870eb..0000000000000000000000000000000000000000
--- a/en/application-dev/ability/ability-brief.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Ability Framework Overview
-
-An ability is an abstraction of a functionality that an application can provide. It is the minimum unit for the system to schedule applications. An application can contain one or more **Ability** instances.
-
-The ability framework model has two forms. The first form is the FA model, which applies to application development using API 8 and earlier versions. In the FA model, there are Feature Ability (FA) and Particle Ability (PA). The FA supports Page abilities, and the PA supports Service and Data abilities. The stage model is introduced since API 9. In the stage model, there are Page abilities and Extension abilities. The Extension ability is further extended to Service Extension, Form Extension, Data Share Extension, and more.
-
-The stage model is designed to make complex application development easier in a distributed environment. The two models have differences in the following aspects:
-
-* Ability type and API usage
-
- 
-
-* Ability lifecycle
-
- 
-
-* Application configuration files and application package structure (The differences are reflected in the application packages generated by the IDE.)
-
-For details about the two models, see [FA Model Overview](fa-brief.md) and [Stage Model Overview](stage-brief.md).
diff --git a/en/application-dev/ability/ability-continuation.md b/en/application-dev/ability/ability-continuation.md
deleted file mode 100644
index 57a4de48b4f7bbd7c745a94da0048d746a9eeab1..0000000000000000000000000000000000000000
--- a/en/application-dev/ability/ability-continuation.md
+++ /dev/null
@@ -1,173 +0,0 @@
-# Ability Continuation Development
-
-## When to Use
-
-With ability continuation APIs, you can migrate the current application task, including some page data and stack information, to a remote device. If the migration is successful, the local task will be cleared. If the migration fails, the local task can be migrated again.
-
-
-
-## Available APIs
-
-The following table lists the API used for ability continuation. For details about the API, see the interface document.
-
-**Table 1** Ability continuation API
-
-|API| Description|
-|:------ | :------|
-| onContinue(wantParams : {[key: string]: any}) | A callback used to store the data required for migration and indicate whether the migration is accepted. The value **true** means that the migration is accepted, and **false** means the opposite.|
-
-
-
-## How to Develop
-
-### Migrating an Ability
-
-
-
-1. Configure data.
-
- - Configure the ability to support migration.
-
- Set the **continuable** field in the **config.json** file to **true**, which indicates that migration is supported. The default value is **false**.
-
- ```
- "continuable": true
- ```
-
- Abilities with the **continuable** field set to **false** cannot be migrated.
-
- * Configure the ability startup type.
-
- Currently, only multi-instance abilities can be migrated. Therefore, you must set the **launchType** field in the **config.json** file to **standard**.
-
- ```
- "launchType": "standard"
- ```
-
-
-
-2. Implement the **onContinue** API.
-
- Modules to Import
-
- ```
- import Ability from '@ohos.application.Ability';
- ```
-
- - To implement migration, you must implement this API and have the value **true** returned.
-
-
- - Example
-
- ```javascript
- onContinue(wantParams : {[key: string]: any}) {
- console.log("MainAbility onContinue")
- return true;
- }
- ```
-
-
-
-3. Implement the migration logic in the **onCreate** API.
-
- - On the remote device, determine whether the startup is **LaunchReason.CONTINUATION** (3) based on **launchReason** in **onCreate**.
-
-
- - After data restore is complete, call **restoreWindowStage** to trigger page restoration.
-
-
- * Example
-
- ```javascript
- onCreate(want , launchParam) {
- // The ability is being created. Initialize resources for this ability.
- console.log("MainAbility onCreate", launchParam.launchReason);
- if (launchParam.launchReason == LaunchReason.CONTINUATION) {
- this.contentStorage = new ContenStorage();
- this.context.restoreWindowStage(this.contentStorage);
- }
- }
-
- ```
-
-
-
-### Migrating Data
-
-1. Use custom data.
-
- - You can fill custom data in the key-value format in the **wantParams** parameter, through which the data will be transferred to the remote device. The **key** type is string, and therefore it is used to carry simple and lightweight data.
-
-
- ```javascript
- onContinue(wantParams : {[key: string]: any}) {
- console.log("Continue My Data")
- wantParams["myData"] = "my1234567";
- return true;
- }
- ```
-
- - If the remote device detects a migration, it obtains the custom data saved at the initiator from **want.parameters**.
-
- ```javascript
- onCreate(want , launchParam) {
- if (launchParam.launchReason == LaunchReason.CONTINUATION) {
- console.log("onCreate LaunchReason = CONTINUATION",want.parameters["myData"]); // my1234567
- ...
- this.context.restoreWindowStage(this.contentStorage);
- }
- }
-
- ```
-
-
-
-2. Use distributed objects.
-
- You can use distributed objects to transfer more data to a remote device. For details, see the distributed object interface document.
-
- - In **onContinue**, the initiator saves the data to be migrated to the distributed object, sets the session ID, and sends the session ID to the remote device through **wantParams**.
-
-
- - The remote device obtains the session ID from **onCreate**, creates a distributed object, and associates the distributed object with the session ID. In this way, the distributed object can be synchronized. Before calling **restoreWindowStage**, ensure that all distributed objects required for migration have been associated for correct data retrieval.
-
-
- * Example
-
- ```javascript
- import Ability from '@ohos.application.Ability';
- import distributedObject from '@ohos.data.distributedDataObject';
-
- var g_object = distributedObject.createDistributedObject({name:undefined});
-
- export default class MainAbility extends Ability {
- contentStorage : ContenStorage
- sessionId : string;
- onCreate(want , launchParam) {
- if (launchParam.launchReason == 3) {
- this.sessionId = want.parameters["session"] // Obtain the session ID.
-
- function statusCallback(sessionId, networkid, status) {
- console.info("object status change sessionId: " + sessionId + " status: " + status +
- "g_object.name: " + g_object.name); // The synchronized distributed object content "name = Amy" can be obtained from the callback.
- }
- g_object.on("status", statusCallback); // Register a callback to listen for the distributed object synchronization result.
-
- g_object.setSessionId(this.sessionId); // Associate the local distributed object with the session ID of the initiator.
-
- this.contentStorage = new ContenStorage();
- this.context.restoreWindowStage(this.contentStorage);
- }
- }
-
- onContinue(wantParams : {[key: string]: any}) {
- console.log("using distributedObject")
- this.sessionId = "654321";
- g_object.setSessionId(this.sessionId); // Set the session ID of the distributed object.
- g_object.name = "Amy"; // Fill data.
- wantParams["session"] = this.sessionId; // Send the session ID to the remote device through the want object.
- return true;
- }
- ```
-
-
diff --git a/en/application-dev/ability/figures/favsstage.png b/en/application-dev/ability/figures/favsstage.png
deleted file mode 100644
index 45f6b0ef255b01730dc42023430391e1141291c2..0000000000000000000000000000000000000000
Binary files a/en/application-dev/ability/figures/favsstage.png and /dev/null differ
diff --git a/en/application-dev/ability/figures/lifecycle.png b/en/application-dev/ability/figures/lifecycle.png
deleted file mode 100644
index 694238d99c7e70d16d6bd1a37c86bcd599a9b2f3..0000000000000000000000000000000000000000
Binary files a/en/application-dev/ability/figures/lifecycle.png and /dev/null differ
diff --git a/en/application-dev/application-dev-guide.md b/en/application-dev/application-dev-guide.md
index df0b9f869d373543e436d3c0c2ee131627b9fdfd..a75e8a98756df5d76400d52724e64a2e7f6c5c7b 100644
--- a/en/application-dev/application-dev-guide.md
+++ b/en/application-dev/application-dev-guide.md
@@ -2,9 +2,9 @@
The application development documents provide reference for you to develop applications using the APIs provided by OpenHarmony. The documents provided walk you through how to use JavaScript \(JS\) APIs to develop applications on the standard system.
-To get a glimpse of the basic methods for developing applications, see [Basics](quick-start/Readme-EN.md). For details about the API list and references, see [Reference](reference/Readme-EN.md).
+To get a glimpse of the basic methods for developing applications, see [Basics](quick-start/start-overview.md). For details about the API list and references, see [Reference](reference/apis/js-apis-featureAbility.md).
-To better understand frequently used modules, see the development guidelines for [UI](ui/Readme-EN.md), [Media](media/Readme-EN.md), and [Connectivity](connectivity/Readme-EN.md).
+To better understand frequently used modules, see the development guidelines for [Ability](ability/fa-brief.md), [UI](ui/arkui-overview.md), [Media](media/Readme-EN.md), etc.
For details about the principles and basic information of each subsystem, see the README file in **docs/en/readme**.
diff --git a/en/application-dev/application-dev-website.md b/en/application-dev/application-dev-website.md
index f2367108230f24f71b60d0570855d9c251fb5b7f..fd812ea600eecbea31a52b9e3e069edea818a952 100644
--- a/en/application-dev/application-dev-website.md
+++ b/en/application-dev/application-dev-website.md
@@ -1,20 +1,11 @@
+# Application Development
+
- [Application Development Overview](application-dev-guide.md)
- Quick Start
- - Getting Started with Application Development
- - DevEco Studio (OpenHarmony) User Guide
- - [Overview](quick-start/deveco-studio-overview.md)
- - [Version Change History](quick-start/deveco-studio-release-notes.md)
- - [Configuring the OpenHarmony SDK](quick-start/configuring-openharmony-sdk.md)
- - Creating an OpenHarmony Project
- - [Using the Project Wizard to Create a Project](quick-start/use-wizard-to-create-project.md)
- - [Importing a Sample to Create a Project](quick-start/import-sample-to-create-project.md)
- - [Configuring the OpenHarmony App Signature](quick-start/configuring-openharmony-app-signature.md)
- - [Installing and Running Your OpenHarmony App](quick-start/installing-openharmony-app.md)
- [Directory Structure](quick-start/package-structure.md)
- [Resource File Categories](quick-start/basic-resource-file-categories.md)
- Development
- - [Ability Development](ability/Readme-EN.md)
- - [Ability Framework Overview](ability/ability-brief.md)
+ - Ability Development
- FA Model
- [FA Model Overview](ability/fa-brief.md)
- [Page Ability Development](ability/fa-pageability.md)
@@ -24,7 +15,7 @@
- Other
- [Ability Assistant Usage](ability/ability-assistant-guidelines.md)
- - [UI]](ui/Readme-EN.md)
+ - UI
- JavaScript-based Web-Like Development Paradigm
- [Overview](ui/ui-js-overview.md)
- Framework
@@ -58,16 +49,17 @@
- [Stepper](ui/ui-js-components-stepper.md)
- [Tabs](ui/ui-js-component-tabs.md)
- Basic Components
- - [Text](ui/ui-js-components-text.md)
- - [Input](ui/ui-js-components-input.md)
- - [Button](ui/ui-js-components-button.md)
- - [Picker](ui/ui-js-components-picker.md)
- - [Image](ui/ui-js-components-images.md)
+ - [Text](ui/ui-js-components-text.md)
+ - [Input](ui/ui-js-components-input.md)
+ - [Button](ui/ui-js-components-button.md)
+ - [Picker](ui/ui-js-components-picker.md)
+ - [Image](ui/ui-js-components-images.md)
- Animation Development Guidelines
- CSS Animation
- [Defining Attribute Style Animations](ui/ui-js-animate-attribute-style.md)
- [Defining Animations with the transform Attribute](ui/ui-js-animate-transform.md)
- [Defining Animations with the background-position Attribute](ui/ui-js-animate-background-position-style.md)
+ - [Defining Animations for SVG Components](ui/ui-js-animate-svg.md)
- JS Animation
- [Component Animation](ui/ui-js-animate-component.md)
- Interpolator Animation
@@ -82,6 +74,8 @@
- [Rules for Accessing Application Code Files](ui/ts-framework-file-access-rules.md)
- ["js" Tag](ui/ts-framework-js-tag.md)
- Resource Access
+ - [Accessing Application Resources](ui/ts-application-resource-access.md)
+ - [Accessing System Resources](ui/ts-system-resource-access.md)
- [Media Resource Types](ui/ts-media-resource-type.md)
- [Pixel Units](ui/ts-pixel-units.md)
- [Types](ui/ts-types.md)
@@ -153,12 +147,11 @@
- Audio
- [Audio Overview](media/audio-overview.md)
- [Audio Playback Development](media/audio-playback.md)
- - [Audio Playback Development Using AudioRenderer](media/audio-renderer.md)
+ - [Audio Rendering Development](media/audio-renderer.md)
- [Audio Recording Development](media/audio-recorder.md)
- - [Audio Recorder Development Using AudioCapturer](media/audio-capturer)
+ - [Audio Capture Development](media/audio-capturer.md)
- Video
- [Video Playback Development](media/video-playback.md)
- - [Video Recording Development](media/video-recorder.md)
- Image
- [Image Development](media/image.md)
- Security
@@ -199,6 +192,9 @@
- Sensor
- [Sensor Overview](device/sensor-overview.md)
- [Sensor Development](device/sensor-guidelines.md)
+ - Vibrator
+ - [Vibrator Overview](device/vibrator-overview.md)
+ - [Vibrator Development](device/vibrator-guidelines.md)
- Device Usage Statistics
- [Device Usage Statistics Overview](device-usage-statistics/device-usage-statistics-overview.md)
- [Device Usage Statistics Development](device-usage-statistics/device-usage-statistics-dev-guide.md)
@@ -212,14 +208,12 @@
- Distributed Call Chain Tracing
- [Overview of Distributed Call Chain Tracing](dfx/hitracechain-overview.md)
- [Development of Distributed Call Chain Tracing](dfx/hitracechain-guidelines.md)
+ - Internationalization
+ - [Overview](internationalization/international-overview.md)
+ - [Internationalization Development (intl)](internationalization/intl-guidelines.md)
+ - [Internationalization Development (i18n)](internationalization/i18n-guidelines.md)
- Tools
- - DevEco Studio (OpenHarmony) User Guide
- - [Overview](quick-start/deveco-studio-overview.md)
- - [Version Change History](quick-start/deveco-studio-release-notes.md)
- - [Configuring the OpenHarmony SDK](quick-start/configuring-openharmony-sdk.md)
- - [Creating an OpenHarmony Project](quick-start/create-openharmony-project.md)
- - [Configuring the OpenHarmony App Signature](quick-start/configuring-openharmony-app-signature.md)
- - [Installing and Running Your OpenHarmony App](quick-start/installing-openharmony-app.md)
+ - [DevEco Studio (OpenHarmony) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md)
- Hands-On Tutorials
- [Samples](https://gitee.com/openharmony/app_samples/blob/master/README.md)
- API References
@@ -322,8 +316,7 @@
- [Event Parameter](reference/arkui-js/js-components-custom-event-parameter.md)
- [slot](reference/arkui-js/js-components-custom-slot.md)
- [Lifecycle Definition](reference/arkui-js/js-components-custom-lifecycle.md)
- - Appendix
- - [Type Attributes](reference/arkui-js/js-appendix-types.md)
+ - [Type Attributes](reference/arkui-js/js-appendix-types.md)
- Compent Reference (TypeScript-based Declarative Development Paradigm)
- Components
- Universal Components
@@ -335,7 +328,7 @@
- [Key Event](reference/arkui-ts/ts-universal-events-key.md)
- [Focus Event](reference/arkui-ts/ts-universal-focus-event.md)
- [Mouse Event](reference/arkui-ts/ts-universal-mouse-key.md)
- - [Component Area Change Event](reference/arkui-ts/ts-universal-events-component-area-change.md)
+ - [Component Area Change Event](reference/arkui-ts/ts-universal-component-area-change-event.md)
- Universal Attributes
- [Size](reference/arkui-ts/ts-universal-attributes-size.md)
- [Location](reference/arkui-ts/ts-universal-attributes-location.md)
@@ -380,24 +373,36 @@
- [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.md)
- [DatePicker](reference/arkui-ts/ts-basic-components-datepicker.md)
- [Divider](reference/arkui-ts/ts-basic-components-divider.md)
+ - [Gauge](reference/arkui-ts/ts-basic-components-gauge.md)
- [Image](reference/arkui-ts/ts-basic-components-image.md)
- [ImageAnimator](reference/arkui-ts/ts-basic-components-imageanimator.md)
- [LoadingProgress](reference/arkui-ts/ts-basic-components-loadingprogress.md)
- [Marquee](reference/arkui-ts/ts-basic-components-marquee.md)
+ - [Navigation](reference/arkui-ts/ts-basic-components-navigation.md)
+ - [PatternLock](reference/arkui-ts/ts-basic-components-patternlock.md)
+ - [PluginComponent](reference/arkui-ts/ts-basic-components-plugincomponent.md)
- [Progress](reference/arkui-ts/ts-basic-components-progress.md)
- [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
- [Radio](reference/arkui-ts/ts-basic-components-radio.md)
- [Rating](reference/arkui-ts/ts-basic-components-rating.md)
+ - [RichText](reference/arkui-ts/ts-basic-components-richtext.md)
+ - [ScrollBar](reference/arkui-ts/ts-basic-components-scrollbar.md)
+ - [Search](reference/arkui-ts/ts-basic-components-search.md)
- [Select](reference/arkui-ts/ts-basic-components-select.md)
- [Slider](reference/arkui-ts/ts-basic-components-slider.md)
- [Span](reference/arkui-ts/ts-basic-components-span.md)
+ - [Stepper](reference/arkui-ts/ts-basic-components-stepper.md)
+ - [StepperItem](reference/arkui-ts/ts-basic-components-stepperitem.md)
- [Text](reference/arkui-ts/ts-basic-components-text.md)
- [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
+ - [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
+ - [TextPicker](reference/arkui-ts/ts-basic-components-textpicker.md)
- [TextTimer](reference/arkui-ts/ts-basic-components-texttimer.md)
+ - [TimePicker](reference/arkui-ts/ts-basic-components-timepicker.md)
- [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
- - [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- [Web](reference/arkui-ts/ts-basic-components-web.md)
+ - [Xcomponent](reference/arkui-ts/ts-basic-components-xcomponent.md)
- Container Components
- [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
- [Badge](reference/arkui-ts/ts-container-badge.md)
@@ -410,19 +415,17 @@
- [GridItem](reference/arkui-ts/ts-container-griditem.md)
- [List](reference/arkui-ts/ts-container-list.md)
- [ListItem](reference/arkui-ts/ts-container-listitem.md)
- - [Navigator](reference/arkui-ts/ts-container-navigator.md)
- - [Navigation](reference/arkui-ts/ts-container-navigation.md)
+ - [Navigator](reference/arkui-ts/ts-container-navigator.md)
- [Panel](reference/arkui-ts/ts-container-panel.md)
+ - [Refresh](reference/arkui-ts/ts-container-refresh.md)
- [Row](reference/arkui-ts/ts-container-row.md)
- [RowSplit](reference/arkui-ts/ts-container-rowsplit.md)
- [Scroll](reference/arkui-ts/ts-container-scroll.md)
- - [ScrollBar](reference/arkui-ts/ts-container-scrollbar.md)
- [SideBarContainer](reference/arkui-ts/ts-container-sidebarcontainer.md)
- [Stack](reference/arkui-ts/ts-container-stack.md)
- [Swiper](reference/arkui-ts/ts-container-swiper.md)
- [Tabs](reference/arkui-ts/ts-container-tabs.md)
- [TabContent](reference/arkui-ts/ts-container-tabcontent.md)
- - [Refresh](reference/arkui-ts/ts-container-refresh.md)
- Media Components
- [Video](reference/arkui-ts/ts-media-components-video.md)
- Drawing Components
@@ -454,7 +457,6 @@
- [Matrix Transformation](reference/arkui-ts/ts-matrix-transformation.md)
- [Interpolation Calculation](reference/arkui-ts/ts-interpolation-calculation.md)
- Global UI Methods
- - [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
- Dialog Box
- [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
- [Action Sheet](reference/arkui-ts/ts-methods-action-sheet.md)
@@ -462,122 +464,201 @@
- [Date Picker Dialog Box](reference/arkui-ts/ts-methods-datepicker-dialog.md)
- [Text Picker Dialog Box](reference/arkui-ts/ts-methods-textpicker-dialog.md)
- [Menu](reference/arkui-ts/ts-methods-menu.md)
- - Appendix
- - [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
+ - [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- APIs
- Ability Framework
- - [FeatureAbility Module](reference/apis/js-apis-featureAbility.md)
- - [ParticleAbility Module](reference/apis/js-apis-particleAbility.md)
- - [DataAbilityHelper Module](reference/apis/js-apis-dataAbilityHelper.md)
- - [DataUriUtils Module](reference/apis/js-apis-DataUriUtils.md)
- - [Bundle Module](reference/apis/js-apis-Bundle.md)
- - [Context Module](reference/apis/js-apis-Context.md)
- - Event Notification
- - [CommonEvent Module](reference/apis/js-apis-commonEvent.md)
- - [Notification Module](reference/apis/js-apis-notification.md)
- - [Reminder Agent](reference/apis/js-apis-reminderAgent.md)
- - Resource Management
- - [Resource Manager](reference/apis/js-apis-resource-manager.md)
- - [Internationalization (intl)](reference/apis/js-apis-intl.md)
- - [Internationalization (i18n)](reference/apis/js-apis-i18n.md)
+
+ - [@ohos.ability.dataUriUtils](reference/apis/js-apis-DataUriUtils.md)
+ - [@ohos.application.Ability](reference/apis/js-apis-application-ability.md)
+ - [@ohos.application.AbilityConstant](reference/apis/js-apis-application-abilityConstant.md)
+ - [@ohos.application.AbilityStage ](reference/apis/js-apis-application-abilitystage.md)
+ - [@ohos.application.appManager](reference/apis/js-apis-appmanager.md)
+ - [@ohos.application.Configuration](reference/apis/js-apis-configuration.md)
+ - [@ohos.application.ConfigurationConstant](reference/apis/js-apis-configurationconstant.md)
+ - [@ohos.ability.featureAbility](reference/apis/js-apis-featureAbility.md)
+ - [@ohos.application.formBindingData](reference/apis/js-apis-formbindingdata.md)
+ - [@ohos.application.FormExtension](reference/apis/js-apis-formextension.md)
+ - [@ohos.application.missionManager](reference/apis/js-apis-missionManager.md)
+ - [@ohos.application.formProvider](reference/apis/js-apis-formprovider.md)
+ - [@ohos.ability.particleAbility](reference/apis/js-apis-particleAbility.md)
+ - [@ohos.application.ServiceExtensionAbility](reference/apis/js-apis-service-extension-ability.md)
+ - [@ohos.application.uriPermissionManager](reference/apis/js-apis-uripermissionmanager.md)
+ - [@ohos.wantAgent](reference/apis/js-apis-wantAgent.md)
+ - [dataAbilityHelper](reference/apis/js-apis-dataAbilityHelper.md)
+ - [context](reference/apis/js-apis-Context.md)
+ - [AbilityContext](reference/apis/js-apis-ability-context.md)
+ - [AbilityRunningInfo](reference/apis/js-apis-abilityrunninginfo.md)
+ - [AbilityStageContext](reference/apis/js-apis-abilitystagecontext.md)
+ - [Context](reference/apis/js-apis-application-context.md)
+ - [ExtensionContext](reference/apis/js-apis-extension-context.md)
+ - [ExtensionRunningInfo](reference/apis/js-apis-extensionrunninginfo.md)
+ - [FormExtensionContext](reference/apis/js-apis-formextensioncontext.md)
+ - [MissionSnapshot](reference/apis/js-apis-application-MissionSnapshot.md)
+ - [PermissionRequestResult](reference/apis/js-apis-permissionrequestresult.md)
+ - [ProcessRunningInfo](reference/apis/js-apis-processrunninginfo.md)
+ - [ServiceExtensionContext](reference/apis/js-apis-service-extension-context.md)
+
+ - Common Event and Notification
+
+ - [@ohos.commonEvent](reference/apis/js-apis-commonEvent.md)
+ - [@ohos.events.emitter](reference/apis/js-apis-emitter.md)
+ - [@ohos.notification](reference/apis/js-apis-notification.md)
+ - [@ohos.reminderAgent](reference/apis/js-apis-reminderAgent.md)
+ - [EventHub](reference/apis/js-apis-eventhub.md)
+
+ - Bundle Management
+
+ - [@ohos.bundle](reference/apis/js-apis-Bundle.md)
+ - [@ohos.bundleState ](reference/apis/js-apis-deviceUsageStatistics.md)
+ - [@ohos.zlib](reference/apis/js-apis-zlib.md)
+
+ - UI Page
+
+ - [@ohos.animator](reference/apis/js-apis-animator.md)
+
+ - Graphics
+
+ - [@ohos.display ](reference/apis/js-apis-display.md)
+ - [@ohos.screenshot](reference/apis/js-apis-screenshot.md)
+ - [@ohos.window](reference/apis/js-apis-window.md)
+ - [webgl](reference/apis/js-apis-webgl.md)
+ - [webgl2](reference/apis/js-apis-webgl2.md)
+
- Media
- - [Audio Management](reference/apis/js-apis-audio.md)
- - [Media](reference/apis/js-apis-media.md)
- - [Image Processing](reference/apis/js-apis-image.md)
- - [Camera](reference/apis/js-apis-camera.md)
+
+ - [@ohos.multimedia.audio](reference/apis/js-apis-audio.md)
+ - [@ohos.multimedia.image](reference/apis/js-apis-image.md)
+ - [@ohos.multimedia.media](reference/apis/js-apis-media.md)
+ - [@ohos.multimedia.medialibrary](reference/apis/js-apis-medialibrary.md)
+
+ - Resource Management
+ - [@ohos.i18n](reference/apis/js-apis-i18n.md)
+ - [@ohos.intl](reference/apis/js-apis-intl.md)
+ - [@ohos.resourceManager](reference/apis/js-apis-resource-manager.md)
+
+ - Resource Scheduling
+
+ - [@ohos.backgroundTaskManager](reference/apis/js-apis-backgroundTaskManager.md)
+
+ - Custom Management
+
+ - [@ohos.configPolicy](reference/apis/js-apis-config-policy.md)
+
- Security
- - [User Authentication](reference/apis/js-apis-useriam-userauth.md)
- - [Access Control](reference/apis/js-apis-abilityAccessCtrl.md)
+
+ - [@ohos.abilityAccessCtrl](reference/apis/js-apis-abilityAccessCtrl.md)
+ - [@ohos.userIAM.userAuth ](reference/apis/js-apis-useriam-userauth.md)
+
- Data Management
- - [Lightweight Storage](reference/apis/js-apis-data-preferences.md)
- - [Distributed Data Management](reference/apis/js-apis-distributed-data.md)
- - [Relational Database](reference/apis/js-apis-data-rdb.md)
- - [Result Set](reference/apis/js-apis-data-resultset.md)
- - [DataAbilityPredicates](reference/apis/js-apis-data-ability.md)
- - [Settings](reference/apis/js-apis-settings.md)
+
+ - [@ohos.data.dataAbility ](reference/apis/js-apis-data-ability.md)
+ - [@ohos.data.distributedData](reference/apis/js-apis-distributed-data.md)
+ - [@ohos.data.distributedDataObject](reference/apis/js-apis-data-distributedobject.md)
+ - [@ohos.data.rdb](reference/apis/js-apis-data-rdb.md)
+ - [@ohos.settings](reference/apis/js-apis-settings.md)
+ - [resultSet](reference/apis/js-apis-data-resultset.md)
+
- File Management
- - [File Management](reference/apis/js-apis-fileio.md)
- - [Statfs](reference/apis/js-apis-statfs.md)
- - [Environment](reference/apis/js-apis-environment.md)
- - [Public File Access and Management](reference/apis/js-apis-filemanager.md)
- - [App Storage Statistics](reference/apis/js-apis-storage-statistics.md)
- - [Volume Management](reference/apis/js-apis-volumemanager.md)
- - Account Management
- - [OS Account Management](reference/apis/js-apis-osAccount.md)
- - [Distributed Account Management](reference/apis/js-apis-distributed-account.md)
- - [App Account Management](reference/apis/js-apis-appAccount.md)
+
+ - [@ohos.environment](reference/apis/js-apis-environment.md)
+ - [@ohos.fileio](reference/apis/js-apis-fileio.md)
+ - [@ohos.fileManager](reference/apis/js-apis-filemanager.md)
+ - [@ohos.statfs](reference/apis/js-apis-statfs.md)
+ - [@ohos.storageStatistics](reference/apis/js-apis-storage-statistics.md)
+
- Telephony Service
- - [Call](reference/apis/js-apis-call.md)
- - [SMS](reference/apis/js-apis-sms.md)
- - [SIM Management](reference/apis/js-apis-sim.md)
- - [Radio](reference/apis/js-apis-radio.md)
- - [Observer](reference/apis/js-apis-observer.md)
- - [Cellular Data](reference/apis/js-apis-telephony-data.md)
+
+ - [@ohos.contact](reference/apis/js-apis-contact.md)
+ - [@ohos.telephony.call](reference/apis/js-apis-call.md)
+ - [@ohos.telephony.observer](reference/apis/js-apis-observer.md)
+ - [@ohos.telephony.radio](reference/apis/js-apis-radio.md)
+ - [@ohos.telephony.sim](reference/apis/js-apis-sim.md)
+ - [@ohos.telephony.sms](reference/apis/js-apis-sms.md)
+ - [@ohos.telephony.data](reference/apis/js-apis-telephony-data.md)
+
- Network Management
- - [Network Connection Management](js-apis-net-connection.md)
- - [Socket Connection](js-apis-socket.md)
- - [WebSocket Connection](js-apis-webSocket.md)
- - [Data Request](js-apis-http.md)
- - Network and Connectivity
- - [WLAN](reference/apis/js-apis-wifi.md)
- - [Bluetooth](reference/apis/js-apis-bluetooth.md)
- - [RPC](reference/apis/js-apis-rpc.md)
- - Device Management
- - [Sensor](reference/apis/js-apis-sensor.md)
- - [Vibrator](reference/apis/js-apis-vibrator.md)
- - [Brightness](reference/apis/js-apis-brightness.md)
- - [Battery Info](reference/apis/js-apis-battery-info.md)
- - [Power Management](reference/apis/js-apis-power.md)
- - [Thermal Management](reference/apis/js-apis-thermal.md)
- - [Running Lock](reference/apis/js-apis-runninglock.md)
- - [Device Info](reference/apis/js-apis-device-info.md)
- - [systemParameter](reference/apis/js-apis-system-parameter.md)
- - [Device Management](reference/apis/js-apis-device-manager.md)
- - [Window](reference/apis/js-apis-window.md)
- - [Display](reference/apis/js-apis-display.md)
- - [Update](reference/apis/js-apis-update.md)
- - [USB](reference/apis/js-apis-usb.md)
- - [Location](reference/apis/js-apis-geolocation.md)
+ - [@ohos.net.connection](reference/apis/js-apis-net-connection.md)
+ - [@ohos.net.http](reference/apis/js-apis-http.md)
+ - [@ohos.request](reference/apis/js-apis-request.md)
+ - [@ohos.net.socket](reference/apis/js-apis-socket.md)
+ - [@ohos.net.webSocket](reference/apis/js-apis-webSocket.md)
+
+ - Connectivity
+
+ - [@ohos.bluetooth](reference/apis/js-apis-bluetooth.md)
+ - [@ohos.rpc](reference/apis/js-apis-rpc.md)
+ - [@ohos.wifi](reference/apis/js-apis-wifi.md)
+ - [@ohos.wifiext](reference/apis/js-apis-wifiext.md)
+
- Basic Features
- - [Application Context](reference/apis/js-apis-basic-features-app-context.md)
- - [Console Logs](reference/apis/js-apis-basic-features-logs.md)
- - [Page Routing](reference/apis/js-apis-basic-features-routes.md)
- - [Timer](reference/apis/js-apis-basic-features-timer.md)
- - [Setting the System Time](reference/apis/js-apis-system-time.md)
- - [Animation](reference/apis/js-apis-basic-features-animator.md)
- - [WebGL](reference/apis/js-apis-webgl.md)
- - [WebGL2](reference/apis/js-apis-webgl2.md)
- - [Screenshot](reference/apis/js-apis-screenshot.md)
- - [Accessibility](reference/apis/js-apis-accessibility.md)
- - DFX
- - [HiAppEvent](reference/apis/js-apis-hiappevent.md)
- - [Performance Tracing](reference/apis/js-apis-hitracemeter.md)
- - [Fault Logger](reference/apis/js-apis-faultLogger.md)
- - [Distributed Call Chain Tracing](reference/apis/js-apis-hitracechain.md)
- - [HiLog](reference/apis/js-apis-hilog.md)
- - [HiChecker](reference/apis/js-apis-hichecker.md)
- - [HiDebug](reference/apis/js-apis-hidebug.md)
+
+ - [@ohos.accessibility](reference/apis/js-apis-accessibility.md)
+ - [@ohos.faultLogger](reference/apis/js-apis-faultLogger.md)
+ - [@ohos.hiAppEvent](reference/apis/js-apis-hiappevent.md)
+ - [@ohos.hichecker](reference/apis/js-apis-hichecker.md)
+ - [@ohos.hidebug](reference/apis/js-apis-hidebug.md)
+ - [@ohos.hilog](reference/apis/js-apis-hilog.md)
+ - [@ohos.hiTraceChain](reference/apis/js-apis-hitracechain.md)
+ - [@ohos.hiTraceMeter](reference/apis/js-apis-hitracemeter.md)
+ - [@ohos.pasteboard](reference/apis/js-apis-pasteboard.md)
+ - [@ohos.screenLock](reference/apis/js-apis-screen-lock.md)
+ - [@ohos.systemTime](reference/apis/js-apis-system-time.md)
+ - [@ohos.wallpaper](reference/apis/js-apis-wallpaper.md)
+ - [Timer](reference/apis/js-apis-timer.md)
+
+ - Device Management
+
+ - [@ohos.batteryInfo ](reference/apis/js-apis-battery-info.md)
+ - [@ohos.brightness](reference/apis/js-apis-brightness.md)
+ - [@ohos.deviceInfo](reference/apis/js-apis-device-info.md)
+ - [@ohos.distributedHardware.deviceManager](reference/apis/js-apis-device-manager.md)
+ - [@ohos.geolocation](reference/apis/js-apis-geolocation.md)
+ - [@ohos.multimodalInput.inputConsumer](reference/apis/js-apis-inputconsumer.md)
+ - [@ohos.multimodalInput.inputDevice](reference/apis/js-apis-inputdevice.md)
+ - [@ohos.multimodalInput.inputMonitor](reference/apis/js-apis-inputmonitor.md)
+ - [@ohos.power](reference/apis/js-apis-power.md)
+ - [@ohos.runningLock](reference/apis/js-apis-runninglock.md)
+ - [@ohos.sensor](reference/apis/js-apis-sensor.md)
+ - [@ohos.systemParameter](reference/apis/js-apis-system-parameter.md)
+ - [@ohos.thermal](reference/apis/js-apis-thermal.md)
+ - [@ohos.update](reference/apis/js-apis-update.md)
+ - [@ohos.usb](reference/apis/js-apis-usb.md)
+ - [@ohos.vibrator](reference/apis/js-apis-vibrator.md)
+
+ - Account Management
+
+ - [@ohos.account.appAccount](reference/apis/js-apis-appAccount.md)
+ - [@ohos.account.distributedAccount](reference/apis/js-apis-distributed-account.md)
+ - [@ohos.account.osAccount](reference/apis/js-apis-osAccount.md)
+
- Language Base Class Library
- - [Obtaining Process Information](reference/apis/js-apis-process.md)
- - [URL String Parsing](reference/apis/js-apis-url.md)
- - [URI String Parsing](reference/apis/js-apis-uri.md)
- - [Util](reference/apis/js-apis-util.md)
- - [XML Parsing and Generation](reference/apis/js-apis-xml.md)
- - [XML-to-JavaScript Conversion](reference/apis/js-apis-convertxml.md)
- - [Worker Startup](reference/apis/js-apis-worker.md)
- - [Linear Container ArrayList](reference/apis/js-apis-arraylist.md)
- - [Linear Container Deque](reference/apis/js-apis-deque.md)
- - [Linear Container List](reference/apis/js-apis-list.md)
- - [Linear Container LinkedList](reference/apis/js-apis-linkedlist.md)
- - [Linear Container Queue](reference/apis/js-apis-queue.md)
- - [Linear Container Stack](reference/apis/js-apis-stack.md)
- - [Linear Container Vector](reference/apis/js-apis-vector.md)
- - [Nonlinear Container HashSet](reference/apis/js-apis-hashset.md)
- - [Nonlinear Container HashMap](reference/apis/js-apis-hashmap.md)
- - [Nonlinear Container PlainArray](reference/apis/js-apis-plainarray.md)
- - [Nonlinear Container TreeMap](reference/apis/js-apis-treemap.md)
- - [Nonlinear Container TreeSet](reference/apis/js-apis-treeset.md)
- - [Nonlinear Container LightWeightMap](reference/apis/js-apis-lightweightmap.md)
- - [Nonlinear Container LightWeightSet](reference/apis/js-apis-lightweightset.md)
- - Custom Management
- - [Configuration Policy](reference/apis/js-apis-config-policy.md)
+
+ - [@ohos.convertxml](reference/apis/js-apis-convertxml.md)
+ - [@ohos.process](reference/apis/js-apis-process.md)
+ - [@ohos.uri](reference/apis/js-apis-uri.md)
+ - [@ohos.url](reference/apis/js-apis-url.md)
+ - [@ohos.util](reference/apis/js-apis-util.md)
+ - [@ohos.util.ArrayList](reference/apis/js-apis-arraylist.md)
+ - [@ohos.util.Deque](reference/apis/js-apis-deque.md)
+ - [@ohos.util.HashMap](reference/apis/js-apis-hashmap.md)
+ - [@ohos.util.HashSet](reference/apis/js-apis-hashset.md)
+ - [@ohos.util.LightWeightMap](reference/apis/js-apis-lightweightmap.md)
+ - [@ohos.util.LightWeightSet](reference/apis/js-apis-lightweightset.md)
+ - [@ohos.util.LinkedList](reference/apis/js-apis-linkedlist.md)
+ - [@ohos.util.List](reference/apis/js-apis-list.md)
+ - [@ohos.util.PlainArray](reference/apis/js-apis-plainarray.md)
+ - [@ohos.util.Queue](reference/apis/js-apis-queue.md)
+ - [@ohos.util.Stack](reference/apis/js-apis-stack.md)
+ - [@ohos.util.TreeMap](reference/apis/js-apis-treemap.md)
+ - [@ohos.util.TreeSet](reference/apis/js-apis-treeset.md)
+ - [@ohos.util.Vector](reference/apis/js-apis-vector.md)
+ - [@ohos.worker](reference/apis/js-apis-worker.md)
+ - [@ohos.xml](reference/apis/js-apis-xml.md)
+
+ - APIs No Longer Maintained
+
+ - [@ohos.bytrace](reference/apis/js-apis-bytrace.md)
+ - [@ohos.data.storage](reference/apis/js-apis-data-storage.md)
+ - [@system.sensor](reference/apis/js-apis-system-sensor.md)
+ - [@system.vibrator](reference/apis/js-apis-system-vibrate.md)
+ - [console](reference/apis/js-apis-logs.md)
\ No newline at end of file
diff --git a/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md b/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md
index 2858f1dd5fea1dd9a37c9eceb7fe9c57e0f177fc..cb31281e693400790ddb2f438ebb744d77ddaf89 100644
--- a/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md
+++ b/en/application-dev/background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md
@@ -563,12 +563,12 @@ Publish a 10-second countdown reminder.
}
],
wantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
maxScreenWantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
title: "this is title",
content: "this is content",
@@ -625,12 +625,12 @@ calendar: {
},
],
wantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
maxScreenWantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
ringDuration: 5,
snoozeTimes: 2,
@@ -663,12 +663,12 @@ alarm: {
},
],
wantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
maxScreenWantAgent: {
- pkgName: "com.example.phone",
- abilityName: "com.example.phone.MainAbility"
+ pkgName: "com.example.device",
+ abilityName: "com.example.device.MainAbility"
},
ringDuration: 5,
snoozeTimes: 2,
diff --git a/en/application-dev/connectivity/ipc-rpc.md b/en/application-dev/connectivity/ipc-rpc.md
deleted file mode 100644
index b975f79f44de7309bab85c41e97c90717125ded4..0000000000000000000000000000000000000000
--- a/en/application-dev/connectivity/ipc-rpc.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# IPC & RPC
-
-- **[IPC & RPC Overview](ipc-rpc-overview.md)**
-
-- **[IPC & RPC Development Guidelines](ipc-rpc-development-guideline.md)**
-
-- **[Subscribing to State Changes of a Remote Object](subscribe-remote-state.md)**
-
-
diff --git a/en/application-dev/device/Readme-EN.md b/en/application-dev/device/Readme-EN.md
index db4a15e18c101ba89b842ba8e6997ae2f32fc472..4bdf8cfb5be2a0207b0ba4ca2650085d9ff7ad8d 100644
--- a/en/application-dev/device/Readme-EN.md
+++ b/en/application-dev/device/Readme-EN.md
@@ -7,3 +7,9 @@
- [Location Overview](device-location-overview.md)
- [Obtaining Device Location Information](device-location-info.md)
- [Geocoding and Reverse Geocoding Capabilities](device-location-geocoding.md)
+- Sensor
+ - [Sensor Overview](sensor-overview.md)
+ - [Sensor Development](sensor-guidelines.md)
+- Vibrator
+ - [vibrator-Overview.md](vibrator-overview.md)
+ - [Vibrator Development](vibrator-guidelines.md)
\ No newline at end of file
diff --git a/en/application-dev/device/figures/en-us_image_0000001180249428.png b/en/application-dev/device/figures/en-us_image_0000001180249428.png
new file mode 100644
index 0000000000000000000000000000000000000000..efd258b98d9a4eb2a72767bd808eef4f49900d32
Binary files /dev/null and b/en/application-dev/device/figures/en-us_image_0000001180249428.png differ
diff --git a/en/application-dev/device/sensor-overview.md b/en/application-dev/device/sensor-overview.md
index ea75d0b5dfc4a0611d118d5ddb9fbbaac1345bc5..c45dd69eea4372c41a1d5f1dbf93de14e4b40ea5 100644
--- a/en/application-dev/device/sensor-overview.md
+++ b/en/application-dev/device/sensor-overview.md
@@ -1,88 +1,43 @@
# Sensor Overview
-Sensors in OpenHarmony are an abstraction of underlying hardware-based sensors. Your application can access the underlying sensors via OpenHarmony sensors. Using the APIs provided by OpenHarmony sensors, you can query sensors on your device, subscribe to sensor data, customize algorithms based on sensor data, and develop various sensor-based applications, such as compass, fitness and health, and games applications.
+Sensors in OpenHarmony are an abstraction of underlying hardware-based sensors. Your application can access the underlying sensors via the sensors. Using the APIs provided by sensors, you can query sensors on your device, subscribe to sensor data, customize algorithms based on sensor data, and develop various sensor-based applications, such as compass, fitness and health, and games applications.
-The sensors are classified into the following categories based on their functions: motion, environment, orientation, light, body, and other categories (such as Hall effect sensors). Each category includes different sensor types. A sensor type may be a single physical sensor or a composite of multiple physical sensors.
+A sensor is a device to detect events or changes in an environment and send messages about the events or changes to another device (for example, a CPU). Generally, a sensor is composed of sensitive components and conversion components. Sensors are the cornerstone of the IoT. A unified sensor management framework is required to achieve data sensing at a low latency and low power consumption, thereby keeping up with requirements of "1+8+N" products or business in the Seamless AI Life Strategy. The sensor list is as follows:
+| Sensor Type | Sensor Name | Description | Usage |
+| --------------------------------------- | ------------------ | ------------------------------------------------------------ | ---------------------------------------- |
+| SENSOR_TYPE_ACCELEROMETER | Acceleration sensor | Measures the acceleration (including the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2.| Detecting the motion status |
+| SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED | Uncalibrated acceleration sensor| Measures the uncalibrated acceleration (including the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2.| Measuring the acceleration bias estimation |
+| SENSOR_TYPE_LINEAR_ACCELERATION | Linear acceleration sensor | Measures the linear acceleration (excluding the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2.| Detecting the linear acceleration in each axis |
+| SENSOR_TYPE_GRAVITY | Gravity sensor | Measures the gravity acceleration applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2.| Measuring the gravity |
+| SENSOR_TYPE_GYROSCOPE | Gyroscope sensor | Measures the rotation angular velocity of a device on three physical axes (X, Y, and Z), in the unit of rad/s.| Measuring the rotation angular velocity |
+| SENSOR_TYPE_GYROSCOPE_UNCALIBRATED | Uncalibrated gyroscope sensor| Measures the uncalibrated rotation angular velocity of a device on three physical axes (X, Y, and Z), in the unit of rad/s.| Measuring the bias estimation of the rotation angular velocity |
+| SENSOR_TYPE_SIGNIFICANT_MOTION | Significant motion sensor | Checks whether a device has a significant motion on three physical axes (X, Y, and Z). The value **0** means that the device does not have a significant motion, and **1** means the opposite.| Detecting significant motions of a device |
+| SENSOR_TYPE_PEDOMETER_DETECTION | Pedometer detection sensor | Detects whether a user takes a step. The value can be **0** (the user does not take a step) or **1** (the user takes a step).| Detecting whether a user takes a step |
+| SENSOR_TYPE_PEDOMETER | Pedometer sensor | Records the number of steps a user has walked. | Providing the number of steps a user has walked |
+| SENSOR_TYPE_AMBIENT_TEMPERATURE | Ambient temperature sensor | Measures the ambient temperature, in the unit of degree Celsius (°C). | Measuring the ambient temperature |
+| SENSOR_TYPE_MAGNETIC_FIELD | Magnetic field sensor | Measures the magnetic field on three physical axes (X, Y, and Z), in the unit of μT.| Creating a compass |
+| SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED | Uncalibrated magnetic field sensor | Measures the uncalibrated magnetic field on three physical axes (X, Y, and Z), in the unit of μT.| Measuring the magnetic field bias estimation |
+| SENSOR_TYPE_HUMIDITY | Humidity sensor | Measures the ambient relative humidity, in a percentage (%). | Monitoring the dew point, absolute humidity, and relative humidity |
+| SENSOR_TYPE_BAROMETER | Barometer sensor | Measures the barometric pressure, in the unit of hPa or mbar. | Measuring the barometric pressure |
+| SENSOR_TYPE_ORIENTATION | Orientation sensor | Measures the rotation angles of a device on three physical axes (X, Y, and Z), in the unit of rad.| Providing the three orientation angles of the screen |
+| SENSOR_TYPE_ROTATION_VECTOR | Rotation vector sensor | Measures the rotation vector of a device. It is a composite sensor that generates data from the acceleration sensor, magnetic field sensor, and gyroscope sensor.| Detecting the orientation of a device in the East, North, Up (ENU) Cartesian coordinate system |
+| SENSOR_TYPE_PROXIMITY | Proximity sensor | Measures the distance between a visible object and the device screen. | Measuring the distance between a person and the device during a call |
+| SENSOR_TYPE_AMBIENT_LIGHT | Ambient light sensor | Measures the ambient light intensity of a device, in the unit of lux. | Automatically adjusting the screen brightness and checking whether the screen is covered on the top|
+| SENSOR_TYPE_HEART_RATE | Heart rate sensor | Measures the heart rate of a user. | Providing users' heart rate data |
+| SENSOR_TYPE_WEAR_DETECTION | Wear detection sensor | Checks whether a user is wearing a wearable device. | Detecting wearables |
+| SENSOR_TYPE_HALL | Hall effect sensor | Detects a magnetic field around a device. | Smart cover mode of the device |
- **Table1** Motion - ohos.sensor.agent.CategoryMotionAgent
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_ACCELEROMETER | Acceleration sensor | Measures the acceleration (including the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2. | Detecting the motion status |
-| SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED | Uncalibrated acceleration sensor | Measures the uncalibrated acceleration (including the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2. | Measuring the acceleration bias estimation |
-| SENSOR_TYPE_LINEAR_ACCELERATION | Linear acceleration sensor | Measures the linear acceleration (excluding the gravity acceleration) applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2. | Detecting the linear acceleration in each axis |
-| SENSOR_TYPE_GRAVITY | Gravity sensor | Measures the gravity acceleration applied to a device on three physical axes (X, Y, and Z), in the unit of m/s2. | Measuring the gravity |
-| SENSOR_TYPE_GYROSCOPE | Gyroscope sensor | Measures the rotation angular velocity of a device on three physical axes (X, Y, and Z), in the unit of rad/s. | Measuring the rotation angular velocity |
-| SENSOR_TYPE_GYROSCOPE_UNCALIBRATED | Uncalibrated gyroscope sensor | Measures the uncalibrated rotation angular velocity of a device on three physical axes (X, Y, and Z), in the unit of rad/s. | Measuring the bias estimation of the rotation angular velocity |
-| SENSOR_TYPE_SIGNIFICANT_MOTION | Significant motion sensor | Checks whether a device has a significant motion on three physical axes (X, Y, and Z). The value can be **0** (having no significant motion) or **1** (having a significant motion). | Detecting significant motions of a device |
-| SENSOR_TYPE_DROP_DETECTION | Drop detection sensor | Detects the device drop status. The value can be **0** (the device is not dropped) or **1** (the device is dropped). | Detecting whether a device is dropped |
-| SENSOR_TYPE_PEDOMETER_DETECTION | Pedometer detection sensor | Detects whether a user takes a step. The value can be **0** (the user does not take a step) or **1** (the user takes a step). | Detecting whether a user takes a step |
-| SENSOR_TYPE_PEDOMETER | Pedometer sensor | Records the number of steps a user has walked. | Providing the number of steps a user has walked |
+## Working Principles
+The following modules work cooperatively to implement OpenHarmony sensors: Sensor API, Sensor Framework, Sensor Service, and HDF layer.
- **Table2** Environment - ohos.sensor.agent.CategoryOrientationAgent
+ **Figure 1** How the sensor works
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_AMBIENT_TEMPERATURE | Ambient temperature sensor. | Measures the ambient temperature, in the unit of degree Celsius (°C). | Measuring the ambient temperature |
-| SENSOR_TYPE_MAGNETIC_FIELD | Magnetic field sensor | Measures the magnetic field on three physical axes (X, Y, and Z), in the unit of μT. | Creating a compass |
-| SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED | Uncalibrated magnetic field sensor | Measures the uncalibrated magnetic field on three physical axes (X, Y, and Z), in the unit of μT. | Measuring the magnetic field bias estimation |
-| SENSOR_TYPE_HUMIDITY | Humidity sensor | Measures the ambient relative humidity, in a percentage (%). | Monitoring the dew point, absolute humidity, and relative humidity |
-| SENSOR_TYPE_BAROMETER | Barometer sensor | Measures the barometric pressure, in the unit of hPa or mbar. | Measuring the barometric pressure |
-| SENSOR_TYPE_SAR | Specific Absorption Rate (SAR) sensor | Measures the SAR, in the unit of W/kg. | Measuring the SAR of electromagnetic waves for a device |
-
-
- **Table3** Orientation - ohos.sensor.agent.CategoryOrientationAgent
-
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_6DOF | Degrees of Freedom (DoF) sensor | Measures the forward/backward, up/down, and left/right translational movement of a device on the three axes (X, Y, and Z) in the unit of m or mm as well as the roll, pitch, and yaw rotation angles on the three axes (X, Y, and Z) in the unit of rad. | Positioning an object by detecting its freedom of translational and rotational motions, for example, VR |
-| SENSOR_TYPE_SCREEN_ROTATION | Screen rotation sensor | Checks the rotation status of the device screen. | Detecting whether the device screen is rotating |
-| SENSOR_TYPE_DEVICE_ORIENTATION | Device orientation sensor | Measures the rotation angles of the device, in the unit of rad. | Measuring the angles that a device has rotated |
-| SENSOR_TYPE_ORIENTATION | Orientation sensor | Measures the rotation angles of a device on three physical axes (X, Y, and Z), in the unit of rad. | Providing the three orientation angles of the screen |
-| SENSOR_TYPE_ROTATION_VECTOR | Rotation vector sensor | Measures the rotation vector of a device. It is a composite sensor that generates data from the acceleration sensor, magnetic field sensor, and gyroscope sensor. | Detecting the orientation of a device in the East, North, Up (ENU) Cartesian coordinate system |
-| SENSOR_TYPE_GAME_ROTATION_VECTOR SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR | Game rotation vector sensor Geomagnetic rotation vector sensor | Measures the game rotation vector of a device. It is a composite sensor that generates data from the acceleration sensor and gyroscope sensor. Measures the geomagnetic rotation vector of a device. It is a composite sensor that generates data from the acceleration sensor and magnetic field sensor. | Applied in games Measuring the geomagnetic rotation vector |
-
-
- **Table4** Light - ohos.sensor.agent.CategoryLightAgent
-
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_PROXIMITY | Proximity sensor | Measures the distance between a visible object and the device screen. | Measuring the distance between a person and the device during a call |
-| SENSOR_TYPE_TOF | Time of flight (ToF) sensor | Measures the time required for light to travel a distance in the medium. | Facial recognition |
-| SENSOR_TYPE_AMBIENT_LIGHT | Ambient light sensor | Measures the ambient light intensity of a device, in the unit of lux. | Automatically adjusting the screen brightness and checking whether the screen is covered on the top |
-| SENSOR_TYPE_COLOR_TEMPERATURE | Color temperature sensor | Measures the ambient color temperature. | Image processing on the device |
-| SENSOR_TYPE_COLOR_RGB | RGB color sensor | Measures the ambient RGB color values. | Color detection implemented by the reflectance of RGB colors |
-| SENSOR_TYPE_COLOR_XYZ | XYZ color sensor | Measures the ambient XYZ color values. | Identifying true-color spots to reproduce more natural colors |
-
-
- **Table5** Body - ohos.sensor.agent.CategoryBodyAgent
-
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_HEART_RATE | Heart rate sensor | Measures the heart rate of a user. | Providing users' heart rate data |
-| SENSOR_TYPE_WEAR_DETECTION | Wear detection sensor | Checks whether a user is wearing a wearable device. | Detecting wearables |
-
-
- **Table6** Others
-
-| Sensor Type | Sensor Name | Description | Usage |
-| -------- | -------- | -------- | -------- |
-| SENSOR_TYPE_HALL | Hall effect sensor | Detects a magnetic field around a device. | Smart cover mode of the device |
-| SENSOR_TYPE_GRIP_DETECTOR | Grip detection sensor | Detects grip force applied on a device. | Detecting whether the device is gripped on its sides |
-| SENSOR_TYPE_MAGNET_BRACKET | Magnet bracket sensor | Checks whether a device is magnetized. | Detecting an in-vehicle or indoor device |
-| SENSOR_TYPE_PRESSURE_DETECTOR | Pressure detection sensor | Detects pressure force applied on a device. | Detecting pressure on the top of the device |
-
-
-## How a Service Is Shared Using Huawei Share
-
-The following modules work cooperatively to implement OpenHarmony sensors: Sensor API, Sensor Framework, Sensor Service, and HD_IDL.
-
- **Figure1** Working principles for OpenHarmony sensors
- 
+
- Sensor API: provides APIs for performing basic operations on sensors, including querying the sensor list, subscribing to or unsubscribing from sensor data, and executing control commands. This module makes application development simpler.
@@ -90,22 +45,22 @@ The following modules work cooperatively to implement OpenHarmony sensors: Senso
- Sensor Service: interacts with the HD_IDL module to receive, parse, and distribute data, manages foreground and background policies and sensors of a device, and controls sensor permissions.
-- HD_IDL: selects proper policies based on the hardware first in first out (FIFO) and frequency, and adapts to different devices.
+- HDF layer: selects proper policies based on the hardware first in first out (FIFO) and frequency, and adapts to different devices.
-## Limitations and Constraints
+## Constraints
-To obtain data of the following sensors, you must claim the required permissions.
+1. To obtain data of the following sensors, you must claim the required permissions.
+ Table 7 Sensor data permissions
- **Table7** Sensor data permission
+ | Sensor | Permission | Sensitivity | Permission Description |
+ | ------------------------- | -------------------------------- | ------------ | ----------------------- |
+ | Acceleration sensor, uncalibrated acceleration sensor, and linear acceleration sensor| ohos.permission.ACCELEROMETER | system_grant | Allows your application to subscribe to data of these acceleration-related sensors in the motion category.|
+ | Gyroscope sensor and uncalibrated gyroscope sensor | ohos.permission.GYROSCOPE | system_grant | Allows an application to subscribe to data of the gyroscope-related sensors in the motion category.|
+ | Pedometer sensor | ohos.permission.ACTIVITY_MOTION | user_grant | Allows an application to subscribe to the motion status. |
+ | Heart rate sensor | ohos.permission.READ_HEALTH_DATA | user_grant | Allows an application to read health data. |
-| Sensor | Permission Name | Sensitivity | Permission Description |
-| -------- | -------- | -------- | -------- |
-| Acceleration sensor, uncalibrated acceleration sensor, and linear acceleration sensor | ohos.permission.ACCELEROMETER | system_grant | Allows your application to subscribe to data of these acceleration-related sensors in the motion category. |
-| Gyroscope sensor and uncalibrated gyroscope sensor | ohos.permission.GYROSCOPE | system_grant | Allows your application to subscribe to data of these gyroscope-related sensors in the motion category. |
-| Pedometer sensor | ohos.permission.ACTIVITY_MOTION | user_grant | Allows your application to subscribe to the motion status. |
-| Heart rate sensor | ohos.permission.READ_HEALTH_DATA | user_grant | Allows your application to read health data. |
-The APIs for subscribing to and unsubscribing from sensor data work in pairs. If you do not need sensor data, call the unsubscription API to stop sensor data reporting.
+2. The APIs for subscribing to and unsubscribing from sensor data work in pairs. If you do not need sensor data, call the unsubscription API to stop sensor data reporting.
diff --git a/en/application-dev/device/vibrator-guidelines.md b/en/application-dev/device/vibrator-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..88bdeb6884eee52e1591993ec60099d31eb77e3c
--- /dev/null
+++ b/en/application-dev/device/vibrator-guidelines.md
@@ -0,0 +1,84 @@
+# Vibrator Development
+
+
+## When to Use
+
+You can set different vibration effects as needed, for example, customizing vibration effects with different intensities and durations for buttons on the device, and customizing one-shot or periodic vibration effects with different intensities and durations for alarm clocks and incoming calls.
+
+
+## Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.vibrator | vibrate(duration: number): Promise<void> | Triggers vibration with the specified duration. This API uses a promise to return the result. |
+| ohos.vibrator | vibrate(duration: number, callback?: AsyncCallback<void>): void | Triggers vibration with the specified duration. This API uses a callback to return the result. |
+| ohos.vibrator | vibrate(effectId: EffectId): Promise<void> | Triggers vibration with the specified effect. This API uses a promise to return the result. |
+| ohos.vibrator | vibrate(effectId: EffectId, callback?: AsyncCallback<void>): void | Triggers vibration with the specified effect. This API uses a callback to return the result. |
+| ohos.vibrator | stop(stopMode: VibratorStopMode): Promise<void> | Stops vibration. This API uses a promise to return the result. |
+| ohos.vibrator | stop(stopMode: VibratorStopMode, callback?: AsyncCallback<void>): void | Stops vibration. This API uses a callback to return the result. |
+
+
+## How to Develop
+
+1. Declare the permissions required for controlling vibrators on the hardware device in the **config.json** file.
+
+ ```
+ "reqPermissions":[
+ {
+ "name":"ohos.permission.ACCELEROMETER",
+ "reason"":"",
+ "usedScene":{
+ "ability""[
+ ".MainAbility"
+ ],
+ "when":"inuse"
+ }
+ },
+ {
+ "name":"ohos.permission.VIBRATE",
+ "reason"":"",
+ "usedScene":{
+ "ability""[
+ ".MainAbility"
+ ],
+ "when":"inuse"
+ }
+ },
+ {
+ "name":"ohos.permission.ACTIVITY_MOTION",
+ "reason"":"",
+ "usedScene":{
+ "ability""[
+ ".MainAbility"
+ ],
+ "when":"inuse"
+ }
+ },
+ ]
+ ```
+
+2. Trigger the device to vibrate.
+
+ ```
+ import vibrator from "@ohos.vibrator"
+ vibrator.vibrate(duration: number).then((error)=>{
+ if(error){// The call fails, and error.code and error.message are printed.
+ console.log("Promise return failed.error.code"+error.code+"error.message"+error.message);
+ }else{// The call succeeded. The device starts to vibrate.
+ console.log("Promise returned to indicate a successful vibration.")
+ };
+ })
+ ```
+
+3. Stop the vibration.
+
+ ```
+ import vibrator from "@ohos.vibrator"
+ vibrator.stop(stopMode: VibratorStopMode).then((error)=>{
+ if(error){// The call fails, and error.code and error.message are printed.
+ console.log("Promise return failed. error.code"+error.code+"error.message"+error.message);
+ }else{// The call succeeded. The device stops vibration.
+ Console.log("Promise returned to indicate a successful stop.");
+ };
+ })
+ ```
diff --git a/en/application-dev/device/vibrator-overview.md b/en/application-dev/device/vibrator-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..3d8f187054dd1f0da3e3099bd10e3cb28e5a9b15
--- /dev/null
+++ b/en/application-dev/device/vibrator-overview.md
@@ -0,0 +1,25 @@
+# Vibrator Overview
+
+
+The vibrator service opens up the latest capabilities of the vibrator hardware to the maximum extent. By expanding the native vibrator service to implement integrated vibration and interaction design, the service delivers an exquisite integrated vibration experience and differentiated experience, and improves user interaction efficiency and usability.
+
+
+## Working Principles
+
+The vibrator is a Misc device that consists of four modules: Vibrator API, Vibrator Framework, Vibrator Service, and HD_IDL.
+
+ **Figure1** Vibrator in Misc devices
+ 
+
+- Vibrator API: provides basic vibrator APIs, including the APIs for querying the vibrator list, querying the vibrator by effect, and triggering and stopping vibration.
+
+- Vibrator Framework: manages the framework layer of the vibrator and communicates with the Misc Device Service.
+
+- Vibrator Service: manages services of vibrators.
+
+- HD_IDL: adapts to different devices.
+
+
+## Constraints
+
+When using a vibrator, you need to declare and obtain the **ohos.permission.VIBRATE** permission first so that you can control the vibration effect.
diff --git a/en/application-dev/internationalization/Readme-EN.md b/en/application-dev/internationalization/Readme-EN.md
new file mode 100644
index 0000000000000000000000000000000000000000..4a1435843d6842dfaacbd1a56419efc6ef5b7487
--- /dev/null
+++ b/en/application-dev/internationalization/Readme-EN.md
@@ -0,0 +1,5 @@
+# Internationalization
+
+- [Overview](international-overview.md)
+- [Internationalization Development (intl)](intl-guidelines.md)
+- [Internationalization Development (i18n)](i18n-guidelines.md)
diff --git a/en/application-dev/internationalization/i18n-guidelines.md b/en/application-dev/internationalization/i18n-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..0ded9fd39da8131472cdb600ffd6d3ebc7daff5f
--- /dev/null
+++ b/en/application-dev/internationalization/i18n-guidelines.md
@@ -0,0 +1,363 @@
+# Internationalization Development (i18n)
+
+
+## Obtaining System Language and Region Information
+
+APIs are provided to access the system language and region information.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | getSystemLanguage(): string | Obtains the system language. |
+| ohos.i18n | getSystemRegion(): string | Obtains the system region. |
+| ohos.i18n | getSystemLocale(): string | Obtains the system locale. |
+| ohos.i18n | isRTL(locale: string): boolean7+ | Checks whether the locale uses a right-to-left (RTL) language. |
+| ohos.i18n | is24HourClock(): boolean7+ | Checks whether the system uses a 24-hour clock. |
+| ohos.i18n | getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a language. |
+| ohos.i18n | getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string | Obtains the localized display of a country. |
+
+
+### How to Develop
+
+1. Obtain the system language.
+ Call the **getSystemLanguage** method to obtain the system language (**i18n** is the name of the imported module).
+
+
+ ```
+ var language = i18n.getSystemLanguage();
+ ```
+
+2. Obtains the system region.
+ Call the **getSystemRegion** method to obtain the system region.
+
+ ```
+ var region = i18n.getSystemRegion();
+ ```
+
+3. Obtain the system locale.
+ Call the **getSystemLocale** method to obtain the system locale.
+
+ ```
+ var locale = i18n.getSystemLocale();
+ ```
+
+4. Check whether the locale's language is RTL.
+ Call the **isRTL** method to check whether the locale's language is RTL.
+
+
+ ```
+ var rtl = i18n.isRTL("zh-CN");
+ ```
+
+5. Check whether the system uses a 24-hour clock.
+ Call the **is24HourClock** method to check whether the system uses a 24-hour clock.
+
+ ```
+ var hourClock = i18n.is24HourClock();
+ ```
+
+6. Obtain the localized display of a language.
+ Call the **getDisplayLanguage** method to obtain the localized display of a language. **language** indicates the language to be localized, **locale** indicates the locale, and **sentenceCase** indicates whether the first letter of the result must be capitalized.
+
+ ```
+ var language = "en";
+ var locale = "zh-CN";
+ var sentenceCase = false;
+ var localizedLanguage = i18n.getDisplayLanguage(language, locale, sentenceCase);
+ ```
+
+7. Obtain the localized display of a country.
+ Call the **getDisplayCountry** method to obtain the localized display of a country. **country** indicates the country to be localized, **locale** indicates the locale, and **sentenceCase** indicates whether the first letter of the result must be capitalized.
+
+ ```
+ var country = "US";
+ var locale = "zh-CN";
+ var sentenceCase = false;
+ var localizedCountry = i18n.getDisplayCountry(country, locale, sentenceCase);
+ ```
+
+
+## Obtaining Calendar Information
+
+[Calendar](../reference/apis/js-apis-intl.md) APIs are used to obtain calendar information, for example, the localized display of the calendar, the first day of a week, and the minimum count of days in the first week of a year.
+
+
+### Available APIs
+
+| Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | getCalendar(locale: string, type?: string): Calendar8+ | Obtains the **Calendar** object for a specific locale and type. |
+| ohos.i18n | setTime(date: Date): void8+ | Sets the date for the **Calendar** object. |
+| ohos.i18n | setTime(time: number): void8+ | Sets the time for the **Calendar** object. |
+| ohos.i18n | set(year: number, month: number, date: number, hour?: number, minute?: number, second?: number): void8+ | Sets the year, month, day, hour, minute, and second for the **Calendar** object. |
+| ohos.i18n | setTimeZone(timezone: string): void8+ | Sets the time zone for the **Calendar** object. |
+| ohos.i18n | getTimeZone(): string8+ | Obtains the time zone for the **Calendar** object. |
+| ohos.i18n | getFirstDayOfWeek(): number8+ | Obtains the first day of a week for the **Calendar** object. |
+| ohos.i18n | setFirstDayOfWeek(value: number): void8+ | Sets the first day of a week for the **Calendar** object. |
+| ohos.i18n | getMinimalDaysInFirstWeek(): number8+ | Obtains the minimum count of days in the first week of a year. |
+| ohos.i18n | setMinimalDaysInFirstWeek(value: number): void8+ | Sets the minimum count of days in the first week of a year. |
+| ohos.i18n | getDisplayName(locale: string): string8+ | Obtains the localized display of the **Calendar** object. |
+| ohos.i18n | isWeekend(date?: Date): boolean8+ | Checks whether a given date is a weekend. |
+
+
+### How to Develop
+
+1. Instantiate a **Calendar** object.
+ Call the **getCalendar** method to obtain the time zone object of a specific locale and type (**i18n** is the name of the imported module). **type** indicates the valid calendar type, for example, **buddhist**, **chinese**, **coptic**, **ethiopic**, **hebrew**, **gregory**, **indian**, **islamic_civil**, **islamic_tbla**, **islamic_umalqura**, **japanese**, and **persian**. If **type** is left unspecified, the default calendar type of the locale is used.
+
+
+ ```
+ var calendar = i18n.getCalendar("zh-CN", "gregory);
+ ```
+
+2. Set the time for the **Calendar** object.
+ Call the **setTime** method to set the time of the **Calendar** object. This method receives two types of parameters. One is a **Date** object, and the other is a value indicating the number of milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
+
+ ```
+ var date1 = new Date();
+ calendar.setTime(date1);
+ var date2 = 1000;
+ calendar.setTime(date2);
+ ```
+
+3. Set the year, month, day, hour, minute, and second for the **Calendar** object.
+ Call the **set** method to set the year, month, day, hour, minute, and second for the **Calendar** object.
+
+ ```
+ calendar.set(2021, 12, 21, 6, 0, 0)
+ ```
+
+4. Set and obtain the time zone for the **Calendar** object.
+ Call the **setTimeZone** and **getTimeZone** methods to set and obtain the time zone for the **Calendar** object. The **setTimeZone** method requires an input string to indicate the time zone to be set.
+
+
+ ```
+ calendar.setTimeZone("Asia/Shanghai");
+ var timezone = calendar.getTimeZone();
+ ```
+
+5. Set and obtain the first day of a week for the **Calendar** object.
+ Call the **setFirstDayOfWeek** and **getFirstDayOfWeek** methods to set and obtain the first day of a week for the **Calendar** object. **setFirstDayOfWeek** must be set to a value indicating the first day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.
+
+
+ ```
+ calendar.setFirstDayOfWeek(1);
+ var firstDayOfWeek = calendar.getFirstDayOfWeek();
+ ```
+
+6. Set and obtain the minimum count of days in the first week for the **Calendar** object.
+ Call the **setMinimalDaysInFirstWeek** and **getMinimalDaysInFirstWeek** methods to set and obtain the minimum count of days in the first week for the **Calendar** object.
+
+ ```
+ calendar.setMinimalDaysInFirstWeek(3);
+ var minimalDaysInFirstWeek = calendar.getMinimalDaysInFirstWeek();
+ ```
+
+7. Obtain the localized display of the **Calendar** object.
+ Call the **getDisplayName** method to obtain the localized display of the **Calendar** object.
+
+
+ ```
+ var localizedName = calendar.getDisplayName("zh-CN");
+ ```
+
+8. Check whether a date is a weekend.
+ Call the **isWeekend** method to determine whether the input date is a weekend.
+
+
+ ```
+ var date = new Date();
+ var weekend = calendar.isWeekend(date);
+ ```
+
+
+## Formatting a Phone Number
+
+[PhoneNumberFormat](../reference/apis/js-apis-intl.md) APIs are used to format phone numbers in different countries and check whether the phone number formats are correct.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | constructor(country: string, options?: PhoneNumberFormatOptions)8+ | Instantiates a **PhoneNumberFormat** object. |
+| ohos.i18n | isValidNumber(number: string): boolean8+ | Checks whether the value of **number** is a phone number in the correct format. |
+| ohos.i18n | format(number: string): string8+ | Formats the value of **number** based on the specified country and style. |
+
+
+### How to Develop
+
+1. Instantiate a **PhoneNumberFormat** object.
+ Call the **PhoneNumberFormat** constructor to instantiate a **PhoneNumberFormat** object. The country code and formatting options of the phone number need to be passed into this constructor. The formatting options are optional, including a style option. Values of this option include: **E164**, **INTERNATIONAL**, **NATIONAL**, and **RFC3966**.
+
+
+ ```
+ var phoneNumberFormat = new i18n.PhoneNubmerFormat("CN", {type: "E164"});
+ ```
+
+2. Check whether the phone number format is correct.
+ Call the **isValidNumber** method to check whether the format of the input phone number is correct.
+
+ ```
+ var validNumber = phoneNumberFormat.isValidNumber("15812341234");
+ ```
+
+3. Format a phone number.
+ Call the **format** method of **PhoneNumberFormat** to format the input phone number.
+
+ ```
+ var formattedNumber = phoneNumberFormat.format("15812341234");
+ ```
+
+
+## Measurement Conversion
+
+An API can be called to implement measurement conversion.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string8+ | Converts one measurement unit (**fromUnit**) into another (**toUnit**) and formats the unit based on the specified locale and style. |
+
+
+### How to Develop
+
+1. Convert a measurement unit.
+ Call the [unitConvert](../reference/apis/js-apis-intl.md) method to convert a measurement unit and format the display result.
+
+
+ ```
+ var fromUnit = {unit: "cup", measureSystem: "US"};
+ var toUnit = {unit: "liter", measureSystem: "SI"};
+ var number = 1000;
+ var locale = "en-US";
+ var style = "long";
+ i18n.Util.unitConvert(fromUtil, toUtil, number, locale, style);
+ ```
+
+
+## Alphabet Index
+
+[IndexUtil](../reference/apis/js-apis-intl.md) APIs are used to obtain the alphabet indexes of different locales and calculate the index to which a string belongs.
+
+
+### Available APIs
+
+| Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | getInstance(locale?: string): IndexUtil8+ | Instantiates an **IndexUtil** object. |
+| ohos.i18n | getIndexList(): Array<string>8+ | Obtains the index list of the current locale. |
+| ohos.i18n | addLocale(locale: string): void8+ | Adds the index of a new locale to the index list. |
+| ohos.i18n | getIndex(text: string): string8+ | Obtains the index of **text**. |
+
+
+### How to Develop
+
+1. Instantiate an **IndexUtil** object.
+ Call the **getInstance** method to instantiate an **IndexUtil** object for a specific locale. When the **locale** parameter is empty, instantiate an **IndexUtil** object of the default locale.
+
+
+ ```
+ var indexUtil = getInstance("zh-CN");
+ ```
+
+2. Obtain the index list.
+ Call the **getIndexList** method to obtain the alphabet index list of the current locale.
+
+ ```
+ var indexList = indexUtil.getIndexList();
+ ```
+
+3. Add an index.
+ Call the **addLocale** method to add the alphabet index of a new locale to the current index list.
+
+ ```
+ indexUtil.addLocale("ar")
+ ```
+
+4. Obtain the index of a string.
+ Call the **getIndex** method to obtain the alphabet index of a string.
+
+ ```
+ var text = "access index";
+ indexUtil.getIndex(text);
+ ```
+
+
+## Obtaining Line Breaks of Text
+
+When a text is displayed in more than one line, [BreakIterator](../reference/apis/js-apis-intl.md) APIs are used to obtain the line break positions of the text.
+
+
+### Available APIs
+
+| Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.i18n | getLineInstance(locale: string): BreakIterator8+ | Instantiates a **BreakIterator** object. |
+| ohos.i18n | setLineBreakText(text: string): void8+ | Sets the text to be processed. |
+| ohos.i18n | getLineBreakText(): string8+ | Obtains the text to be processed. |
+| ohos.i18n | current(): number8+ | Obtains the current position of a **BreakIterator** object in the text being processed. |
+| ohos.i18n | first(): number8+ | Sets a **BreakIterator** object to the first breakable point. |
+| ohos.i18n | last(): number8+ | Sets a **BreakIterator** object to the last breakable point. |
+| ohos.i18n | next(index?: number): number8+ | Moves a **BreakIterator** object to the break point according to **index**. |
+| ohos.i18n | previous(): number8+ | Moves a **BreakIterator** object to the previous break point. |
+| ohos.i18n | following(offset: number): number8+ | Moves a **BreakIterator** object to the break point following the position specified by **offset**. |
+| ohos.i18n | isBoundary(offset: number): boolean8+ | Determines whether a position is a break point. |
+
+
+### How to Develop
+
+1. Instantiate a **BreakIterator** object.
+ Call the **getLineInstance** method to instantiate a **BreakIterator** object.
+
+
+ ```
+ var locale = "en-US"
+ var breakIterator = i18n.getLineInstance(locale);
+ ```
+
+2. Set and access the text that requires line breaking.
+ Call the **setLineBreakText** and **getLineBreakText** methods to set and access the text that requires line breaking.
+
+
+ ```
+ var text = "Apple is my favorite fruit";
+ breakIterator.setLineBreakText(text);
+ var breakText = breakIterator.getLineBreakText();
+ ```
+
+3. Obtain the current position of the **BreakIterator** object.
+ Call the **current** method to obtain the current position of the **BreakIterator** object in the text being processed.
+
+
+ ```
+ var pos = breakIterator.current();
+ ```
+
+4. Set the position of a **BreakIterator** object.
+ The following APIs are provided to adjust the **first**, **last**, **next**, **previous**, or **following** position of the **BreakIterator** object in the text to be processed.
+
+
+ ```
+ var firstPos = breakIterator.first(); // Sets a BreakIterator object to the first break point, that is, the start position of the text.
+ var lastPos = breakIterator.last(); // Sets a BreakIterator object to the last break point, that is, the position after the text end.
+ // Moves a BreakIterator object forward or backward by a certain number of break points.
+ // If a positive number is input, move backward. If a negative number is input, move forward. If no value is input, move one position backward.
+ // When the object is moved out of the text length range, -1 is returned.
+ var nextPos = breakIterator.next(-2);
+ var previousPos = breakIterator.previous(); // Moves a BreakIterator object to the previous break point. When the text length is out of the range, -1 is returned.
+ // Moves a BreakIterator object to the break point following the position specified by offset. If the object is moved out of the text length range, -1 is returned.
+ var followingPos = breakIterator.following(10);
+ ```
+
+5. Determine whether a position is a break point.
+ Call the **isBoundary** method to determine whether a position is a break point. If yes, **true** is returned and the **BreakIterator** object is moved to this position. If no, **false** is returned and the **BreakIterator** object is moved to a break point after this position.
+
+
+ ```
+ var isboundary = breakIterator.isBoundary(5);
+ ```
diff --git a/en/application-dev/internationalization/international-overview.md b/en/application-dev/internationalization/international-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..f41f6b0cb00c105e9a69e9e94388713c638ad658
--- /dev/null
+++ b/en/application-dev/internationalization/international-overview.md
@@ -0,0 +1,24 @@
+# Overview
+
+
+If an application is targeted for users and markets in different regions with different languages and time zones, it is necessary for you to provide localized versions to ensure good experience for your users.
+
+
+Internationalization capabilities determine how hard or easy application localization will be. With the rich internationalization APIs provided by the system, localization is much more efficient and cost-effective, accelerating your design and implementation of a well-internationalized application.
+
+
+## Basic Concepts
+
+- Locale: an abstract representation of the commonalities of a group in terms of language, script, country or region, and other regional features such as calendar, sorting, and currency.
+
+- Preferred language: the language that the user prefers to use in a service or system. You can add a preferred language by choosing **Settings** > **System & updates** > **Language & input** > **Language and region** > **ADD LANGUAGE** on your mobile phone.
+
+
+## Working Principles
+
+You just need to specify a locale when calling internationalization APIs, and localization will be automatically implemented for that locale. Locale information can be hard coded, but it is more common for users to set the system language and region by themselves.
+
+
+## Constraints
+
+None
diff --git a/en/application-dev/internationalization/intl-guidelines.md b/en/application-dev/internationalization/intl-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..9bbfa269163f903889cca28307472c808752a130
--- /dev/null
+++ b/en/application-dev/internationalization/intl-guidelines.md
@@ -0,0 +1,302 @@
+# Internationalization Development (intl)
+
+
+## Setting Locale Information
+
+[Locale](../reference/apis/js-apis-intl.md) APIs are used to maximize or minimize locale information.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Instantiates a **Locale** object. |
+| ohos.intl | constructor(locale?: string, options?: options) | Instantiates a **Locale** object based on the locale parameter and options. |
+| ohos.intl | toString(): string | Converts locale information into a string. |
+| ohos.intl | maximize(): Locale | Maximizes locale information. |
+| ohos.intl | minimize(): Locale | Minimizes locale information. |
+
+
+### How to Develop
+
+1. Instantiate a **Locale** object.
+ Create a **Locale** object using the **Locale** constructor. This method receives a string representing the locale and an optional [Attributes](../reference/apis/js-apis-intl.md) list (**intl** is the name of the imported module).
+
+
+ ```
+ var locale = "zh-CN";
+ var options = {caseFirst: false, calendar: "chinese", collation: pinyin};
+ var localeObj = new intl.Locale(locale, options);
+ ```
+
+2. Obtain the string representing a **Locale** object.
+ Call the **toString** method to obtain the string representing a **Locale** object, including the language, region, and other options.
+
+ ```
+ var localeStr = localeObj.toString();
+ ```
+
+3. Maximize locale information.
+ Call the **maximize** method to maximize locale information; that is, supplement the missing script and region information.
+
+ ```
+ var maximizedLocale = localeObj.maximize();
+ ```
+
+4. Minimize locale information.
+ Call the **minimize** method to minimize locale information; that is, delete the unnecessary script and region information.
+
+ ```
+ var minimizedLocale = localeObj.minimize();
+ ```
+
+
+## Formatting the Date and Time
+
+[DateTimeFormat](../reference/apis/js-apis-intl.md) APIs are used to format the date and time for a specific locale.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Creates a **DateTimeFormat** object. |
+| ohos.intl | constructor(locale: string \| Array<string>, options?: DateTimeOptions) | Creates a **DateTimeFormat** object and sets the locale and other formatting-related attributes. |
+| ohos.intl | format(date: Date): string | Calculates the date and time based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
+| ohos.intl | formatRange(startDate: Date, endDate: Date): string | Calculates the period based on the locale and other formatting-related attributes of the **DateTimeFormat** object. |
+| ohos.intl | resolvedOptions(): DateTimeOptions | Obtains the related attributes of the **DateTimeFormat** object. |
+
+
+### How to Develop
+
+1. Instantiate a **DateTimeFormat** object.
+ Use the default constructor of **DateTimeFormat** to obtain the system default locale by accessing the system language and region settings, and set it as the locale in the **DateTimeFormat** object (**intl** is the name of the imported module).
+
+
+ ```
+ var dateTimeFormat = new intl.DateTimeFormat();
+ ```
+
+ Alternatively, use your own locale and formatting parameters to create a **DateTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [DateTimeOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var options = {dateStyle: "full", timeStyle: "full"};
+ var dateTimeFormat = new intl.DateTimeFormat("zh-CN", options);
+ ```
+
+2. Format the date and time.
+ Use the **format** method of **DateTimeFormat** to format a **Date** object. A string is returned as the formatting result.
+
+ ```
+ Date date = new Date();
+ var formatResult = dateTimeFormat.format(date);
+ ```
+
+3. Format a period.
+ Use the **formatRange** method of **DateTimeFormat** to format a period. This method requires the input of two **Date** objects, which respectively indicate the start date and end date of a period. A string is returned as the formatting result.
+
+ ```
+ Date startDate = new Date();
+ Date endDate = new Date();
+ var formatResult = dateTimeFormat.formatRange(startDate, endDate);
+ ```
+
+4. Access the attributes of the **DateTimeFormat** object.
+ The **resolvedOptions** method of **DateTimeFormat** returns an object that contains all related attributes and values of the **DateTimeFormat** object.
+
+ ```
+ var options = dateTimeFormat.resolvedOptions();
+ ```
+
+
+## Number Formatting
+
+[NumberFormat](../reference/apis/js-apis-intl.md) APIs are used to format a number for a specific locale.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Creates a **NumberFormat** object. |
+| ohos.intl | constructor(locale: string \| Array<string>, options?: NumberOptions) | Creates a **NumberFormat** object and sets the locale and other formatting-related attributes. |
+| ohos.intl | format(number: number): string | Calculates the number based on the locale and other formatting-related attributes of the **NumberFormat** object. |
+| ohos.intl | resolvedOptions(): NumberOptions | Obtains the attributes of the **NumberFormat** object. |
+
+
+### How to Develop
+
+1. Instantiate a **NumberFormat** object.
+ Use the default constructor of **NumberFormat** to obtain the system default locale by accessing the system language and region settings and set it as the locale in the **NumberFormat** object (**intl** is the name of the imported module).
+
+
+ ```
+ var numberFormat = new intl.NumberFormat();
+ ```
+
+ Alternatively, use your own locale and formatting parameters to create a **NumberFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [NumberOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var options = {compactDisplay: "short", notation: "compact"};
+ var numberFormat = new intl.NumberFormat("zh-CN", options);
+ ```
+
+2. Format a number.
+ Use the **format** method of **NumberFormat** to format a number. A string is returned as the formatting result.
+
+ ```
+ var number = 1234.5678
+ var formatResult = numberFormat.format(number);
+ ```
+
+3. Access the attributes of the **NumberFormat** object.
+ The **resolvedOptions** method of NumberFormat returns an object that contains all related attributes and values of the **NumberFormat** object.
+
+ ```
+ var options = numberFormat.resolvedOptions();
+ ```
+
+
+## String Sorting
+
+Users in different regions have different requirements for string sorting. [Collator](../reference/apis/js-apis-intl.md) APIs are used to sort strings based on a specific locale.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Creates a **Collator** object. |
+| ohos.intl | constructor(locale: string \| Array<string>, options?: CollatorOptions)8+ | Creates a **Collator** object and sets the locale and other related attributes. |
+| ohos.intl | compare(first: string, second: string): number8+ | Calculates the comparison result of two strings based on the locale and other attributes of the **Collator** object. |
+| ohos.intl | resolvedOptions(): CollatorOptions8+ | Obtains the attributes of the **Collator** object. |
+
+
+### How to Develop
+
+1. Instantiate a **Collator** object.
+ Use the default constructor of **Collator** to obtain the system default locale by accessing the system language and region settings and set it as the locale in the **Collator** object (**intl** is the name of the imported module).
+
+
+ ```
+ var collator = new intl.Collator();
+ ```
+
+ Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var collator= new intl.Collator("zh-CN", {localeMatcher: "best fit", usage: "sort"};
+ ```
+
+2. Compare two strings.
+ Use the **compare** method of **Collator** to compare two input strings. This method returns a value as the comparison result. The return value **-1** indicates that the first string is shorter than the second string, the return value **1** indicates that the first string is longer than the second string, and the return value **0** indicates that the two strings are of equal lengths.
+
+ ```
+ var str1 = "first string";
+ var str2 = "second string";
+ var compareResult = collator.compare(str1, str2);
+ ```
+
+3. Access the attributes of the **Collator** object.
+ The **resolvedOptions** method of **Collator** returns an object that contains all related attributes and values of the **Collator** object.
+
+ ```
+ var options = collator.resolvedOptions();
+ ```
+
+
+## Determining the Singular-Plural Type
+
+According to grammars in certain languages, the singular or plural form of a noun depends on the number prior to the noun. [PluralRules](../reference/apis/js-apis-intl.md) APIs are used to determine the singular-plural type for a specific locale.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Creates a **PluralRules** object. |
+| ohos.intl | constructor(locale: string \| Array<string>, options?: PluralRulesOptions)8+ | Creates a **PluralRules** object and sets the locale and other related attributes. |
+| ohos.intl | select(n: number): string8+ | Determines the singular-plural type based on the locale and other formatting-related attributes of the **PluralRules** object. |
+
+
+### How to Develop
+
+1. Instantiate a **PluralRules** object.
+ Use the default constructor of **PluralRules** to obtain the system default locale by accessing the system language and region settings and set it as the locale in the **PluralRules** object (**intl** is the name of the imported module).
+
+
+ ```
+ var pluralRules = new intl.PluralRules();
+ ```
+
+ Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var plurals = new intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"};
+ ```
+
+2. Determine the singular or plural category.
+ Use the **select** method of **PluralRules** to determine the singular-plural type for an input number. This method returns a string as the category of the input number, which can be any of the following: **zero**, **one**, **two**, **few**, **many**, and **other**.
+
+ ```
+ var number = 1234.5678
+ var categoryResult = plurals.select(number);
+ ```
+
+
+## Formatting Relative Time
+
+[RelativeTimeFormat](../reference/apis/js-apis-intl.md) APIs are used to format the relative time for a specific locale.
+
+
+### Available APIs
+
+ | Module | API | Description |
+| -------- | -------- | -------- |
+| ohos.intl | constructor()8+ | Creates a **RelativeTimeFormat** object. |
+| ohos.intl | constructor(locale: string \| Array<string>, options?: RelativeTimeFormatInputOptions)8+ | Creates a **RelativeTimeFormat** object and sets the locale and other formatting-related attributes. |
+| ohos.intl | format(value: number, unit: string): string8+ | Calculates the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
+| ohos.intl | formatToParts(value: number, unit: string): Array<object>8+ | Returns each part of the relative time format based on the locale and other formatting-related attributes of the **RelativeTimeFormat** object. |
+| ohos.intl | resolvedOptions(): RelativeTimeFormatResolvedOptions8+ | Obtains the attributes of the **RelativeTimeFormat** object. |
+
+
+### How to Develop
+
+1. Instantiate a **RelativeTimeFormat** object.
+ Use the default constructor of **RelativeTimeFormat** to obtain the system default locale by accessing the system language and region settings and set it as the locale in the **RelativeTimeFormat** object (**intl** is the name of the imported module).
+
+
+ ```
+ var relativeTimeFormat = new intl.RelativeTimeFormat();
+ ```
+
+ Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [ RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var relativeTimeFormat = new intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"};
+ ```
+
+2. Format the relative time.
+ Use the **format** method of **RelativeTimeFormat** to format the relative time. This method receives a numeric value representing the time length and a string-form unit, like **year**, **quarter**, **month**, **week**, **day**, **hour**, **minute**, and **second**. A string is returned as the formatting result.
+
+ ```
+ var number = 2;
+ var unit = "year"
+ var formatResult = relativeTimeFormat.format(number, unit);
+ ```
+
+3. Obtain each part of the relative time format.
+ On obtaining each part of the relative time format, customize the relative time formatting result.
+
+ ```
+ var number = 2;
+ var unit = "year"
+ var formatResult = relativeTimeFormat.formatToParts(number, unit);
+ ```
+
+4. Access the attributes of the **RelativeTimeFormat** object.
+ The **resolvedOptions** method of **RelativeTimeFormat** returns an object that contains all related attributes and values of the **RelativeTimeFormat** object. For a full list of attributes, see [ RelativeTimeFormatResolvedOptions](../reference/apis/js-apis-intl.md).
+
+ ```
+ var options = numberFormat.resolvedOptions();
+ ```
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-caution.gif b/en/application-dev/internationalization/public_sys-resources/icon-caution.gif
new file mode 100644
index 0000000000000000000000000000000000000000..6e90d7cfc2193e39e10bb58c38d01a23f045d571
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-caution.gif differ
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-danger.gif b/en/application-dev/internationalization/public_sys-resources/icon-danger.gif
new file mode 100644
index 0000000000000000000000000000000000000000..6e90d7cfc2193e39e10bb58c38d01a23f045d571
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-danger.gif differ
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-note.gif b/en/application-dev/internationalization/public_sys-resources/icon-note.gif
new file mode 100644
index 0000000000000000000000000000000000000000..6314297e45c1de184204098efd4814d6dc8b1cda
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-note.gif differ
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-notice.gif b/en/application-dev/internationalization/public_sys-resources/icon-notice.gif
new file mode 100644
index 0000000000000000000000000000000000000000..86024f61b691400bea99e5b1f506d9d9aef36e27
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-notice.gif differ
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-tip.gif b/en/application-dev/internationalization/public_sys-resources/icon-tip.gif
new file mode 100644
index 0000000000000000000000000000000000000000..93aa72053b510e456b149f36a0972703ea9999b7
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-tip.gif differ
diff --git a/en/application-dev/internationalization/public_sys-resources/icon-warning.gif b/en/application-dev/internationalization/public_sys-resources/icon-warning.gif
new file mode 100644
index 0000000000000000000000000000000000000000..6e90d7cfc2193e39e10bb58c38d01a23f045d571
Binary files /dev/null and b/en/application-dev/internationalization/public_sys-resources/icon-warning.gif differ
diff --git a/en/application-dev/quick-start/Readme-EN.md b/en/application-dev/quick-start/Readme-EN.md
index cb35fe17513b8b7111db96b57c7fa00605121b1f..f58cdcbec9ef695965bfdde9703880fbbc5e6ac8 100644
--- a/en/application-dev/quick-start/Readme-EN.md
+++ b/en/application-dev/quick-start/Readme-EN.md
@@ -1,14 +1,12 @@
-# Basics
+# Quick Start
-- [DevEco Studio \(OpenHarmony\) User Guide](deveco-studio-user-guide-for-openharmony.md)
- - [Overview](deveco-studio-overview.md)
- - [Version Change History](deveco-studio-release-notes.md)
- - [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md)
- - [Creating an OpenHarmony Project](create-openharmony-project.md)
- - [Using the Project Wizard to Create a Project](use-wizard-to-create-project.md)
- - [Importing a Sample to Create a Project](import-sample-to-create-project.md)
-
- - [Configuring the OpenHarmony App Signature](configuring-openharmony-app-signature.md)
- - [Installing and Running Your OpenHarmony App](installing-openharmony-app.md)
-- [Directory Structure](package-structure.md)
+- Getting Started
+ - [Preparations](start-overview.md)
+ - [Getting Started with eTS](start-with-ets.md)
+ - [Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md)
+ - [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md)
+
+- Development Fundamentals
+ - [Directory Structure](package-structure.md)
+ - [Resource File](basic-resource-file-categories.md)
diff --git a/en/application-dev/quick-start/configuring-openharmony-app-signature.md b/en/application-dev/quick-start/configuring-openharmony-app-signature.md
deleted file mode 100644
index d2d7da5cb09c862978fac8648d46a62baf5e6953..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/configuring-openharmony-app-signature.md
+++ /dev/null
@@ -1,178 +0,0 @@
-# Configuring the OpenHarmony App Signature
-
-- [Generating a Key Store and CSR](#section153146467405)
- - [In DevEco Studio](#section1298903211472)
- - [In a Command-Line Tool](#section1276462024811)
-
-- [Generating an App Certificate](#section136609429562)
-- [Generating the App Profile](#section2048641015325)
-- [Configuring App Signature Information](#section10152423193310)
-
-Before running and debugging the OpenHarmony app on a real device, you need to sign the app. This section describes how to configure the signature of an OpenHarmony app. Operation instructions are the same in _HUAWEI DevEco Studio User Guide_ except this section. For details, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387). See the following figure for the process of configuring app signature information.
-
-
-
-## Generating a Key Store and CSR
-
-OpenHarmony uses digital certificates \(.cer\) and **Profile** files \(.p7b\) to ensure app integrity. Before applying for these files, you need to generate a key store \(.p12\) and a certificate signing request \(.csr\). You can do so in DevEco Studio or a command-line tool.
-
-### In DevEco Studio
-
-1. On the menu bar, choose **Build** \> **Generate Key and CSR**.
-
- > **NOTE:**
- >If you have a local key, click **Skip** in the **Generate Key** window and use the key to generate a CSR file.
-
-2. In **Key Store File**, click **Choose Existing** to select an existing key store \(.p12 file that contains a key\) or **New** to create one. The following describes how to create a key store.
-
- 
-
-3. In the **Create Key Store** dialog box, set the following parameters and click **OK**.
-
- - **Key Store File**: Select the path for storing the key store.
- - **Password**: Set the key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
- - **Confirm Password**: Enter the key store password again.
-
- 
-
-4. In the **Generate Key** window, set the following parameters and click **Next**.
-
- - **Alias**: Enter the alias of the key, which is used to identify the key name. Do not lose the alias as it will be used later in configuring the signature.
- - **Password**: password of the key, which is automatically filled in and the same as the keystore password.
- - **Validity**: Specify the certificate validity period. A validity period of 25 years or longer is recommended to cover the entire lifecycle of your app/service.
- - **Certificate**: Enter basic certificate information.
-
- 
-
-5. In the **Generate CSR** window, select the key and set the storage path of the CSR file.
-
- 
-
-6. Click **OK**. You can then obtain the generated keystore file \(.p12\) and CSR file \(.csr\) from the storage path.
-
- 
-
-
-### In a Command-Line Tool
-
-Use the Keytool in the Open JDK to generate a CSR.
-
-1. Run the Keytool as an administrator.
-
- 
-
-2. Switch to the directory where the Keytool is located.
-
- 
-
-3. Run the following command to generate a key store. This example creates a key store named **ide\_demo\_app.p12** and saves it to the root directory of the D drive.
-
- ```
- keytool -genkeypair -alias "ide_demo_app" -keyalg EC -sigalg SHA256withECDSA -dname "C=CN,O=Organization,OU=Unit,CN=ide_demo_app" -keystore d:\\idedemokey.p12 -storetype pkcs12 -validity 9125 -storepass 123456Abc -keypass 123456Abc
- ```
-
- Parameters in the key store:
-
- > **NOTE:**
- >Record the values of **alias**, **storepass**, and **keypass**, which will be used in [Configuring App Signature Information](#section10152423193310).
-
- - **alias**: alias of the key, which is used to identify the key name.
- - **sigalg**: signature algorithm, which is automatically set to **SHA256withECDSA** and cannot be changed.
- - **dname**:
- - **C**: country/region code, such as **CN**.
- - **O**: organization name, such as **Organization**.
- - **OU**: organization unit name, such as **Unit**.
- - **CN**: your first name and last name. Set this parameter to be the same as **alias**.
-
- - **validity**: certificate validity period. It is recommended that you set this parameter to **9125** \(25 years\).
- - **storepass**: key store password, which must contain at least 8 characters that include two types of the following: uppercase letters, lowercase letters, digits, and special characters. Do not lose the password as it will be used later in configuring the signature.
- - **keypass**: password of the key. The value must be the same as that of **storepass**.
-
-4. Run the following command. After the command is executed, enter the **storepass** to generate a CSR in .csr format.
-
- ```
- keytool -certreq -alias "ide_demo_app" -keystore d:\\idedemokey.p12 -storetype pkcs12 -file d:\\idedemokey.csr
- ```
-
- Parameters in the CSR:
-
- - **alias**: The value must be the same as the alias set in 3.
- - **file**: name of the generated CSR. The file name extension is .csr.
-
-
-## Generating an App Certificate
-
-Use the CSR generated in [Generating a Key Store and CSR](#section153146467405) to generate the digital certificate required for app signing. The method is as follows:
-
-Go to the **Sdk\\toolchains\\lib** directory where the OpenHarmony SDK is saved \(see [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md) for details\) in the DevEco Studio installation directory, and run the following command in the CLI. If the **keytool** command cannot be executed, add the JDK environment variables to the system environment variables. You only need to modify the input and output to quickly generate a certificate. That is, modify **-infile** to specify the path of the CSR and **-outfile** to specify the name and path of the output certificate.
-
-```
-keytool -gencert -alias "OpenHarmony Application CA" -infile myApplication_ohos.csr -outfile myApplication_ohos.cer -keystore OpenHarmony.p12 -sigalg SHA384withECDSA -storepass 123456 -ext KeyUsage:"critical=digitalSignature" -validity 3650 -rfc
-```
-
-Refer to the following descriptions about the parameters in the command:
-
-- **alias**: alias of the CA private key used for issuing certificates. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-- **infile**: path of the CSR file.
-- **outfile**: name and path of the certificate chain file.
-- **keystore**: path of the CA key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified. Note that the **OpenHarmony.p12** file is not the .p12 file generated in [Generating a Key Store and CSR](#section153146467405).
-- **sigalg**: certificate signature algorithm. This parameter cannot be modified.
-- **storepass**: key store password. The password is **123456** and cannot be changed.
-- **ext**: certificate extension. This parameter cannot be modified.
-- **validity**: certificate validity period, which is user-defined.
-- **rfc**: specifies the output file format. This parameter cannot be modified.
-
-## Generating the App Profile
-
-The profile contains the following information about the OpenHarmony app: bundle name, digital certificate information, certificate permissions that can be applied for by the app, and devices where the app can be debugged \(the device list will be empty if the app type is Release\). Each app package must contain a profile file.
-
-Go to the **Sdk\\toolchains\\lib** directory, open the command-line tool, and run the following command.
-
-```
-java -jar provisionsigtool.jar sign --in UnsgnedReleasedProfileTemplate.json --out myApplication_ohos_Provision.p7b --keystore OpenHarmony.p12 --storepass 123456 --alias "OpenHarmony Application Profile Release" --sigAlg SHA256withECDSA --cert OpenHarmonyProfileRelease.pem --validity 365 --developer-id ohosdeveloper --bundle-name app bundle name --permission restricted permission name (optional) --permission restricted permission name (optional) --distribution-certificate myApplication_ohos.cer
-```
-
-Refer to the following descriptions about the parameters in the command:
-
-- **provisionsigtool**: tool for generating the profile which is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK.
-- **in**: path of the profile template which is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-- **out**: name and path of the profile.
-- **keystore**: path of the key store for issuing certificates. The name of the OpenHarmony key store file is **OpenHarmony.p12**. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-- **storepass**: key store password. The password is **123456** and cannot be changed.
-- **alias**: alias of the private key used for app signing. The CA private key of the OpenHarmony community is stored in the **OpenHarmony.p12** key store file. This parameter cannot be modified.
-- **sigalg**: certificate signature algorithm. This parameter cannot be modified.
-- **cert**: path of the certificate of the signature profile. The file is stored in **Sdk\\toolchains\\lib** of the OpenHarmony SDK. This parameter cannot be modified.
-- **validity**: certificate validity period, which is user-defined.
-- **developer-id**: developer ID, which is a user-defined character string.
-- **bundle-name**: app bundle name.
-- **permission** \(optional\): If permissions are not required, this field can be left empty. You can add multiple restricted permissions in the following way: ohos.permission.READ\_CONTACTS, ohos.permission.WRITE\_CONTACTS.
-- **distribution-certificate**: certificate generated in [Generating an App Certificate](#section136609429562).
-
-## Configuring App Signature Information
-
-Before debugging on a real device, use the private key file \(.p12\), certificate file \(.cer\), and profile file \(.p7b\) to sign the target module.
-
-Go to **File** \> **Project Structure** \> **Project** \> **Signing Configs** \> **debug**, deselect **Automatically generate signing**, and configure the signature information of the specified module.
-
-- **Store File**: Select the key store file with the file name extension .p12, which is generated in [Generating a Key Store and CSR](#section153146467405).
-- **Store Password**: Enter the key store password, which is the same as the key store password entered in [Generating a Key Store and CSR](#section153146467405).
-- **Key Alias**: Enter the alias of the key, which is the same as the alias entered in [Generating a Key Store and CSR](#section153146467405).
-- **Key Password**: Enter the key password, which is the same as the value of **Store Password**.
-- **Sign Alg**: Specify the signature algorithm, which has a fixed value of **SHA256withECDSA**.
-- **Profile File**: Select the .p7b profile file generated in [Generating the App Profile](#section2048641015325).
-- **Certpath File**: Select the .cer debug certificate generated in [Generating an App Certificate](#section136609429562).
-
-
-
-Click **OK** to save your configurations. Then you can view the signature configuration information in **build.gradle** of the project.
-
-
-
-By default, the type of a HAP package compiled using DevEco Studio is set to **debug**. For a release type, click the **OhosBuild Variants** tab in the lower left corner of the project and set the type to **release**. For details about how to compile and build the HAP, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/build_hap-0000001053342418).
-
-
-
-After the compilation is complete, you can obtain the HAP package of your OpenHarmony app from the **build** directory of the project.
-
-
-
diff --git a/en/application-dev/quick-start/configuring-openharmony-sdk.md b/en/application-dev/quick-start/configuring-openharmony-sdk.md
deleted file mode 100644
index fa4b76112a1e0055332535e019d9178f8ab4ffe3..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/configuring-openharmony-sdk.md
+++ /dev/null
@@ -1,195 +0,0 @@
-# Configuring the OpenHarmony SDK
-
-- [Prerequisites](#section164161442154812)
-- [Configuring the SDK Information](#section1265592425017)
-- [References](#section0384143616409)
- - [Setting Up the DevEco Studio Proxy](#section10129720184214)
- - [Setting Up the npm Proxy](#section19984059114316)
- - [Setting Up the Gradle Proxy](#section164211820465)
-
-
-To set up the OpenHarmony app development environment, configure the corresponding SDK information in DevEco Studio first.
-
-> **NOTE:**
->The OpenHarmony SDK is not applicable to HarmonyOS app development, with some necessary toolchains removed.
-
-## Prerequisites
-
-[DevEco Studio 3.0 Beta1](https://developer.harmonyos.com/cn/develop/deveco-studio#download) or later has been downloaded and installed.
-
-## Configuring the SDK Information
-
-DevEco Studio manages SDKs and toolchains using SDK Manager. OpenHarmony contains the following SDK packages:
-
-
-
Type
-
-
Package Name
-
-
Description
-
-
-
-
SDK
-
-
JS
-
-
SDK for JS.
-
-
-
eTS
-
-
SDK for Extended TypeScript (eTS).
-
-
-
SDK Tool
-
-
Toolchains
-
-
Includes compiling, packaging, signing, database management, and other tools that are required to develop OpenHarmony apps.
-
-
-
Previewer
-
-
OpenHarmony app previewer, which can be used to view the UI layout during app development.
-
-
-
-
-
-1. Open DevEco Studio. If this is the first time you are using it, select **Do not import settings** and click **OK**.
-2. Follow the wizard to set **npm registry**. DevEco Studio has been preconfigured with the corresponding registry. Click **Start using DevEco Studio** to go to the next step.
-
- > **NOTE:**
- >If the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy according to [References](#section0384143616409), and then download the OpenHarmony SDK.
-
- 
-
-3. Follow the wizard to download the SDK. By default, the OpenHarmony SDK will be downloaded. You can download the SDK to the default **user** directory or a local path that does not contain any Chinese characters. Then click **Next**.
-
- 
-
- > **NOTE:**
- >If you are not using DevEco Studio for the first time, the SDK download page may not be displayed. In this case, go to **Configure** \(or \) \> **Settings** \> **SDK Manager** \> **OpenHarmony SDK** and click **OpenHarmony SDK Location** to download the SDK.
-
-4. On the **Settings Confirmation** page, click **Next**. When the **License Agreement** dialog box appears, click **Accept**.
-
- 
-
-5. After the OpenHarmony SDK and tools are downloaded, click **Finish** to access the DevEco Studio welcome page.
-
- 
-
-
-## References
-
-Setting up the development environment requires that your network can directly access the Internet.
-
-Generally, only some enterprise networks rather than personal area networks or home networks require a proxy to access the Internet.
-
-If you are using DevEco Studio for the first time and the **Set up HTTP Proxy** page is displayed, it indicates that your network requires a proxy. In this case, set up the DevEco Studio proxy, npm proxy, and Gradle proxy.
-
-
-
-### Setting Up the DevEco Studio Proxy
-
-1. Start DevEco Studio. On the **Set up HTTP Proxy** page that is displayed, select **Manual proxy configuration** and set the HTTP proxy.
-
- > **NOTE:**
- >If this is not the first time you are using DevEco Studio:
- >- On the welcome page, choose **Configure** \(or \)** \> Settings \> Appearance & Behavior \> System Settings \> HTTP Proxy** to access the HTTP Proxy settings. \(For macOS, choose **Configure \> Preferences \> Appearance & Behavior \> System Settings \> HTTP Proxy**.\)
- >- When on a project page, choose **File \> Settings \> Appearance & Behavior \> System Settings \> HTTP Proxy** to access the HTTP Proxy settings. \(For macOS, choose **DevEco Studio \> Preferences \> Appearance & Behavior \> System Settings \> HTTP Proxy**.\)
-
- - **HTTP** parameters: **If you are not sure about the information, contact your network administrator.**
- - **Host name**: Enter the host name or IP address of the proxy server.
- - **Port number**: Enter the port number of the proxy server.
- - **No proxy for**: Enter the URLs or IP addresses which the PC can directly connect to without a proxy server. Use commas \(,\) to separate URLs and IP addresses.
-
- - **Proxy authentication** parameters: Set the parameters only when the proxy server requires authentication.
- - **Login**: Enter the user name used to access the proxy server.
- - **Password**: Enter the password used to access the proxy server.
- - **Remember**: Select this option to remember the password.
-
- 
-
-2. When you have finished, click **Check connection** and enter a URL to check the network connectivity. If the message "Connection successful" is displayed, it indicates that the proxy was set up successfully.
-3. Click **Next: Configure npm** to set up the npm proxy. For details, see [Setting Up the npm Proxy](#section19984059114316).
-
-### Setting Up the npm Proxy
-
-Follow the configuration wizard of DevEco Studio to configure the npm proxy information, which will be written into the **.npmrc** file in the **users/**_user name_ directory.
-
-> **NOTE:**
->The configuration wizard is displayed only the first time you install DevEco Studio. If the wizard is not displayed, manually add the proxy information to the **.npmrc** file in the **users/**_user name_ directory.
-
-- **npm registry**: Set the address of the npm registry. You are advised to select this option.
-- **HTTP proxy**: Proxy server information. By default, the value is the same as that of **HTTP proxy** of DevEco Studio.
-- **Enable Https Proxy**: Indicates whether to configure HTTPS proxy. You are advised to select this option.
-
-
-
-Click **Start using DevEco Studio**.
-
-If your proxy server requires the user name and password for authentication, set the user name and password as follows. If your proxy server does not require authentication, skip this step and follow the instructions in [Configuring the SDK Information](#section1265592425017).
-
-
-
-1. Go to the **Users** directory and open the **.npmrc** file.
-2. Modify the npm proxy information. Add the **user** and **password** fields to **proxy** and **https-proxy**. Note that the values may vary depending on the proxy. The following is an example:
-
- ```
- proxy=http://user:password@proxy.server.com:80
- https-proxy=http://user:password@proxy.server.com:80
- ```
-
- > **NOTE:**
- >If the password contains special characters, such as @, \#, and \*, the configuration may not take effect. You are advised to replace the special characters with ASCII codes and add "%" before the ASCII codes. Refer to the following for the mapping between common symbols and ASCII codes.
- >- !: %21
- >- @: %40
- >- \#: %23
- >- ¥: %24
- >- &: %26
- >- \*: %2A
-
-3. After the proxy is configured, open the CLI and run the following command to check whether the network is normal.
-
- ```
- npm info express
- ```
-
- If the following information is displayed after running the command, it indicates that the proxy has been set up successfully.
-
- 
-
-4. When you are done, follow the instructions in [Configuring the SDK Information](#section1265592425017).
-
-### Setting Up the Gradle Proxy
-
-1. Open **This PC**, and enter **%userprofile%** in the address box to access the user profile. \(For macOS, choose **Go** \> **Home**.\)
-
- 
-
-2. Create a **.gradle** folder if there is none.
-
- > **NOTE:**
- >Before creating a **.gradle** folder in macOS, set the system to show hidden files.
-
-3. Open the **.gradle** folder, create a **gradle** file, and change the file name extension to .properties.
-4. Add the following script to the **gradle.properties** file and save the file:
-
- Modify the host name, port number, user name, password, and proxy exceptions \(**nonProxyHosts**\) based on the actual condition. Separate values for **nonProxyHosts** with a vertical bar \(|\).
-
- ```
- systemProp.http.proxyHost=proxy.server.com
- systemProp.http.proxyPort=8080
- systemProp.http.nonProxyHosts=*.company.com|10.*|100.*
- systemProp.http.proxyUser=userId
- systemProp.http.proxyPassword=password
- systemProp.https.proxyHost=proxy.server.com
- systemProp.https.proxyPort=8080
- systemProp.https.nonProxyHosts=*.company.com|10.*|100.*
- systemProp.https.proxyUser=userId
- systemProp.https.proxyPassword=password
- ```
-
-
diff --git a/en/application-dev/quick-start/create-openharmony-project.md b/en/application-dev/quick-start/create-openharmony-project.md
deleted file mode 100644
index dcc274abe55e41f628a507fd3c57bbb02612e845..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/create-openharmony-project.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Creating an OpenHarmony Project
-
-- **[Using the Project Wizard to Create a Project](use-wizard-to-create-project.md)**
-
-- **[Importing a Sample to Create a Project](import-sample-to-create-project.md)**
-
-
diff --git a/en/application-dev/quick-start/deveco-studio-overview.md b/en/application-dev/quick-start/deveco-studio-overview.md
deleted file mode 100644
index b3b27928b539baebc573322dab9c3d20a26442d4..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/deveco-studio-overview.md
+++ /dev/null
@@ -1,93 +0,0 @@
-# Overview
-
-- [About the Document](#section189422248491)
-- [Restrictions](#section65191625782)
-- [DevEco Studio Evolution Roadmap](#section187875207166)
-
-## About the Document
-
-DevEco Studio is an integrated development environment \(IDE\) of HarmonyOS apps. As HarmonyOS is developed based on OpenHarmony, DevEco Studio can also be used to develop OpenHarmony apps.
-
-The process of developing an OpenHarmony app using DevEco Studio is the same as that of developing a HarmonyOS app. This document describes the differences between OpenHarmony and HarmonyOS app development.
-
-- **Environment setup**: You need to manually install the OpenHarmony SDK for the OpenHarmony app development. For details, see [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md).
-- **Creating an OpenHarmony project**: Create a project by using the project wizard or by importing a sample project. For details, see [Using the Project Wizard to Create a Project](use-wizard-to-create-project.md).
-- **Signature configuration for debugging**: To run an OpenHarmony app on a real device, you need to sign the app first. For instructions, see [Configuring the OpenHarmony App Signature](configuring-openharmony-app-signature.md).
-- **App running on a real device**: Push the OpenHarmony HAP package to the real device for installation. For details, see [Installing and Running Your OpenHarmony App](installing-openharmony-app.md).
-
-For details about how to use DevEco Studio, see [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387).
-
-## Restrictions
-
-- OpenHarmony supports only app development in eTS and JS.
-- Developing OpenHarmony apps in DevEco Studio is supported on Windows.
-
-DevEco Studio serves as a development tool for both OpenHarmony and HarmonyOS apps. Refer to the following table for descriptions about the functions not supported for OpenHarmony.
-
-
-
Feature
-
-
HarmonyOS
-
-
OpenHarmony
-
-
-
-
Service widgets
-
-
√
-
-
X
-
-
-
Automatic signing
-
-
√
-
-
X
-
-
-
Remote emulator
-
-
√
-
-
X
-
-
-
Local emulator
-
-
√
-
-
X
-
-
-
Using DevEco Studio for log viewing and optimization
-
-
√
-
-
X
-
-
-
Cloud testing
-
-
√
-
-
X
-
-
-
Security testing
-
-
√
-
-
X
-
-
-
-
-
-## DevEco Studio Evolution Roadmap
-
-Refer to the following figure for when the HUAWEI DevEco Studio support for OpenHarmony app development is available in different phases.
-
-
-
diff --git a/en/application-dev/quick-start/deveco-studio-release-notes.md b/en/application-dev/quick-start/deveco-studio-release-notes.md
deleted file mode 100644
index 267eadfc90914db13d9edd4dc2391f0ba0dea243..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/deveco-studio-release-notes.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# Version Change History
-
-- [V3.0 Beta2 \(2021-12-31\)](#section18825185716537)
- - [Version Compatibility](#section8155205312218)
- - [Version Change History](#section1655415918226)
-
-- [V3.0 Beta1 \(2021-09-29\)](#section21092033115018)
-
-## V3.0 Beta2 \(2021-12-31\)
-
-### Version Compatibility
-
-DevEco Studio 3.0 Beta2 is compatible with the module versions listed below.
-
-
-
Module
-
-
Version
-
-
Description
-
-
-
-
Gradle
-
-
7.3 (7.2 at minimum)
-
-
DevEco Studio has Gradle 7.3 preinstalled. No separate installation is required.
-
-
-
JDK
-
-
11.0.x
-
-
DevEco Studio has JDK 11 preinstalled. No separate installation is required.
-
-
-
OpenHarmony SDK
-
-
3.1.0.0 (API Version 8 Beta)
-
-
This version is compatible with SDKs of earlier versions.
-
-
-
Toolchinas
-
-
3.1.0.0
-
-
Update them to the latest version.
-
-
-
hap plug-in
-
-
3.0.5.2
-
-
-
decctest plug-in
-
-
1.2.7.2
-
-
-
-
-
-### Version Change History
-
-
-
New Features
-
Introduced the Chinese UI. By default, the UI is displayed in English. To enable the Chinese UI, go to Settings, choose Plugins > installed, and select Chinese (Simplified). Then, restart DevEco Studio for the settings to take effect.
Introduced support for OpenHarmony apps and services, with various debugging features, from breakpoint management and variable observation to stepping.
-
-
Enhanced Features
-
Updated the OpenHarmony SDK to 3.1.0.0, whose API version is API 8 Beta and corresponding compilation and building plugin is 3.0.5.2.
Added an ability template that supports low-code development: [Standard]Empty Ability.
Added eTS component preview: allows previewing of eTS components; requires compileSdkVersion 8 or later.
Added eTS livee preview: allows viewing of the attribute changes in real time as you make them; requires compileSdkVersion 8 or later.
-
-
-
-
-## V3.0 Beta1 \(2021-09-29\)
-
-
-
New Features
Added support for OpenHarmony SDK management. You can use SDK Manager to download and manage OpenHarmony SDKs.
Allowed for building of a single module during HAP compilation and building to accelerate building for multi-module projects; allowed for one-click re-building of HAPs, by automatically conducting the Clean Project operation before a HAP build.
-
-
Enhanced Features
Updated the compilation and building plugin to version 3.0.3.2.
Improved the JSON editor, which now enables quick rectification of resource index errors and instant access to resource values.
Provided Ohos and Project (default) views for projects, which you can switch between easily.
Enabled OpenHarmony projects to support Ark build.
Moved the supportSystem "standard" field, which is exclusive to OpenHarmony projects, from the module-level build.gradle file to the project-level build.gradle file.
-
-
-
-
-
diff --git a/en/application-dev/quick-start/deveco-studio-user-guide-for-openharmony.md b/en/application-dev/quick-start/deveco-studio-user-guide-for-openharmony.md
index 0ea1419dd6fd0c0f323e0b8264802d28149c91b7..3051831470bdb57400a00583c97913cbfda2523f 100644
--- a/en/application-dev/quick-start/deveco-studio-user-guide-for-openharmony.md
+++ b/en/application-dev/quick-start/deveco-studio-user-guide-for-openharmony.md
@@ -1,15 +1,2 @@
-# DevEco Studio \(OpenHarmony\) User Guide
-
-- **[Overview](deveco-studio-overview.md)**
-
-- **[Version Change History](deveco-studio-release-notes.md)**
-
-- **[Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md)**
-
-- **[Creating an OpenHarmony Project](create-openharmony-project.md)**
-
-- **[Configuring the OpenHarmony App Signature](configuring-openharmony-app-signature.md)**
-
-- **[Installing and Running Your OpenHarmony App](installing-openharmony-app.md)**
-
+# DevEco Studio \(OpenHarmony\) User Guide
diff --git a/en/application-dev/quick-start/figures/1.png b/en/application-dev/quick-start/figures/1.png
deleted file mode 100755
index cb05a7cb0fa33a9d9074f4424a3851478935ff33..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/1.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/2.png b/en/application-dev/quick-start/figures/2.png
deleted file mode 100755
index afdab82267fcd7d5eacae76eba500baa3bbecd40..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/2.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/3.png b/en/application-dev/quick-start/figures/3.png
deleted file mode 100755
index 85345789b60927729e9243798fe122c64ca92687..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/3.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001113808114.png b/en/application-dev/quick-start/figures/en-us_image_0000001113808114.png
deleted file mode 100644
index 406baf7cc191f03cb51b1376bddce9d40751ef03..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001113808114.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001115066116.png b/en/application-dev/quick-start/figures/en-us_image_0000001115066116.png
deleted file mode 100644
index 357798e173fa7e3b419cc5990aa0737925e1f7b9..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001115066116.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001117479776.png b/en/application-dev/quick-start/figures/en-us_image_0000001117479776.png
deleted file mode 100644
index 9250f90cf1e377c8bb33adf9965436ed7ddbadbf..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001117479776.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001117639668.png b/en/application-dev/quick-start/figures/en-us_image_0000001117639668.png
deleted file mode 100644
index ba3923fef0ad89fa38fa170d2680931d1eb1ea55..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001117639668.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001118018088.png b/en/application-dev/quick-start/figures/en-us_image_0000001118018088.png
deleted file mode 100644
index d4e1c7bd6773fc5b3ab5b473e28593110f3c820f..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001118018088.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001118018452.png b/en/application-dev/quick-start/figures/en-us_image_0000001118018452.png
deleted file mode 100644
index 74b66efabbbbbea4752f0296985486369a0cdc74..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001118018452.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001119560738.png b/en/application-dev/quick-start/figures/en-us_image_0000001119560738.png
deleted file mode 100644
index 9a84c3f66275c8ea2a50b9ba9ab0ead3842274cc..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001119560738.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png b/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png
deleted file mode 100644
index 5ee6a55e53e57843300bd5ec0cce4a175e97a29e..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001152459178.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001152674854.png b/en/application-dev/quick-start/figures/en-us_image_0000001152674854.png
deleted file mode 100644
index 6bef885f7c487473ca1b329d41c6414735555b42..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001152674854.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001155643492.png b/en/application-dev/quick-start/figures/en-us_image_0000001155643492.png
deleted file mode 100644
index 9e3afd2b96c1a01b3e966c37e60755d1f179363c..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001155643492.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001162463400.png b/en/application-dev/quick-start/figures/en-us_image_0000001162463400.png
deleted file mode 100644
index 48239f38c31b907155d7b0501401ca9dd8635d73..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001162463400.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163314102.png b/en/application-dev/quick-start/figures/en-us_image_0000001163314102.png
deleted file mode 100644
index 286a49def18618c79088deeb49203969ac6ce4c0..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163314102.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163472654.png b/en/application-dev/quick-start/figures/en-us_image_0000001163472654.png
deleted file mode 100644
index 5328a3c1b62eb8281e316d5ae4a6ca11694ec4a2..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163472654.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163632602.png b/en/application-dev/quick-start/figures/en-us_image_0000001163632602.png
deleted file mode 100644
index 10c5cf41ab78ea58c194fe1ed0429352e85a88a8..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163632602.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163839541.png b/en/application-dev/quick-start/figures/en-us_image_0000001163839541.png
deleted file mode 100644
index f278f73fb4cd0dba70cae1835dd7a45d2686038b..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163839541.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163915523.png b/en/application-dev/quick-start/figures/en-us_image_0000001163915523.png
deleted file mode 100644
index 352eaed40ac96dc5d3bae82591e5c801daaa8d56..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163915523.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001163918627.png b/en/application-dev/quick-start/figures/en-us_image_0000001163918627.png
deleted file mode 100644
index 6967c6b140c7e07003fc4548989ea78d9e5fc940..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001163918627.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001164417356.png b/en/application-dev/quick-start/figures/en-us_image_0000001164417356.png
deleted file mode 100644
index 97795b40abbea9f58aabe62dd7643eca208315e3..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001164417356.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001164498191.png b/en/application-dev/quick-start/figures/en-us_image_0000001164498191.png
deleted file mode 100644
index 30efd063397893ff925743b681f943696f10512b..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001164498191.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001164577336.png b/en/application-dev/quick-start/figures/en-us_image_0000001164577336.png
deleted file mode 100644
index 1127bbfabc9ef766284eec12c574096f8bb45ac3..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001164577336.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001166582138.png b/en/application-dev/quick-start/figures/en-us_image_0000001166582138.png
deleted file mode 100644
index 36dc2d05ca4eb23505a73cb0d1606afd3bf844d8..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001166582138.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001166740700.png b/en/application-dev/quick-start/figures/en-us_image_0000001166740700.png
deleted file mode 100644
index cedbb0ed07d4249c736f2b358593141f2f4cdc8e..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001166740700.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001196050928.png b/en/application-dev/quick-start/figures/en-us_image_0000001196050928.png
deleted file mode 100644
index dd75ea8e2b874aae201ecab3254fac3a7bce8fbc..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001196050928.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001202722349.png b/en/application-dev/quick-start/figures/en-us_image_0000001202722349.png
deleted file mode 100644
index 99330a4f3ef2978dd6736d96e00c88cea8d25f32..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001202722349.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001207744539.png b/en/application-dev/quick-start/figures/en-us_image_0000001207744539.png
deleted file mode 100644
index 5e1269e9e8fb620f8ed6051395c727590e6dc1bc..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001207744539.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001208006117.png b/en/application-dev/quick-start/figures/en-us_image_0000001208006117.png
deleted file mode 100644
index 5c576d84b0ca4b369cdaac5aa7de19718628bc37..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001208006117.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001208274069.png b/en/application-dev/quick-start/figures/en-us_image_0000001208274069.png
deleted file mode 100644
index 74b66efabbbbbea4752f0296985486369a0cdc74..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001208274069.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001208394019.png b/en/application-dev/quick-start/figures/en-us_image_0000001208394019.png
deleted file mode 100644
index aa7f5ffb0d59c7ab7a1784bfde775aeccc16a424..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001208394019.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001209817299.png b/en/application-dev/quick-start/figures/en-us_image_0000001209817299.png
deleted file mode 100644
index aa7f5ffb0d59c7ab7a1784bfde775aeccc16a424..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001209817299.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001210018359.png b/en/application-dev/quick-start/figures/en-us_image_0000001210018359.png
deleted file mode 100644
index 87932d32907fb35dbafef1180daabbf6191d022a..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001210018359.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001212062065.png b/en/application-dev/quick-start/figures/en-us_image_0000001212062065.png
deleted file mode 100644
index 708b49814e270289c6d1c96520aa6d90ba0edb9c..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001212062065.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001212142015.png b/en/application-dev/quick-start/figures/en-us_image_0000001212142015.png
deleted file mode 100644
index 74b66efabbbbbea4752f0296985486369a0cdc74..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001212142015.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215066868.png b/en/application-dev/quick-start/figures/en-us_image_0000001215066868.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3afe4570f4a839aaa531dea2b1889f318c81f71
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215066868.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215206886.png b/en/application-dev/quick-start/figures/en-us_image_0000001215206886.png
new file mode 100644
index 0000000000000000000000000000000000000000..e90d0dbca27908da2964babcba1bc74876b04991
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215206886.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215226858.png b/en/application-dev/quick-start/figures/en-us_image_0000001215226858.png
new file mode 100644
index 0000000000000000000000000000000000000000..e2444e0c8488f6632a098585409352a8ce8c7303
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215226858.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215227618.png b/en/application-dev/quick-start/figures/en-us_image_0000001215227618.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3afe4570f4a839aaa531dea2b1889f318c81f71
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215227618.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215386842.png b/en/application-dev/quick-start/figures/en-us_image_0000001215386842.png
new file mode 100644
index 0000000000000000000000000000000000000000..335548669bb32a22f146d76f9ab88527e52f515a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215386842.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215388136.png b/en/application-dev/quick-start/figures/en-us_image_0000001215388136.png
new file mode 100644
index 0000000000000000000000000000000000000000..890e12eee8b4534a2b94206c6b73edc81d1ee3ee
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215388136.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001215388262.png b/en/application-dev/quick-start/figures/en-us_image_0000001215388262.png
new file mode 100644
index 0000000000000000000000000000000000000000..890e12eee8b4534a2b94206c6b73edc81d1ee3ee
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001215388262.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216084724.png b/en/application-dev/quick-start/figures/en-us_image_0000001216084724.png
new file mode 100644
index 0000000000000000000000000000000000000000..a8fac2a024e51aeb0439463dab83f2763fa3fa76
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216084724.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216239356.png b/en/application-dev/quick-start/figures/en-us_image_0000001216239356.png
new file mode 100644
index 0000000000000000000000000000000000000000..fbbde9923a131d3ab69257b28cfe33ca2a1040cf
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216239356.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216269940.png b/en/application-dev/quick-start/figures/en-us_image_0000001216269940.png
new file mode 100644
index 0000000000000000000000000000000000000000..0b9e04b55e1f9dfca33d97b6b0b80635f6aa1adf
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216269940.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216288558.png b/en/application-dev/quick-start/figures/en-us_image_0000001216288558.png
new file mode 100644
index 0000000000000000000000000000000000000000..7795d74c5ec4915a1f2d6164e0625e308704528a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216288558.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216446670.gif b/en/application-dev/quick-start/figures/en-us_image_0000001216446670.gif
new file mode 100644
index 0000000000000000000000000000000000000000..5a7b05bfcdeb8063c3a0c16dae62f3f7168f783d
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216446670.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216448880.gif b/en/application-dev/quick-start/figures/en-us_image_0000001216448880.gif
new file mode 100644
index 0000000000000000000000000000000000000000..bc9bca615d9243ccb1121983f66ba30a8b9e3b05
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216448880.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216600980.gif b/en/application-dev/quick-start/figures/en-us_image_0000001216600980.gif
new file mode 100644
index 0000000000000000000000000000000000000000..58fa6bc0485a3bca823313c4c84e3be37a1ecb05
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216600980.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001216614132.gif b/en/application-dev/quick-start/figures/en-us_image_0000001216614132.gif
new file mode 100644
index 0000000000000000000000000000000000000000..14709a48539ea940ae74ae9c3a4a4e569a4d3b75
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001216614132.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001217047316.png b/en/application-dev/quick-start/figures/en-us_image_0000001217047316.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001217047316.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001217526428.png b/en/application-dev/quick-start/figures/en-us_image_0000001217526428.png
new file mode 100644
index 0000000000000000000000000000000000000000..2c026736133d41d80a1b92eb0db230dd6c0a7feb
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001217526428.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001217527892.png b/en/application-dev/quick-start/figures/en-us_image_0000001217527892.png
new file mode 100644
index 0000000000000000000000000000000000000000..0b9e04b55e1f9dfca33d97b6b0b80635f6aa1adf
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001217527892.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223397122.png b/en/application-dev/quick-start/figures/en-us_image_0000001223397122.png
new file mode 100644
index 0000000000000000000000000000000000000000..42b475577bcc805372336be8971afa5c69c284bd
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223397122.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223556342.png b/en/application-dev/quick-start/figures/en-us_image_0000001223556342.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab2ae3c740dfee9b303d6319516c9facb3574184
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223556342.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223557290.png b/en/application-dev/quick-start/figures/en-us_image_0000001223557290.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e093d7a983e03a37143357001eefd57c3df2c3c
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223557290.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223558810.png b/en/application-dev/quick-start/figures/en-us_image_0000001223558810.png
new file mode 100644
index 0000000000000000000000000000000000000000..b9c3f899421f61b39480b831a662eebf6530100f
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223558810.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223558814.png b/en/application-dev/quick-start/figures/en-us_image_0000001223558814.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab2ae3c740dfee9b303d6319516c9facb3574184
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223558814.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223716826.png b/en/application-dev/quick-start/figures/en-us_image_0000001223716826.png
new file mode 100644
index 0000000000000000000000000000000000000000..14dc492cb36d22c79d22bea78d0f66508867291e
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223716826.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223717294.png b/en/application-dev/quick-start/figures/en-us_image_0000001223717294.png
new file mode 100644
index 0000000000000000000000000000000000000000..75910aaf0daa22be2c0b56ae94febaa672df7424
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223717294.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223722586.png b/en/application-dev/quick-start/figures/en-us_image_0000001223722586.png
new file mode 100644
index 0000000000000000000000000000000000000000..8ed9b0d3565e5fbb2f7897bc876369ebae5a8598
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223722586.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223877162.png b/en/application-dev/quick-start/figures/en-us_image_0000001223877162.png
new file mode 100644
index 0000000000000000000000000000000000000000..02d730cadf10899edd91f94ce4cb8badd3ba821c
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223877162.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223877210.png b/en/application-dev/quick-start/figures/en-us_image_0000001223877210.png
new file mode 100644
index 0000000000000000000000000000000000000000..9ce82237297b06c04113d0368d7145661de0d997
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223877210.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001223882030.png b/en/application-dev/quick-start/figures/en-us_image_0000001223882030.png
new file mode 100644
index 0000000000000000000000000000000000000000..045487dc8fa30e8f87cd3fdd5c87e8ec17715c94
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001223882030.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001239855207.png b/en/application-dev/quick-start/figures/en-us_image_0000001239855207.png
deleted file mode 100644
index 83ef94f222a2cc30f036057908960badedd4aeca..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001239855207.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001247125297.png b/en/application-dev/quick-start/figures/en-us_image_0000001247125297.png
deleted file mode 100644
index 32771bf5f9639aa8ebdd1922f8088965404674ca..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001247125297.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001248045243.png b/en/application-dev/quick-start/figures/en-us_image_0000001248045243.png
deleted file mode 100644
index 61535cb2fe6b4197e95cff8691fe27973c5ecde8..0000000000000000000000000000000000000000
Binary files a/en/application-dev/quick-start/figures/en-us_image_0000001248045243.png and /dev/null differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001259866741.png b/en/application-dev/quick-start/figures/en-us_image_0000001259866741.png
new file mode 100644
index 0000000000000000000000000000000000000000..335548669bb32a22f146d76f9ab88527e52f515a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001259866741.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001259987441.png b/en/application-dev/quick-start/figures/en-us_image_0000001259987441.png
new file mode 100644
index 0000000000000000000000000000000000000000..335548669bb32a22f146d76f9ab88527e52f515a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001259987441.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260106745.png b/en/application-dev/quick-start/figures/en-us_image_0000001260106745.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3afe4570f4a839aaa531dea2b1889f318c81f71
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260106745.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260107497.png b/en/application-dev/quick-start/figures/en-us_image_0000001260107497.png
new file mode 100644
index 0000000000000000000000000000000000000000..335548669bb32a22f146d76f9ab88527e52f515a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260107497.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260226691.png b/en/application-dev/quick-start/figures/en-us_image_0000001260226691.png
new file mode 100644
index 0000000000000000000000000000000000000000..6d8b4f343d3744e245a656987a85a6da2c9bb18e
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260226691.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260227453.png b/en/application-dev/quick-start/figures/en-us_image_0000001260227453.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3afe4570f4a839aaa531dea2b1889f318c81f71
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260227453.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260684127.png b/en/application-dev/quick-start/figures/en-us_image_0000001260684127.png
new file mode 100644
index 0000000000000000000000000000000000000000..2c026736133d41d80a1b92eb0db230dd6c0a7feb
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260684127.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001260928361.gif b/en/application-dev/quick-start/figures/en-us_image_0000001260928361.gif
new file mode 100644
index 0000000000000000000000000000000000000000..43a0ab27545eb4f8095eec4bbb9490607317f05d
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001260928361.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001261017331.gif b/en/application-dev/quick-start/figures/en-us_image_0000001261017331.gif
new file mode 100644
index 0000000000000000000000000000000000000000..240e9fb76b0f27d35d53b5b1bd304e39fc80aaf5
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001261017331.gif differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001261142799.png b/en/application-dev/quick-start/figures/en-us_image_0000001261142799.png
new file mode 100644
index 0000000000000000000000000000000000000000..86ff220370fc26319a4a23434d70e2508d8f1b9a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001261142799.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001261809595.png b/en/application-dev/quick-start/figures/en-us_image_0000001261809595.png
new file mode 100644
index 0000000000000000000000000000000000000000..164371727ee8a351e2c42f4b3ecab9175e088e7c
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001261809595.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001261979271.png b/en/application-dev/quick-start/figures/en-us_image_0000001261979271.png
new file mode 100644
index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001261979271.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001262127855.png b/en/application-dev/quick-start/figures/en-us_image_0000001262127855.png
new file mode 100644
index 0000000000000000000000000000000000000000..86ff220370fc26319a4a23434d70e2508d8f1b9a
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001262127855.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001262206247.png b/en/application-dev/quick-start/figures/en-us_image_0000001262206247.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001262206247.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001262207811.png b/en/application-dev/quick-start/figures/en-us_image_0000001262207811.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c1ea01d448434e7cfd94e174474e72b57d3b4cc
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001262207811.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001262219043.png b/en/application-dev/quick-start/figures/en-us_image_0000001262219043.png
new file mode 100644
index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001262219043.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001262339067.png b/en/application-dev/quick-start/figures/en-us_image_0000001262339067.png
new file mode 100644
index 0000000000000000000000000000000000000000..12978dc861aaa1f826404d9c6838bb8628381615
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001262339067.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001268077317.png b/en/application-dev/quick-start/figures/en-us_image_0000001268077317.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e093d7a983e03a37143357001eefd57c3df2c3c
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001268077317.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001268082945.png b/en/application-dev/quick-start/figures/en-us_image_0000001268082945.png
new file mode 100644
index 0000000000000000000000000000000000000000..55d41f7eb98b1c80bc5f85ea99be6b73bcdd7c1d
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001268082945.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001268198893.png b/en/application-dev/quick-start/figures/en-us_image_0000001268198893.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab2ae3c740dfee9b303d6319516c9facb3574184
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001268198893.png differ
diff --git a/en/application-dev/quick-start/figures/en-us_image_0000001268283201.png b/en/application-dev/quick-start/figures/en-us_image_0000001268283201.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e093d7a983e03a37143357001eefd57c3df2c3c
Binary files /dev/null and b/en/application-dev/quick-start/figures/en-us_image_0000001268283201.png differ
diff --git a/en/application-dev/quick-start/import-sample-to-create-project.md b/en/application-dev/quick-start/import-sample-to-create-project.md
deleted file mode 100644
index b05970a735b5a22a45f5717436f9261e721e91dc..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/import-sample-to-create-project.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Importing a Sample to Create a Project
-
-> **NOTE:**
->This feature applies to OpenHarmony projects created using DevEco Studio 2.1 Release or later.
-
-After the OpenHarmony SDK is configured, you can get started to develop your app by **importing a sample project**.
-
-1. On the DevEco Studio welcome page, select **Configure** or click the  icon, and choose **Settings** \> **Version Control** \> **Git**. Then click **Test** to check whether the Git tool has been installed.
- - If the tool has been installed, import a sample by following the instructions in Step 2.
-
- 
-
- - If the tool hasn't been installed, click **Download and Install**. DevEco Studio will automatically download and install it. Then import a sample by following the instructions in Step 2.
-
- 
-
-2. On the DevEco Studio welcome page, click **Import Sample** to import a sample project.
-
- 
-
-3. Choose **OpenHarmony Samples** \> **common** \> **JsHelloWorld** \> **Next**.
-
- 
-
-4. Configure **App Name** and **Project Location** and click **Finish**. Wait until the sample project is imported.
-
- 
-
-5. When the project is successfully synced, start developing your OpenHarmony app.
-
- 
-
-
diff --git a/en/application-dev/quick-start/installing-openharmony-app.md b/en/application-dev/quick-start/installing-openharmony-app.md
deleted file mode 100644
index 79277bcccc4d9c24b3786b7d71b78c8e01dade63..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/installing-openharmony-app.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Installing and Running Your OpenHarmony App
-
-You can install your OpenHarmony app in either of the following methods:
-
-- DevEco Studio: Connect your device where the app is stored to DevEco Studio, and then click  to install the app.
-- hdc: Run commands to install the app.
-
- You can manually obtain the hdc tool from the open-source repository. Then, run the tool commands to install an HAP file on the device.
-
- The tool commands are as follows:
-
- - App installation
-
- **install \[-r/-d/-g\] _package_**
-
- Example:
-
- ```
- hdc_std install E:\hwadmin.hap
- ```
-
- - Log capturing
-
- **hilog**
-
- Example:
-
- ```
- hdc_std hilog
- ```
-
- For details about how to use hdc and the command format, see [hdc\_std Usage Guidelines](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/subsys-toolchain-hdc-guide.md).
-
diff --git a/en/application-dev/quick-start/package-structure.md b/en/application-dev/quick-start/package-structure.md
index 60e37c8be42abf03840aa7a0236e00a5810aa542..b9e4caa013ad468f43ca0a7a3ee486623018a028 100644
--- a/en/application-dev/quick-start/package-structure.md
+++ b/en/application-dev/quick-start/package-structure.md
@@ -24,7 +24,7 @@ The following is an example of the configuration file:
"package": "com.example.myapplication.entrymodule",
"name": ".MyApplication",
"deviceType": [
- "phone"
+ "default"
],
"distro": {
"deliveryWithInstall": true,
diff --git a/en/application-dev/quick-start/start-overview.md b/en/application-dev/quick-start/start-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..4d3323b64842149c07d51dc14745bae8d3f969c9
--- /dev/null
+++ b/en/application-dev/quick-start/start-overview.md
@@ -0,0 +1,46 @@
+# Preparations
+
+This document is intended for novices at developing OpenHarmony applications. It will introduce you to the OpenHarmony project directory structure and application development process, by walking you through a stripped-down, real-world example – building two pages and implementing redirection between pages. The following figure shows how the pages look on the DevEco Studio Previewer.
+
+
+
+
+
+Before you begin, there are some basic concepts that will help you better understand OpenHarmony: UI framework and ability.
+
+
+## Basic Concepts
+
+
+### UI Framework
+
+OpenHarmony provides a UI development framework, known as ArkUI. ArkUI provides capabilities you may need for application UI development, including a wide array of components, layout calculation, animation, UI interaction, and drawing capabilities.
+
+ArkUI comes with two development paradigms: JavaScript-based web-like development paradigm (web-like development paradigm for short) and TypeScript-based declarative development paradigm (declarative development paradigm for short). You can choose whichever development paradigm that aligns with your practice.
+
+| **Development Paradigm** | **Language** | **UI Update Mode** | **Applicable To** | **Intended Audience** |
+| -------- | -------- | -------- | -------- | -------- |
+| Web-like development paradigm | JavaScript | Data-driven | Applications and service widgets with simple UIs | Frontend web developers |
+| Declarative development paradigm | Extended TypeScript (eTS) | Data-driven | Applications involving technological sophistication and teamwork | Mobile application and system application developers |
+
+For DevEco Studio V2.2 Beta1 and later versions, both the traditional coding mode and the low-code mode are supported when the JS language is used for development. On the OpenHarmony low-code development pages, you can design your app UI in an efficient, intuitive manner, with a wide array of UI editing features complying with JS Development Specifications.
+
+
+### Ability
+
+An ability is an abstraction of a capability that an application can provide. The **Ability** class is an essential component to OpenHarmony applications. An application may provide various capabilities, and so it can have multiple abilities. These abilities can be deployed together or independently from each other.
+
+Abilities are classified into two types: [Feature Ability (FA)](../../glossary.md#f) and [Particle Ability (PA)](../../glossary.md#p). Each type has their respective templates for different capabilities. FAs support only the Page template (also called the [Page ability](../ability/fa-pageability.md)), which is used to provide the capability of interacting with users. A Page ability consists of one or more pages. The figure below shows the relationship between a Page ability and pages.
+
+
+
+This document provides a Page ability instance with two pages. For more information about ability development, see [Ability Development](../ability/fa-brief.md).
+
+
+## Tool Preparation
+
+1. Install the latest version of [DevEco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta_openharmony).
+
+2. Install DevEco Studio and configure the development environment. For details, see [Configuring the OpenHarmony SDK](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-setting-up-environment-0000001263160443).
+
+When you are done, follow the instructions in [Getting Started with eTS](start-with-ets.md),[Getting Started with JavaScript in the Traditional Coding Approach](start-with-js.md), and [Getting Started with JavaScript in the Low-Code Approach](start-with-js-low-code.md).
diff --git a/en/application-dev/quick-start/start-with-ets.md b/en/application-dev/quick-start/start-with-ets.md
new file mode 100644
index 0000000000000000000000000000000000000000..81510bef091d24e28c39acca75ab2f701151eaab
--- /dev/null
+++ b/en/application-dev/quick-start/start-with-ets.md
@@ -0,0 +1,250 @@
+# Getting Started with eTS
+
+>  **Note:**
+> To use eTS, your DevEco Studio must be V3.0.0.601 Beta1 or later.
+>
+> For best possible results, use [DevEco Studio V3.0.0.900 Beta3](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta_openharmony) for your development.
+
+
+## Creating an eTS Project
+
+1. Open DevEco Studio, choose **File** > **New** > **Create Project**, select **Empty Ability**, and click **Next**.
+ 
+
+2. On the project configuration page, set **UI Syntax** to **eTS** and retain the default values for other parameters.
+ 
+
+3. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.
+
+
+## eTS Project Files
+
+- **entry** : OpenHarmony project module, which can be built into an ability package (HAP).
+ - **src > main > ets** : a collection of eTS source code.
+ - **src > main > ets > MainAbility** : entry to your application/service.
+ - **src > main > ets > MainAbility > pages** : pages contained in **MainAbility**.
+ - **src > main > ets > MainAbility > app.ets** : ability lifecycle file.
+ - **src > main > resources** : a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files.
+ - **src > main > config.json** : module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file.
+ - **build-profile.json5** : module information and build configuration options, including **buildOption target**.
+ - **hvigorfile.js** : module-level compilation and build task script. You can customize related tasks and code implementation.
+- **build-profile.json5** : application-level configuration information, including the signature and product configuration.
+- **hvigorfile.js** : application-level compilation and build task script.
+
+
+## Building the First Page
+
+1. Use the **Text** component.
+ After the project synchronization is complete, choose **entry** > **src** > **main** > **ets** > **MainAbility** > **pages** in the **Project** window and open the **index.ets** file. You can see that the file contains a **<Text>** component. The sample code in the **index.ets** file is shown below:
+
+
+ ```
+ @Entry
+ @Component
+ struct Index {
+ @State message: string = 'Hello World'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
+ ```
+
+2. Add a **<Button>** component.
+ On the default page, add a **<Button>** component to accept user clicks and implement redirection to another page. The sample code in the **index.ets** file is shown below:
+
+
+ ```
+ @Entry
+ @Component
+ struct Index {
+ @State message: string = 'Hello World'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ // Add a button to accept user clicks.
+ Button() {
+ Text('Next')
+ .fontSize(30)
+ .fontWeight(FontWeight.Bold)
+ }
+ .type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .width('40%')
+ .height('5%')
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
+ ```
+
+3. On the toolbar in the upper right corner of the editing window, click **Previewer** to open the Previewer. Below is how the first page looks on the Previewer.
+
+ 
+
+
+## Building the Second Page
+
+1. Create the second page.
+ In the **Project** window, choose **entry** > **src** > **main** > **ets** > **MainAbility**, right-click the **pages** folder, choose **New** > **Page**, name the page **second**, and click **Finish**. Below is the structure of the **pages** folder:
+
+ 
+
+2. Add **<Text>** and **<Button>** components.
+ Add **<Text>** and **<Button>** components and set their styles, as you do for the first page. The sample code in the **second.ets** file is shown below:
+
+
+ ```
+ @Entry
+ @Component
+ struct Second {
+ @State message: string = 'Hi there'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ Button() {
+ Text('Back')
+ .fontSize(25)
+ .fontWeight(FontWeight.Bold)
+ }
+ .type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .width('40%')
+ .height('5%')
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
+ ```
+
+
+## Implementing Page Redirection
+
+You can implement page redirection through the page router, which finds the target page based on the page URI. Import the **router** module and then perform the steps below:
+
+1. Implement redirection from the first page to the second page.
+ In the **index.ets** file of the first page, bind the **onClick** event to the **Next** button so that clicking the button redirects the user to the second page. The sample code in the **index.ets** file is shown below:
+
+
+ ```
+ import router from '@system.router';
+
+ @Entry
+ @Component
+ struct Index {
+ @State message: string = 'Hello World'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ // Add a button to accept user clicks.
+ Button() {
+ Text('Next')
+ .fontSize(30)
+ .fontWeight(FontWeight.Bold)
+ }
+ .type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .width('40%')
+ .height('5%')
+ // Bind the onClick event to the Next button so that clicking the button redirects the user to the second page.
+ .onClick(() => {
+ router.push({ uri: 'pages/second' })
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
+ ```
+
+2. Implement redirection from the second page to the first page.
+ In the **second.ets** file of the second page, bind the **onClick** event to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.ets** file is shown below:
+
+
+ ```
+ import router from '@system.router';
+
+ @Entry
+ @Component
+ struct Second {
+ @State message: string = 'Hi there'
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ Button() {
+ Text('Back')
+ .fontSize(25)
+ .fontWeight(FontWeight.Bold)
+ }
+ .type(ButtonType.Capsule)
+ .margin({
+ top: 20
+ })
+ .backgroundColor('#0D9FFB')
+ .width('40%')
+ .height('5%')
+ // Bind the onClick event to the Back button so that clicking the button redirects the user back to the first page.
+ .onClick(() => {
+ router.back()
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+ }
+ ```
+
+3. Open the **index.ets** file and click  in the Previewer to refresh the file. The figure below shows the effect.
+ 
+
+
+## Running the Application on a Real Device
+
+1. Connect the development board running the OpenHarmony standard system to the computer.
+
+2. Choose **File** > **Project Structure** > **Project** > **Signing Configs**, select **Automatically generate signing**, wait until the automatic signing is complete, and click **OK**, as shown below.
+ 
+
+3. On the toolbar in the upper right corner of the editing window, click . The display effect is shown in the figure below.
+ 
+
+Congratulations! You have finished developing your OpenHarmony application in eTS. To learn more about OpenHarmony, see [OpenHarmony Overview](../application-dev-guide.md)
diff --git a/en/application-dev/quick-start/start-with-js-low-code.md b/en/application-dev/quick-start/start-with-js-low-code.md
new file mode 100644
index 0000000000000000000000000000000000000000..572e49f734ae2f32a98695576229a0a058d468b0
--- /dev/null
+++ b/en/application-dev/quick-start/start-with-js-low-code.md
@@ -0,0 +1,156 @@
+# Getting Started with JavaScript in the Low-Code Approach
+
+>  **Note:**
+> This feature will be available in DevEco Studio V2.2 Beta1 and later versions.
+>
+> For best possible results, use [DevEco Studio V3.0.0.900 Beta3](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta_openharmony) for your development.
+
+
+On the OpenHarmony low-code development pages, you can design your app UI in an efficient, intuitive manner, with a wide array of UI editing features complying with JS Development Specifications.
+
+
+You can develop applications or services in the low-code approach using either of the following methods:
+
+
+- Create a project that supports low-code development. This method is used as an example in this topic.
+
+- In an existing project, create a Visual file for development.
+
+
+## Creating a Project That Supports Low-Code Development
+
+>  **Note:**
+> This feature is available in DevEco Studio 3.0 Beta2 and later versions and works with compileSdkVersion 7 or later.
+
+1. Open DevEco Studio, choose **File** > **New** > **Create Project**, select **Empty Ability**, and click **Next**.
+ 
+2. Go to the project configuration page, select **Enable Super Visual**, set **UI Syntax** to **JS**, and retain the default values for other parameters.
+
+ 
+
+3. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.
+
+
+## Low-code Project Files
+
+After the project synchronization is complete, a low-code directory structure is automatically generated in the project, as shown below.
+
+
+
+- **entry > src > main > js > MainAbility > pages > index > index.js** : defines logical relationships, such as data and events, used on low-code pages. For details, see [JavaScript](../ui/js-framework-syntax-js.md). If multiple low-code development pages are created, a page folder and the corresponding **.js** file will be created for each of these pages.
+ >  **Note:**
+ > To avoid build errors when using the low-code development page, make sure the directory where the corresponding **.js** file is located does not contain **.hml** or **.css** files. For example, in the preceding example, no **.hml** or **.css** file is allowed in **js** > **MainAbility** > **pages** > **index**.
+- **entry > src > main > supervisual > MainAbility > pages > index > index.visual** : stores the data model of the low-code development page. You can double-click the file to open the low-code development page. If multiple low-code development pages are created, a page folder and the corresponding **.visual** file will be created for each of these pages.
+
+
+## Building the First Page
+
+After the project synchronization is complete, the default first page contains the **Div** and **Text** (**Hello World**) components. To better understand low-code development, we'll delete these template components from the canvas and set the page from scratch.
+
+Add **Div**, **Text**, and **Button** components to the first page.
+
+1. Delete the existing template components from the canvas.
+ Open the index.visual file, right-click the existing template components on the canvas, and choose **Delete** from the shortcut menu to delete them. Below is an illustration of the operations.
+
+ 
+
+2. Add a **Div** component and set its styles and attributes.
+ Drag the **Div** component from the **UI Control** area to the canvas. In the **Attributes & Styles** area on the right, click **General** and set **Height** to **100%** so that the component fills the entire screen. Click **Flex**, set **FlexDirection** to **column** so that the main axis of the component is vertical, and set both **JustifyContent** and **AlignItems** to **center** so that the child components of the **Div** component are centered along the main axis and cross axis. Below is an illustration of the operations.
+
+ 
+
+3. Add a **Text** component.
+ Drag the **Text** component from the **UI Control** area to the center area of the **Div** component. In the **Attributes & Styles** area, click **Properties** and set **Content** of the **Text** component to **Hello World**. Click **Feature**, and set **FontSize** to **60px** and **TextAlign** to **center**. Then, select the **Text** component on the canvas and drag its corners to fully display the text. Below is an illustration of the operations.
+
+ 
+
+4. Add a **Button** component.
+ Drag the **Button** component from the **UI Control** area to a position under the **Text** component on the canvas. In the **Attributes & Styles** area on the right, click **Properties** and set **Value** of the **Button** component to **Next**. Click **Feature** and set **FontSize** to **40px**. Then, select the **Button** component on the canvas and drag its corners to fully display the text. Below is an illustration of the operations.
+
+ 
+
+5. On the toolbar in the upper right corner of the editing window, click **Previewer** to open the Previewer. Below is how the first page looks on the Previewer.
+ 
+
+
+## Building the Second Page
+
+1. Create the second page.
+ In the **Project** window, choose **entry** > **src** > **main** > **js** > **MainAbility**, right-click the **pages** folder, choose **New** > **Visual**, name the page **second**, and click **Finish**. Below is the structure of the **pages** folder:
+
+ 
+
+2. [Delete the existing template components from the canvas.](#delete_origin_content)
+
+3. [Add a Div component and set its styles and attributes.](#add_container)
+
+4. Add a **Text** component.
+ Drag the **Text** component from the **UI Control** area to the center area of the **Div** component. In the **Attributes & Styles** area, click **Properties** and set **Content** of the **Text** component to **Hi there**. Click **Feature**, and set **FontSize** to **60px** and **TextAlign** to **center**. Then, select the **Text** component on the canvas and drag its corners to fully display the text. Below is an illustration of the operations.
+
+ 
+
+5. Add a **Button** component.
+ Drag the **Button** component from the **UI Control** area to a position under the **Text** component on the canvas. In the **Attributes & Styles** area on the right, click **Properties** and set **Value** of the **Button** component to **Back**. Click **Feature** and set **FontSize** to **40px**. Then, select the **Button** component on the canvas and drag its corners to fully display the text. Below is an illustration of the operations.
+
+ 
+
+
+## Implementing Page Redirection
+
+You can implement page redirection through the [page router](../ui/ui-js-building-ui-routes.md), which finds the target page based on the page URI. Import the **router** module and then perform the steps below:
+
+1. Implement redirection from the first page to the second page.
+ In the files of the first page, bind the **onclick** method to the button so that clicking the button redirects the user to the second page. This operation needs to be completed in both .js and .visual files.
+ - In the **index.js** file:
+
+ ```
+ import router from '@system.router';
+
+ export default {
+ onclick() {
+ router.push({
+ uri:'pages/second/second', // Specify the page to be redirected to.
+ })
+ }
+ }
+ ```
+
+ - In the index.visual file, select the **Button** component on the canvas. In the **Attributes & Styles** area, click **Events** and set **Click** to **onclick**.
+
+ 
+
+2. Implement redirection from the second page to the first page.
+ In the files of the second page, bind the **back** method to the **Back** button so that clicking the button redirects the user back to the first page.
+
+ This operation needs to be completed in both .js and .visual files.
+
+ - In the **second.js** file:
+
+ ```
+ import router from '@system.router';
+
+ export default {
+ back() {
+ router.back()
+ }
+ }
+ ```
+ - In the second.visual file, select the **Button** component on the canvas. In the **Attributes & Styles** area, click **Events** and set **Click** to **back**.
+
+ 
+
+3. Open the **index.visual** or **index.js** file and click  in the Previewer to refresh the file. The figure below shows the effect.
+ 
+
+
+## Running the Application on a Real Device
+
+1. Connect the development board running the OpenHarmony standard system to the computer.
+
+2. Choose **File** > **Project Structure** > **Project** > **Signing Configs**, select **Automatically generate signing**, wait until the automatic signing is complete, and click **OK**, as shown below.
+ 
+
+3. On the toolbar in the upper right corner of the editing window, click . The display effect is shown in the figure below.
+ 
+
+Congratulations! You have finished developing your OpenHarmony app in JavaScript in the low-code approach. To learn more about OpenHarmony, see [OpenHarmony Overview](../application-dev-guide.md)
diff --git a/en/application-dev/quick-start/start-with-js.md b/en/application-dev/quick-start/start-with-js.md
new file mode 100644
index 0000000000000000000000000000000000000000..b2ad7acd9e16e6e0f667facc4e5608860f0853e2
--- /dev/null
+++ b/en/application-dev/quick-start/start-with-js.md
@@ -0,0 +1,205 @@
+# Getting Started with JavaScript in the Traditional Coding Approach
+
+>  **Note:**
+> For best possible results, use [DevEco Studio V3.0.0.900 Beta3](https://developer.harmonyos.com/cn/develop/deveco-studio#download_beta_openharmony) for your development.
+
+
+## Creating a JavaScript Project
+
+1. Open DevEco Studio, choose **File** > **New** > **Create Project**, select **Empty Ability**, and click **Next**.
+ 
+
+2. On the project configuration page, set **UI Syntax** to **JS** and retain the default values for other parameters.
+ 
+
+3. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.
+
+
+## JavaScript Project Files
+
+- **entry** : OpenHarmony project module, which can be built into an ability package (HAP).
+ - **src > main > js** : a collection of JS source code.
+ - **src > main > js > MainAbility** : entry to your application/service.
+ - **src > main > js > MainAbility > i18n** : resources in different languages, for example, UI strings and image paths.
+ - **src > main > js > MainAbility > pages** : pages contained in **MainAbility**.
+ - **src > main > js > MainAbility > app.js** : ability lifecycle file.
+ - **src > main > resources** : a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files.
+ - **src > main > config.json** : module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file.
+ - **build-profile.json5** : module information and build configuration options, including **buildOption target**.
+ - **hvigorfile.js** : module-level compilation and build task script. You can customize related tasks and code implementation.
+- **build-profile.json5** : application-level configuration information, including the signature and product configuration.
+- **hvigorfile.js** : application-level compilation and build task script.
+
+
+## Building the First Page
+
+1. Use the **Text** component.
+ After the project synchronization is complete, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index** in the **Project** window and open the **index.hml** file. You can see that the file contains a **<Text>** component. The sample code in the **index.hml** file is shown below:
+
+
+ ```
+
+
+ Hello World
+
+
+ ```
+
+2. Add a button and bind the **onclick** method to this button.
+ On the default page, add an **<input>** component of the button type to accept user clicks and implement redirection to another page. The sample code in the **index.hml** file is shown below:
+
+
+ ```
+
+
+ Hello World
+
+
+
+
+
+ ```
+
+3. Set the page style in the **index.css** file.
+ From the **Project** window, choose **entry** > **src** > **main** > **js** > **MainAbility** > **pages** > **index**, open the **index.css** file, and set the page styles, such as the width, height, font size, and spacing. The sample code in the **index.css** file is shown below:
+
+
+ ```
+ .container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ left: 0px;
+ top: 0px;
+ width: 100%;
+ height: 100%;
+ }
+
+ .title {
+ font-size: 100px;
+ font-weight: bold;
+ text-align: center;
+ width: 100%;
+ margin: 10px;
+ }
+
+ .btn {
+ font-size: 60px;
+ font-weight: bold;
+ text-align: center;
+ width: 40%;
+ height: 5%;
+ margin-top: 20px;
+ }
+ ```
+
+4. On the toolbar in the upper right corner of the editing window, click **Previewer** to open the Previewer. Below is how the first page looks on the Previewer.
+
+ 
+
+
+## Building the Second Page
+
+1. Create the second page.
+ In the **Project** window, choose **entry** > **src** > **main** > **js** > **MainAbility**, right-click the **pages** folder, choose **New** > **Page**, name the page **second**, and click **Finish**. Below is the structure of the **second** folder:
+
+ 
+
+2. Add **<Text>** and **<Button>** components.
+ Add **<Text>** and **<Button>** components and set their styles, as you do for the first page. The sample code in the **second.hml** file is shown below:
+
+
+ ```
+
+
+ Hi there
+
+
+
+
+
+ ```
+
+3. Set the page style in the **second.css** file. The sample code in the **second.css** file is shown below:
+
+ ```
+ .container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ left: 0px;
+ top: 0px;
+ width: 100%;
+ height: 100%;
+ }
+
+ .title {
+ font-size: 100px;
+ font-weight: bold;
+ text-align: center;
+ width: 100%;
+ margin: 10px;
+ }
+
+ .btn {
+ font-size: 60px;
+ font-weight: bold;
+ text-align: center;
+ width: 40%;
+ height: 5%;
+ margin-top: 20px;
+ }
+ ```
+
+
+## Implementing Page Redirection
+
+You can implement page redirection through the [page router](../ui/ui-js-building-ui-routes.md), which finds the target page based on the page URI. Import the **router** module and then perform the steps below:
+
+1. Implement redirection from the first page to the second page.
+ In the **index.js** file of the first page, bind the **onclick** method to the button so that clicking the button redirects the user to the second page. The sample code in the **index.js** file is shown below:
+
+
+ ```
+ import router from '@system.router';
+
+ export default {
+ onclick: function () {
+ router.push({
+ uri: "pages/second/second"
+ })
+ }
+ }
+ ```
+
+2. Implement redirection from the second page to the first page.
+ In the **second.ets** file of the second page, bind the **back** method to the **Back** button so that clicking the button redirects the user back to the first page. The sample code in the **second.js** file is shown below:
+
+
+ ```
+ import router from '@system.router';
+
+ export default {
+ back: function () {
+ router.back()
+ }
+ }
+ ```
+
+3. Open any file in the **index** folder and click  in the Previewer to refresh the file. The figure below shows the effect.
+ 
+
+
+## Running the Application on a Real Device
+
+1. Connect the development board running the OpenHarmony standard system to the computer.
+
+2. Choose **File** > **Project Structure** > **Project** > **Signing Configs**, select **Automatically generate signing**, wait until the automatic signing is complete, and click **OK**, as shown below.
+ 
+
+3. On the toolbar in the upper right corner of the editing window, click . The display effect is shown in the figure below.
+ 
+
+Congratulations! You have finished developing your OpenHarmony application in JavaScript in the traditional coding approach. To learn more about OpenHarmony, see [OpenHarmony Overview](../application-dev-guide.md)
diff --git a/en/application-dev/quick-start/use-wizard-to-create-project.md b/en/application-dev/quick-start/use-wizard-to-create-project.md
deleted file mode 100644
index ad79e3e8cb207af84457352188a15ce4c4ea898b..0000000000000000000000000000000000000000
--- a/en/application-dev/quick-start/use-wizard-to-create-project.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Using the Project Wizard to Create a Project
-
-- [Prerequisites](#section13642104391619)
-- [Procedure](#section132671712101714)
-
-If you are using DevEco Studio 2.2 Beta1 or later, you can use the project wizard to create a project. If you are using DevEco Studio 2.1 Release, create a project by following instructions in [Importing a Sample to Create a Project](import-sample-to-create-project.md).
-
-## Prerequisites
-
-The OpenHarmony SDK has been installed. For details, see [Configuring the OpenHarmony SDK](configuring-openharmony-sdk.md).
-
-## Procedure
-
-1. Open the project wizard using either of the following methods:
- - If no project is open, select **Create Project** on the welcome page.
- - If a project is already open, choose **File** \> **New** \> **New Project** on the menu bar.
-
-2. Select the **\[Standard\]Empty Ability** template and click **Next**.
-
- 
-
-3. Click **Next** and configure the project.
- - **Project name**: customized project name.
- - **Project type**: project type, which can be an [atomic service](https://developer.harmonyos.com/en/docs/documentation/doc-guides/atomic-service-definition-0000001090840664) or an ordinary app that requires download before use.
-
- > **NOTE:**
- >If you're creating an atomic service:
- >- There is no app icon on the home screen while running or debugging an atomic service. Use the debugging and running functions of DevEco Studio as an alternative.
- >- Atomic services are installation free. This is done by automatically adding the **installationFree** field to the **config.json** file, with its value set to **true**.
- >- If the value of the **installationFree** field of the entry module is set to **true**, the value of the **installationFree** field of all the related HAP modules is **true** by default. If the** installationFree field** of the entry module is set to **false**, the **installationFree** field of all the related HAP modules can be set to **true** or **false**.
- >- When compiling and building an app, make sure that the size of each HAP package does not exceed 10 MB.
-
- - **Bundle name**: bundle name. By default, this name will also be used as your app ID. Your app must have a unique ID to be released. If **Project type** is set to **Atomic service**, the **Bundle name** must end with **.hmservice**.
- - **Save location**: local path for storing the project file.
- - **Development mode**: development mode. The **Super Visual** option is available if the project template supports low-code development.
- - **Language**: supported programming language.
- - **Compatible API version**: earliest SDK version compatible with your app.
-
- > **NOTE:**
- >If **compileSdkVersion 7** or later is configured for the OpenHarmony project, the corresponding module will be compiled using ArkCompiler by default. To use a compiler other than ArkCompiler, add the **arkEnable false** field to the **ohos** closure in the module-level **build.gradle** file.
-
- - **Device Type**: device type supported by the project template.
-
- 
-
-4. Click **Finish**. DevEco Studio will automatically generate the sample code and resources that match your project type. Wait until the project is created.
-
diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md
index 8deb55f2e962ec65a9fc44f4b260d71c1d34f158..0887ba201b14be493ae22929539fa98aef908bc2 100644
--- a/en/application-dev/reference/apis/Readme-EN.md
+++ b/en/application-dev/reference/apis/Readme-EN.md
@@ -24,7 +24,6 @@
- [User Authentication](js-apis-useriam-userauth.md)
- [Access Control](js-apis-abilityAccessCtrl.md)
- Data Management
- - [Lightweight Storage9+](js-apis-data-preferences.md)
- [Lightweight Storage](js-apis-data-storage.md)
- [Distributed Data Management](js-apis-distributed-data.md)
- [Relational Database](js-apis-data-rdb.md)
@@ -37,12 +36,11 @@
- [Environment](js-apis-environment.md)
- [Public File Access and Management](js-apis-filemanager.md)
- [App Storage Statistics](js-apis-storage-statistics.md)
- - [Volume Management](js-apis-volumemanager.md)
-- Account Management
+- Account Management
- [OS Account Management](js-apis-osAccount.md)
- [Distributed Account Management](js-apis-distributed-account.md)
- [App Account Management](js-apis-appAccount.md)
-- Telephony Service
+- Telephony Service
- [Call](js-apis-call.md)
- [SMS](js-apis-sms.md)
- [SIM Management](js-apis-sim.md)
@@ -58,6 +56,7 @@
- [WLAN](js-apis-wifi.md)
- [Bluetooth](js-apis-bluetooth.md)
- [RPC](js-apis-rpc.md)
+ - [Upload and Download](js-apis-request.md)
- Device Management
- [Sensor](js-apis-sensor.md)
- [Vibrator](js-apis-vibrator.md)
@@ -79,7 +78,10 @@
- [Console Logs](js-apis-basic-features-logs.md)
- [Page Routing](js-apis-basic-features-routes.md)
- [Timer](js-apis-basic-features-timer.md)
+ - [Screen Lock Management](js-apis-screen-lock.md)
- [Setting the System Time](js-apis-system-time.md)
+ - [Wallpaper](js-apis-wallpaper.md)
+ - [Pasteboard](js-apis-pasteboard.md)
- [Animation](js-apis-basic-features-animator.md)
- [WebGL](js-apis-webgl.md)
- [WebGL2](js-apis-webgl2.md)
diff --git a/en/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md b/en/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md
deleted file mode 100644
index 8e0c427520a549e74f6b9e8dec02ac219d734054..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-WorkSchedulerExtensionAbility.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# Work Scheduler Callbacks
-
->  **NOTE**
-> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-
-
-## Modules to Import
-
-```
-import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'
-```
-
-## WorkSchedulerExtensionAbility.onWorkStart
-- **System capability**
-SystemCapability.ResourceSchedule.WorkScheduler
-
-- **API**
-onWorkStart(workInfo: WorkInfo);
-
-- **Description**
-Triggered when the Work Scheduler task starts.
-
-- **Example**
-
- ```
- export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
- onWorkStart(workInfo) {
- console.log('MyWorkSchedulerExtensionAbility onWorkStart' + JSON.stringify(workInfo));
- }
- }
- ```
-
-## WorkSchedulerExtensionAbility.onWorkStop
-- **System capability**
-SystemCapability.ResourceSchedule.WorkScheduler
-
-- **API**
-onWorkStop(workInfo: WorkInfo);
-
-- **Description**
-Triggered when the Work Scheduler task stops.
-
-- **Example**
-
- ```
- export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
- onWorkStop(workInfo) {
- console.log('MyWorkSchedulerExtensionAbility onWorkStop' + JSON.stringify(workInfo));
- }
- }
- ```
diff --git a/en/application-dev/reference/apis/js-apis-basic-features-animator.md b/en/application-dev/reference/apis/js-apis-animator.md
similarity index 100%
rename from en/application-dev/reference/apis/js-apis-basic-features-animator.md
rename to en/application-dev/reference/apis/js-apis-animator.md
diff --git a/en/application-dev/reference/apis/js-apis-appAccount.md b/en/application-dev/reference/apis/js-apis-appAccount.md
index bf7a006160c46af9bf7a2da5365253d084921607..f8414adaa9aa458914b66d9aaf503183c299095c 100644
--- a/en/application-dev/reference/apis/js-apis-appAccount.md
+++ b/en/application-dev/reference/apis/js-apis-appAccount.md
@@ -387,7 +387,7 @@ Checks whether an app account allows application data synchronization. This meth
### setAccountCredential
-setAccountCredential(name: string, credentialType: string, credential: string,callback: AsyncCallback<void>): void
+setAccountCredential(name: string, credentialType: string, credential: string callback: AsyncCallback<void>): void
Sets a credential for an app account. This method uses an asynchronous callback to return the result.
diff --git a/en/application-dev/reference/apis/js-apis-application-MissionInfo.md b/en/application-dev/reference/apis/js-apis-application-MissionInfo.md
deleted file mode 100644
index c707cbf2efba04e7135468409b417bd85290ef67..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-application-MissionInfo.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# MissionInfo
-
-> **NOTE**
-> The initial APIs of this module are supported since API 8.
-
-
-Provides mission information of an ability.
-
-
-## Modules to Import
-
-Import **Want** before use.
-
-
-```
-import Want from "../@ohos.application.Want";
-```
-
-
-## MissionInfo
-
-Describes the mission information.
-
-**System capability**: SystemCapability.Ability.AbilityBase
-
-| Name| Type| Readable| Writable| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| missionId | number | Yes| Yes| Mission ID.|
-| runningState | number | Yes| Yes| Running state of the mission.|
-| lockedState | boolean | Yes| Yes| Locked state of the mission.|
-| timestamp | string | Yes| Yes| Latest time when the mission was created or updated.|
-| want | [Want](js-apis-featureAbility.md#want) | Yes| Yes| **Want** information of the mission.|
-| label | string | Yes| Yes| Label of the mission.|
-| iconPath | string | Yes| Yes| Path of the mission icon.|
-| continuable | boolean | Yes| Yes| Whether the mission is continuable.|
diff --git a/en/application-dev/reference/apis/js-apis-audio.md b/en/application-dev/reference/apis/js-apis-audio.md
index 71f5f2a90b50513c194c3dad027b86abcb296984..4ae4ecd6a7843cd4781431ba5eed30afd0989f11 100644
--- a/en/application-dev/reference/apis/js-apis-audio.md
+++ b/en/application-dev/reference/apis/js-apis-audio.md
@@ -434,18 +434,6 @@ Enumerates the interrupt types.
| INTERRUPT_TYPE_BEGIN | 1 | Audio playback interruption started. |
| INTERRUPT_TYPE_END | 2 | Audio playback interruption ended. |
-
-## InterruptForceType9+
-
-Enumerates the interrupt force types.
-
-**System capability:** SystemCapability.Multimedia.Audio.Renderer
-
-| Name | Default Value | Description |
-| :-------------- | :------------ | :----------------------------------------- |
-| INTERRUPT_FORCE | 0 | Forced action taken by system. |
-| INTERRUPT_SHARE | 1 | App can choose to take action or ignore. |
-
## InterruptHint
Enumerates the interrupt hints.
@@ -542,20 +530,6 @@ Describes audio capturer configuration options.
| streamInfo | [AudioStreamInfo](#audiostreaminfo8) | Yes | Stream information. |
| capturerInfo | [AudioCapturerInfo](#audiocapturerinfo8) | Yes | Capturer information. |
-## InterruptEvent9+
-
-Describes the interrupt event received by the app when playback is interrupted.
-
-**System capability:** SystemCapability.Multimedia.Audio.Renderer
-
-**Parameters:**
-
-| Name | Type | Mandatory | Description |
-| :-------- | :-------------------------------------------- | :-------- | :---------------------------------------------------------------- |
-| eventType | [InterruptType](#interrupttype) | Yes | Whether the interruption has started or finished. |
-| forceType | [InterruptForceType](#interruptforcetype9) | Yes | Whether the action is taken by system or to be taken by the app. |
-| hintType | [InterruptHint](#interrupthint) | Yes | Type of action. |
-
## AudioInterrupt
The parameters passed in by the audio listener event.
@@ -2560,52 +2534,6 @@ audioRenderer.getRenderRate().then((renderRate) => {
});
```
-
-### on('interrupt')9+
-
-on(type: 'interrupt', callback: Callback\): void
-
-Subscribes to audio interrupt events. This API uses a callback to get interrupt events. The interrupt event is triggered when audio rendering is interrupted.
-
-**System capability:** SystemCapability.Multimedia.Audio.Renderer
-
-**Parameters:**
-
-| Name | Type | Mandatory | Description |
-| :------- | :-------------------------------------------- | :-------- | :---------------------------------------------- |
-| type | string | Yes | Type of the playback event to subscribe to. |
-| callback | Callback<[InterruptEvent](#interruptevent9)\> | Yes | Callback used to listen for interrupt callback. |
-
-**Example:**
-
-```
-audioRenderer.on('interrupt', (interruptEvent) => {
- if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_FORCE) {
- switch (interruptEvent.hintType) {
- case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
- console.log('Force paused. Stop writing');
- isPlay = false;
- break;
- case audio.InterruptHint.INTERRUPT_HINT_STOP:
- console.log('Force stopped. Stop writing');
- isPlay = false;
- break;
- }
- } else if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_SHARE) {
- switch (interruptEvent.hintType) {
- case audio.InterruptHint.INTERRUPT_HINT_RESUME:
- console.log('Resume force paused renderer or ignore');
- startRenderer();
- break;
- case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
- console.log('Choose to pause or ignore');
- pauseRenderer();
- break;
- }
- }
-});
-```
-
### on('markReach')8+
on(type: 'markReach', frame: number, callback: (position: number) => {}): void
diff --git a/en/application-dev/reference/apis/js-apis-backgroundTaskManager.md b/en/application-dev/reference/apis/js-apis-backgroundTaskManager.md
index cec4fab99d6e078c65937a10e8825f0844445c29..7787a551160a0afdb84af786ef1efd133a078bf6 100644
--- a/en/application-dev/reference/apis/js-apis-backgroundTaskManager.md
+++ b/en/application-dev/reference/apis/js-apis-backgroundTaskManager.md
@@ -22,15 +22,15 @@ The default duration of delayed suspension is 180000 when the battery level is h
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | reason | string | Yes| Reason for delayed transition to the suspended state.|
- | callback | Callback<void> | Yes| Invoked when a delay is about to time out. Generally, this callback is used to notify the application 6 seconds before the delay times out.|
+| Name | Type | Mandatory | Description |
+| -------- | -------------------- | --------- | ---------------------------------------- |
+| reason | string | Yes | Reason for delayed transition to the suspended state. |
+| callback | Callback<void> | Yes | Invoked when a delay is about to time out. Generally, this callback is used to notify the application 6 seconds before the delay times out. |
**Return value**
- | Type| Description|
- | -------- | -------- |
- | [DelaySuspendInfo](#delaysuspendinfo) | Information about the suspension delay.|
+| Type | Description |
+| ------------------------------------- | --------------------------------------- |
+| [DelaySuspendInfo](#delaysuspendinfo) | Information about the suspension delay. |
**Example**
```js
@@ -50,12 +50,13 @@ Obtains the remaining duration before the application is suspended. This API use
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | requestId | number | Yes| ID of the suspension delay request.|
- | callback | AsyncCallback<number> | Yes| Callback used to return the remaining duration before the application is suspended, in milliseconds.|
+| Name | Type | Mandatory | Description |
+| --------- | --------------------------- | --------- | ---------------------------------------- |
+| requestId | number | Yes | ID of the suspension delay request. |
+| callback | AsyncCallback<number> | Yes | Callback used to return the remaining duration before the application is suspended, in milliseconds. |
**Example**
+
```js
let id = 1;
backgroundTaskManager.getRemainingDelayTime(id, (err, res) => {
@@ -77,14 +78,14 @@ Obtains the remaining duration before the application is suspended. This API use
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | requestId | number | Yes| ID of the suspension delay request.|
+| Name | Type | Mandatory | Description |
+| --------- | ------ | --------- | ----------------------------------- |
+| requestId | number | Yes | ID of the suspension delay request. |
**Return value**
- | Type| Description|
- | -------- | -------- |
- | Promise<number> | Promise used to return the remaining duration before the application is suspended, in milliseconds.|
+| Type | Description |
+| --------------------- | ---------------------------------------- |
+| Promise<number> | Promise used to return the remaining duration before the application is suspended, in milliseconds. |
**Example**
```js
@@ -106,9 +107,9 @@ Cancels the suspension delay.
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | requestId | number | Yes| ID of the suspension delay request.|
+| Name | Type | Mandatory | Description |
+| --------- | ------ | --------- | ----------------------------------- |
+| requestId | number | Yes | ID of the suspension delay request. |
**Example**
```js
@@ -127,12 +128,12 @@ Requests a continuous task from the system. This API uses an asynchronous callba
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | [Context](js-apis-Context.md) | Yes| Application context.|
- | bgMode | [BackgroundMode](#backgroundmode8) | Yes| Background mode requested.|
- | wantAgent | [WantAgent](js-apis-notification.md#WantAgent)| Yes| Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| --------- | ---------------------------------- | --------- | ---------------------------------------- |
+| context | [Context](js-apis-Context.md) | Yes | Application context. |
+| bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. |
+| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
```js
@@ -178,17 +179,17 @@ Requests a continuous task from the system. This API uses a promise to return th
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**Parameters**
-
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | [Context](js-apis-Context.md) | Yes| Application context.|
- | bgMode | [BackgroundMode](#backgroundmode8) | Yes| Background mode requested.|
- | wantAgent | [WantAgent](js-apis-notification.md#WantAgent)| Yes| Notification parameter, which is used to specify the target page when a continuous task notification is clicked.|
-
+
+| Name | Type | Mandatory | Description |
+| --------- | ---------------------------------- | --------- | ---------------------------------------- |
+| context | [Context](js-apis-Context.md) | Yes | Application context. |
+| bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. |
+| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page when a continuous task notification is clicked. |
+
**Return value**
- | Type | Description |
- | -------------- | ------------------------- |
- | Promise\ | Promise used to return the result.|
+| Type | Description |
+| -------------- | ---------------------------------- |
+| Promise\ | Promise used to return the result. |
**Example**
```js
@@ -225,15 +226,13 @@ stopBackgroundRunning(context: Context, callback: AsyncCallback<void>): vo
Requests to cancel a continuous task. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.KEEP_BACKGROUND_RUNNING
-
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | [Context](js-apis-Context.md) | Yes| Application context.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ----------------------------- | --------- | ----------------------------------- |
+| context | [Context](js-apis-Context.md) | Yes | Application context. |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
```js
@@ -258,19 +257,17 @@ stopBackgroundRunning(context: Context): Promise<void>
Requests to cancel a continuous task. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.KEEP_BACKGROUND_RUNNING
-
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
**Parameters**
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | [Context](js-apis-Context.md) | Yes| Application context.|
+| Name | Type | Mandatory | Description |
+| ------- | ----------------------------- | --------- | -------------------- |
+| context | [Context](js-apis-Context.md) | Yes | Application context. |
**Return value**
- | Type | Description |
- | -------------- | ------------------------- |
- | Promise\ | Promise used to return the result.|
+| Type | Description |
+| -------------- | ---------------------------------- |
+| Promise\ | Promise used to return the result. |
**Example**
```js
@@ -291,24 +288,24 @@ Provides the information about the suspension delay.
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| requestId | number | Yes| ID of the suspension delay request.|
-| actualDelayTime | number | Yes| Actual suspension delay duration of the application, in milliseconds. The default duration is 180000 when the battery level is higher than or equal to the broadcast low battery level and 60000 when the battery level is lower than the broadcast low battery level.|
+| Name | Type | Mandatory | Description |
+| --------------- | ------ | --------- | ---------------------------------------- |
+| requestId | number | Yes | ID of the suspension delay request. |
+| actualDelayTime | number | Yes | Actual suspension delay duration of the application, in milliseconds. The default duration is 180000 when the battery level is higher than or equal to the broadcast low battery level and 60000 when the battery level is lower than the broadcast low battery level. |
## BackgroundMode8+
**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
-| Name | Value| Description|
-| ----------------------- | -------- | -------- |
-| DATA_TRANSFER | 1 | Data transfer.|
-| AUDIO_PLAYBACK | 2 | Audio playback.|
-| AUDIO_RECORDING | 3 | Audio recording.|
-| LOCATION | 4 | Positioning and navigation.|
-| BLUETOOTH_INTERACTION | 5 | Bluetooth-related task.|
-| MULTI_DEVICE_CONNECTION | 6 | Multi-device connection.|
-| WIFI_INTERACTION | 7 | WLAN-related (reserved).|
-| VOIP | 8 | Voice and video call (reserved).|
-| TASK_KEEPING | 9 | Computing task (for PC only).|
+| Name | Value | Description |
+| ----------------------- | ----- | -------------------------------- |
+| DATA_TRANSFER | 1 | Data transfer. |
+| AUDIO_PLAYBACK | 2 | Audio playback. |
+| AUDIO_RECORDING | 3 | Audio recording. |
+| LOCATION | 4 | Positioning and navigation. |
+| BLUETOOTH_INTERACTION | 5 | Bluetooth-related task. |
+| MULTI_DEVICE_CONNECTION | 6 | Multi-device connection. |
+| WIFI_INTERACTION | 7 | WLAN-related (reserved). |
+| VOIP | 8 | Voice and video call (reserved). |
+| TASK_KEEPING | 9 | Computing task. |
diff --git a/en/application-dev/reference/apis/js-apis-camera.md b/en/application-dev/reference/apis/js-apis-camera.md
deleted file mode 100644
index 6a51a41b6fba50c1c4f7a061d313482e1df57ad9..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-camera.md
+++ /dev/null
@@ -1,2798 +0,0 @@
-# Camera
-
->  **NOTE**
-> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-
-## Modules to Import
-
-```
-import camera from '@ohos.multimedia.camera';
-```
-
-## Required Permissions
-
-```
-ohos.permission.CAMERA
-```
-## getCameraManager(context: Context, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets a **CameraManager** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|-------------------------------|-----------|-----------------------------------------------------|
-| context | Context | Yes | Application context |
-| callback | AsyncCallback | Yes | Callback used to return the CameraManager instance |
-
-**Example**
-
-```
-camera.getCameraManager(context, (err, cameraManager) => {
- if (err) {
- console.error('Failed to get the CameraManager instance ${err.message}');
- return;
- }
- console.log('Callback returned with the CameraManager instance');
-});
-```
-
-## getCameraManager(context: Context): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets a **CameraManager** instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------|
-| context | Context | Yes | Application context |
-
-**Return values**
-
-| Type | Description |
-|-------------------------|--------------------------------------------------------|
-| Promise | Promise used to return the **CameraManager** instance |
-
-**Example**
-
-```
-camera.getCameraManager(context).then((cameraManger) => {
- console.log('Promise returned with the CameraManager instance.');
-})
-```
-
-## CameraStatus
-
-Enumerates camera status types.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default Value | Description |
-|---------------------------|---------------|--------------------|
-| CAMERA_STATUS_APPEAR | 0 | Camera appear |
-| CAMERA_STATUS_DISAPPEAR | 1 | Camera disappear |
-| CAMERA_STATUS_AVAILABLE | 2 | Camera available |
-| CAMERA_STATUS_UNAVAILABLE | 3 | Camera unavailable |
-
-
-## CameraPosition
-
-Enumerates the camera positions.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|-----------------------------|---------------|-----------------------|
-| CAMERA_POSITION_UNSPECIFIED | 0 | Unspecified position |
-| CAMERA_POSITION_BACK | 1 | Rear camera |
-| CAMERA_POSITION_FRONT | 2 | Front camera |
-
-## CameraType
-
-Enumerates the camera types.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|-------------------------|---------------|-------------------------|
-| CAMERA_TYPE_UNSPECIFIED | 0 | Unspecified camera type |
-| CAMERA_TYPE_WIDE_ANGLE | 1 | Wide camera |
-| CAMERA_TYPE_ULTRA_WIDE | 2 | Ultra wide camera |
-| CAMERA_TYPE_TELEPHOTO | 3 | Telephoto camera |
-| CAMERA_TYPE_TRUE_DEPTH | 4 | True depth camera |
-
-
-## ConnectionType
-
-Enumerates camera connection types.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|------------------------------|---------------|----------------------------|
-| CAMERA_CONNECTION_BUILT_IN | 0 | Built-in camera |
-| CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB |
-| CAMERA_CONNECTION_REMOTE | 2 | Remote camera |
-
-## CameraManager
-
-Implements camera management, including getting supported cameras and creating **CameraInput** instances.
-
-### getCameras(callback: AsyncCallback\>): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets all cameras supported by the device. This method uses an asynchronous callback to return the array of supported cameras.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------|-----------|---------------------------------------------------------|
-| callback | AsyncCallback\> | Yes | Callback used to return the array of supported cameras. |
-
-**Example**
-
-```
-cameraManager.getCameras((err, cameras) => {
- if (err) {
- console.error('Failed to get the cameras. ${err.message}');
- return;
- }
- console.log('Callback returned with an array of supported cameras: ' + cameras.length);
-})
-```
-
-### getCameras(): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets all cameras supported by the device. This method uses a promise to return the array of supported cameras.
-
-**Return values**
-
-| Type | Description |
-|------------------------|--------------------------------------------------------|
-| Promise\> | Promise used to return an array of supported cameras |
-
-
-**Example**
-
-```
-cameraManager.getCameras().then((cameraArray) => {
- console.log('Promise returned with an array of supported cameras: ' + cameraArray.length);
-})
-```
-
-### createCameraInput(cameraId: string, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CameraInput** instance with the specified camera ID. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Default value | Mandatory | Description |
-|----------|------------------------------|-----------|--------------------------------------------------|
-| cameraId | string | Yes | Camera ID used to create the instance |
-| callback | AsyncCallback | Yes | Callback used to return the CameraInput instance |
-
-**Example**
-
-```
-cameraManager.createCameraInput(cameraId, (err, cameraInput) => {
- if (err) {
- console.error('Failed to create the CameraInput instance. ${err.message}');
- return;
- }
- console.log('Callback returned with the CameraInput instance.');
-})
-```
-
-### createCameraInput(cameraId: string): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CameraInput** instance with the specified camera ID. This method uses a promise to return the instance.
-
-**Parameters**
-
-| Name | Default value | Mandatory | Description |
-|----------|-----------------------------|-----------|------------------------------------------|
-| cameraId | string | Yes | Camera ID used to create the instance |
-
-**Return values**
-
-| Type | Description |
-|-------------------------|-------------------------------------------------|
-| Promise | Promise used to return the CameraInput instance |
-
-**Example**
-
-```
-cameraManager.createCameraInput(cameraId).then((cameraInput) => {
- console.log('Promise returned with the CameraInput instance');
-})
-```
-
-### createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CameraInput** instance with the specified camera position and camera type. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|-----------------------------|-----------|---------------------------------------------------|
-| position | CameraPosition | Yes | Camera position |
-| type | CameraType | Yes | Camera type |
-| callback | AsyncCallback | Yes | Callback used to return the CameraInput instance |
-
-**Example**
-
-```
-cameraManager.createCameraInput(cameraPosition, cameraType, (err, cameraInput) => {
- if (err) {
- console.error('Failed to create the CameraInput instance. ${err.message}');
- return;
- }
- console.log('Callback returned with the CameraInput instance');
-})
-```
-
-### createCameraInput(position: CameraPosition, type: CameraType): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CameraInput** instance with the specified camera position and camera type. This method uses a promise to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------------|-----------|----------------------------------------|
-| position | CameraPosition | Yes | Camera position |
-| type | CameraType | Yes | Camera type |
-
-**Return values**
-
-| Type | Description |
-|-------------------------|-------------------------------------------------|
-| Promise | Promise used to return the CameraInput instance |
-
-**Example**
-
-```
-cameraManager.createCameraInput(cameraPosition, cameraType).then((cameraInput) => {
- console.log('Promise returned with the CameraInput instance.');
-})
-```
-
-### on(type: 'cameraStatus', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for camera status changes. This method uses a callback to get camera status changes.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :--------------------------------------------------- |
-| type | string | Yes | Camera status event. |
-| callback | Callback | Yes | Callback used to get the camera status change. |
-
-**Example**
-
-```
-cameraManager.on('cameraStatus', (cameraStatusInfo) => {
- console.log('camera : ' + cameraStatusInfo.camera.cameraId);
- console.log('status: ' + cameraStatusInfo.status);
-})
-```
-
-## Camera
-
-when we call *cameraManager.getCameras()* API, then it will return the **Camera** class which will have all camera-related metadata such as *cameraId, cameraPosition, cameraType & connectionType*.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Fields**
-
-| Name | Type | Access | Description |
-|----------------|----------------|----------|------------------------|
-| cameraId | string | readonly | Camera ID |
-| cameraPosition | cameraPosition | readonly | Camera position |
-| cameraType | cameraType | readonly | Camera type |
-| connectionType | connectionType | readonly | Camera connection type |
-
-```
-async function getCameraInfo() {
- var cameraManager = await camera.getCameraManager();
- var cameras = await cameraManager.getCameras();
- var cameraObj = cameras[0];
- var cameraId = cameraObj.cameraId;
- var cameraPosition = cameraObj.cameraPosition;
- var cameraType = cameraObj.cameraType;
- var cameraId = cameraObj.connectionType;
-}
-
-```
-
-## CameraStatusInfo
-
-This interface is a CameraManager callback API return. **CameraStatusInfo** will have *Camera* class & *CameraStatus* predefine constants.From *Camera* class, we can have all camera-related metadata & from *CameraStatus* constants, we will have information such as *APPEAR, DISAPPEAR, AVAILABLE & UNAVAILABLE*.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Fields**
-
-| Name | Type | Description |
-|----------------|----------------|------------------|
-| camera | Camera | Camera object |
-| status | CameraStatus | Camera status |
-
-
-## CameraInput
-
-Implements a **CameraInput** instance.
-
-### getCameraId(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the camera ID based on which this **CameraInput** instance is created. This method uses an asynchronous callback to return the camera ID.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|------------------------|-----------|---------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the camera ID |
-
-```
-cameraInput.getCameraId((err, cameraId) => {
- if (err) {
- console.error('Failed to get the camera ID. ${err.message}');
- return;
- }
- console.log('Callback returned with the camera ID: ' + cameraId);
-})
-```
-
-### getCameraId(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the camera ID based on which this **CameraInput** instance is created. This method uses a promise to return the camera ID.
-
-**Return values**
-
-| Type | Description |
-|------------------------|--------------------------------------|
-| Promise | Promise used to return the camera ID |
-
-**Example**
-
-```
-cameraInput.getCameraId().then((cameraId) => {
- console.log('Promise returned with the camera ID:' + cameraId);
-})
-```
-
-### hasFlash(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether the device has flash light. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|-------------------------|-----------|----------------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the flash light support status |
-
-**Example**
-
-```
-cameraInput.hasFlash((err, status) => {
- if (err) {
- console.error('Failed to check whether the device has flash light. ${err.message}');
- return;
- }
- console.log('Callback returned with flash light support status: ' + status);
-})
-```
-
-### hasFlash(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether the device has flash light. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|-----------------------|--------------------------------------------------------|
-| Promise | Promise used to return the flash light support status |
-
-**Example**
-
-```
-cameraInput.hasFlash().then((status) => {
- console.log('Promise returned with the flash light support status:' + status);
-})
-```
-
-### isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether a specified flash mode is supported. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|----------------------------------------------------|
-| flashMode | FlashMode | Yes | Flash mode |
-| callback | AsyncCallback | Yes | Callback used to return the device flash support status |
-
-**Example**
-
-```
-cameraInput.isFlashModeSupported(flashMode, (err, status) => {
- if (err) {
- console.error('Failed to check whether the flash mode is supported. ${err.message}');
- return;
- }
- console.log('Callback returned with the flash mode support status: ' + status);
-})
-```
-
-### isFlashModeSupported(flashMode: FlashMode): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether a specified flash mode is supported. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|----------------------------------------------------|
-| flashMode | FlashMode | Yes | Flash mode |
-
-**Return values**
-
-| Type | Description |
-|-----------------------|---------------------------------------------------|
-| Promise | Promise used to return flash mode support status. |
-
-**Example**
-
-```
-cameraInput.isFlashModeSupported(flashMode).then((status) => {
- console.log('Promise returned with flash mode support status.' + status);
-})
-```
-
-### setFlashMode(flashMode: FlashMode, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets flash mode. This method uses an asynchronous callback to return the result.
-
-Note: Before setting the flash mode, check the support for the flash light (hasFlash method) and flash mode support (isFlashModeSupported method);
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|----------------------------------------------------|
-| flashMode | FlashMode | Yes | Flash mode |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-cameraInput.setFlashMode(flashMode, (err) => {
- if (err) {
- console.error('Failed to set the flash mode ${err.message}');
- return;
- }
- console.log('Callback returned with the successful execution of setFlashMode.');
-})
-```
-
-### setFlashMode(flashMode: FlashMode): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets flash mode. This method uses a promise to return the result.
-
-Note: Before setting the flash mode, check the support for the flash light (hasFlash method) and flash mode support (isFlashModeSupported method);
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|----------------------------------------------------|
-| flashMode | FlashMode | Yes | Flash mode |
-
-**Return values**
-
-| Type | Description |
-|-----------------------|-----------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-cameraInput.setFlashMode(flashMode).then(() => {
- console.log('Promise returned with the successful execution of setFlashMode.');
-})
-```
-
-### getFlashMode(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets current flash mode. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|---------------------------|-----------|------------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the current flash mode |
-
-**Example**
-
-```
-cameraInput.getFlashMode((err, flashMode) => {
- if (err) {
- console.error('Failed to get the flash mode ${err.message}');
- return;
- }
- console.log('Callback returned with current flash mode: ' + flashMode);
-})
-```
-
-### getFlashMode(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets current flash mode. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|-----------------------|---------------------------------------------------|
-| Promise | Promise used to return the flash mode |
-
-**Example**
-
-```
-cameraInput.getFlashMode().then((flashMode) => {
- console.log('Promise returned with current flash mode : ' + flashMode);
-})
-```
-
-### isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether a specified focus mode is supported. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|----------------------------------------------------|
-| afMode | FocusMode | Yes | Focus mode |
-| callback | AsyncCallback | Yes | Callback used to return the device focus support status |
-
-**Example**
-
-```
-cameraInput.isFocusModeSupported(afMode, (err, status) => {
- if (err) {
- console.error('Failed to check whether the focus mode is supported. ${err.message}');
- return;
- }
- console.log('Callback returned with the focus mode support status: ' + status);
-})
-```
-
-### isFocusModeSupported(afMode: FocusMode): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Checks whether a specified focus mode is supported. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|----------------------------------------|-----------|-------------|
-| afMode | FocusMode | Yes | Focus mode |
-
-**Return values**
-
-| Type | Description |
-|-----------------------|---------------------------------------------------|
-| Promise | Promise used to return the focus mode support status. |
-
-**Example**
-
-```
-cameraInput.isFocusModeSupported(afMode).then((status) => {
- console.log('Promise returned with focus mode support status.' + status);
-})
-```
-
-### setFocusMode(afMode: FocusMode, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets focus mode. This method uses an asynchronous callback to return the result.
-
-Note: Before setting the focus mode, check focus mode support (isFocusModeSupported method);
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|------------------------------------|
-| afMode | FocusMode | Yes | Focus mode |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-cameraInput.setFocusMode(afMode, (err) => {
- if (err) {
- console.error('Failed to set the focus mode ${err.message}');
- return;
- }
- console.log('Callback returned with the successful execution of setFocusMode.');
-})
-```
-
-### setFocusMode(afMode: FocusMode): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets focus mode. This method uses a promise to return the result.
-
-Note: Before setting the focus mode, check focus mode support (isFocusModeSupported method);
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|-----------------------------------------|-----------|-------------|
-| afMode | FocusMode | Yes | Focus mode |
-
-**Return values**
-
-| Type | Description |
-|-----------------------|-----------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-cameraInput.setFocusMode(afMode).then(() => {
- console.log('Promise returned with the successful execution of setFocusMode.');
-})
-```
-
-### getFocusMode(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the current focus mode. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|---------------------------|-----------|------------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the current focus mode |
-
-**Example**
-
-```
-cameraInput.getFocusMode((err, afMode) => {
- if (err) {
- console.error('Failed to get the focus mode ${err.message}');
- return;
- }
- console.log('Callback returned with current focus mode: ' + afMode);
-})
-```
-
-### getFocusMode(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the current focus mode. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|-----------------------|---------------------------------------------------|
-| Promise | Promise used to return the focus mode |
-
-**Example**
-
-```
-cameraInput.getFocusMode().then((afMode) => {
- console.log('Promise returned with current focus mode : ' + afMode);
-})
-```
-
-### getZoomRatioRange\(callback: AsyncCallback\>\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the zoom ratios of all zoom values. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------|-----------|-------------------------------------------------|
-| callback | AsyncCallback\> | Yes | Callback used to return the zoom ratio range |
-
-**Example**
-
-```
-cameraInput.getZoomRatioRange((err, zoomRatioRange) => {
- if (err) {
- console.error('Failed to get the zoom ratio range. ${err.message}');
- return;
- }
- console.log('Callback returned with zoom ratio range: ' + zoomRatioRange.length);
-})
-```
-
-### getZoomRatioRange\(\): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets the zoom ratios of all zoom values. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|------------------------|---------------------------------------------|
-| Promise\> | Promise used to return the zoom ratio range |
-
-**Example**
-
-```
-cameraInput.getZoomRatioRange().then((zoomRatioRange) => {
- console.log('Promise returned with zoom ratio range: ' + zoomRatioRange.length);
-})
-```
-
-### setZoomRatio(zoomRatio: number, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets a zoom ratio. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|------------------------|-----------|------------------------------------|
-| zoomRatio | number | Yes | Zoom ratio |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-cameraInput.setZoomRatio(zoomRatio, (err) => {
- if (err) {
- console.error('Failed to set the zoom ratio value ${err.message}');
- return;
- }
- console.log('Callback returned with the successful execution of setZoomRatio.');
-})
-```
-
-### setZoomRatio(zoomRatio: number): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Sets a zoom ratio. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|----------|-----------|-------------|
-| zoomRatio | number | Yes | zoom ratio |
-
-**Return values**
-
-| Type | Description |
-|-----------------------|-----------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-cameraInput.setZoomRatio(zoomRatio).then(() => {
- console.log('Promise returned with the successful execution of setZoomRatio.');
-})
-```
-
-### getZoomRatio(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets current zoom ratio value. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-----------|---------------------------|-----------|------------------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the current zoom ratio value |
-
-**Example**
-
-```
-cameraInput.getZoomRatio((err, zoomRatio) => {
- if (err) {
- console.error('Failed to get the zoom ratio ${err.message}');
- return;
- }
- console.log('Callback returned with current zoom ratio: ' + zoomRatio);
-})
-```
-
-### getZoomRatio(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets current zoom ratio value. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|-----------------------|---------------------------------------------------|
-| Promise | Promise used to return the zoom ratio vaule |
-
-**Example**
-
-```
-cameraInput.getZoomRatio().then((zoomRatio) => {
- console.log('Promise returned with current zoom ratio : ' + zoomRatio);
-})
-```
-
-### release\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **CameraInput** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-cameraInput.release((err) => {
- if (err) {
- console.error('Failed to release the CameraInput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the CameraInput instance is released successfully.');
-});
-```
-
-### release(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **CameraInput** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-cameraInput.release().then(() => {
- console.log('Promise returned to indicate that the CameraInput instance is released successfully.');
-})
-```
-
-### on(type: 'focusStateChange', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for focus state changes. This method uses a callback to get focus state changes.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to get the focus state change. |
-
-**Example**
-
-```
-cameraInput.on('focusStateChange', (focusState) => {
- console.log('Focus state : ' + focusState);
-})
-```
-
-### on(type: 'error', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for **CameraInput** errors. This method uses a callback to get errors.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Camera input error event. |
-| callback | Callback | Yes | Callback used to get the camera input errors. |
-
-**Example**
-
-```
-cameraInput.on('error', (cameraInputError) => {
- console.log('Camera input error code: ' + cameraInputError.code);
-})
-```
-
-## FlashMode
-
-Enumerates the flash modes.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|------------------------|---------------|------------------------|
-| FLASH_MODE_CLOSE | 0 | Flash mode close |
-| FLASH_MODE_OPEN | 1 | Flash mode open |
-| FLASH_MODE_AUTO | 2 | Flash mode auto |
-| FLASH_MODE_ALWAYS_OPEN | 3 | Flash mode always open |
-
-## FocusMode
-
-Enumerates the focus modes.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|----------------------------|---------------|----------------------------|
-| FOCUS_MODE_MANUAL | 0 | Focus mode manual |
-| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Focus mode continuous auto |
-| FOCUS_MODE_AUTO | 2 | Focus mode auto |
-| FOCUS_MODE_LOCKED | 3 | Focus mode locked |
-
-## createCaptureSession\(context: Context, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CaptureSession** instance. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------|-----------|-----------------------------------------------------|
-| context | Context | Yes | Application context |
-| callback | AsyncCallback | Yes | Callback used to return the CaptureSession instance |
-
-**Example**
-
-```
-captureSession.createCaptureSession((context), (err, captureSession) => {
- if (err) {
- console.error('Failed to create the CaptureSession instance. ${err.message}');
- return;
- }
- console.log('Callback returned with the CaptureSession instance.' + captureSession);
-});
-```
-
-## createCaptureSession(context: Context\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **CaptureSession** instance. This method uses a promise to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|-------------------------------|-----------|-----------------------------------------------------|
-| context | Context | Yes | Application context |
-
-**Return values**
-
-| Type | Description |
-|---------------------------|---------------------------------------------------|
-| Promise | Promise used to return the CaptureSession instance. |
-
-**Example**
-
-```
-captureSession.createCaptureSession(context).then((captureSession) => {
- console.log('Promise returned with the CaptureSession instance');
-})
-```
-
-## CaptureSession
-
-Implements session capture.
-
-### beginConfig\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts configuration for this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.beginConfig((err) => {
- if (err) {
- console.error('Failed to start the configuration. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the begin config success.');
-});
-```
-
-### beginConfig\(\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts configuration for this CaptureSession instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|---------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-captureSession.beginConfig().then(() => {
- console.log('Promise returned to indicate the begin config success.');
-})
-```
-
-### commitConfig\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Commits the configuration for this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|---------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.commitConfig((err) => {
- if (err) {
- console.error('Failed to commit the configuration. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the commit config success.');
-});
-```
-
-### commitConfig\(\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Commits the configuration for this CaptureSession instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|---------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.commitConfig().then(() => {
- console.log('Promise returned to indicate the commit config success.');
-})
-```
-
-### addInput\(cameraInput: CameraInput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a CameraInput instance to this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-------------|----------------------|-----------|---------------------------------------------|
-| cameraInput | CameraInput | Yes | CameraInput instance to add |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.addInput(cameraInput, (err) => {
- if (err) {
- console.error('Failed to add the CameraInput instance. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the CameraInput instance is added.');
-});
-```
-
-### addInput\(cameraInput: CameraInput\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a CameraInput instance to this CaptureSession instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-------------|---------------------|-----------|-------------------------------|
-| cameraInput | CameraInput | Yes | CameraInput instance to add |
-
-**Return values**
-
-| Type | Description |
-|----------------|------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.addInput(cameraInput).then(() => {
- console.log('Promise used to indicate that the CameraInput instance is added.');
-})
-```
-
-### addOutput\(previewOutput: PreviewOutput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a PreviewOutput instance to this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|----------------------|-----------|-------------------------------------|
-| previewOutput | PreviewOutput | Yes | PreviewOutput instance to add |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(previewOutput, (err) => {
- if (err) {
- console.error('Failed to add the PreviewOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PreviewOutput instance is added.');
-});
-```
-
-### addOutput\(previewOutput: PreviewOutput\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a PreviewOutput instance to this CaptureSession instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|--------------------------------|
-| previewOutput | PreviewOutput | Yes | PreviewOutput instance to add |
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(previewOutput).then(() => {
- console.log('Promise used to indicate that the PreviewOutput instance is added.');
-})
-```
-
-### addOutput\(photoOutput: PhotoOutput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a PhotoOutput instance to this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|-------------------------------------|
-| photoOutput | PhotoOutput | Yes | PhotoOutput instance to add |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(photoOutput, (err) => {
- if (err) {
- console.error('Failed to add the PhotoOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PhotoOutput instance is added.');
-});
-```
-
-### addOutput\(photoOutput: PhotoOutput\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a PhotoOutput instance to this CaptureSession instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|--------------------------------|
-| photoOutput | PhotoOutput | Yes | PhotoOutput instance to add |
-
-**Return values**
-
-| Type | Description |
-|---------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(photoOutput).then(() => {
- console.log('Promise used to indicate that the PhotoOutput instance is added.');
-})
-```
-
-### addOutput\(videoOutput: VideoOutput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a VideoOutput instance to this CaptureSession instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|-------------------------------------|
-| videoOutput | VideoOutput | Yes | VideoOutput instance to add |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(videoOutput, (err) => {
- if (err) {
- console.error('Failed to add the VideoOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the VideoOutput instance is added.');
-});
-```
-
-### addOutput\(videoOutput: VideoOutput\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Add a VideoOutput instance to this CaptureSession instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|--------------------------------|
-| videoOutput | VideoOutput | Yes | VideoOutput instance to add |
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.addOutput(videoOutput).then(() => {
- console.log('Promise used to indicate that the VideoOutput instance is added.');
-})
-```
-
-### removeInput\(cameraInput: CameraInput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **CameraInput** instance from this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-------------|----------------------|-----------|------------------------------------|
-| cameraInput | CameraInput | Yes | CameraInput instance to remove |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.removeInput(cameraInput, (err) => {
- if (err) {
- console.error('Failed to remove the CameraInput instance. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the cameraInput instance is removed.');
-});
-```
-
-### removeInput\(cameraInput: CameraInput\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **CameraInput** instance from this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|-------------|---------------------|-----------|---------------------------------|
-| cameraInput | CameraInput | Yes | CameraInput instance to remove |
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.removeInput(cameraInput).then(() => {
- console.log('Promise returned to indicate that the cameraInput instance is removed.');
-})
-```
-
-### removeOutput\(previewOutput: PreviewOutput, callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **PreviewOutput** instance from this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|----------------------|-----------|------------------------------------|
-| previewOutput | PreviewOutput | Yes | PreviewOutput instance to remove |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.removeOutput(previewOutput, (err) => {
- if (err) {
- console.error('Failed to remove the PreviewOutput instance. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PreviewOutput instance is removed.');
-});
-```
-
-### removeOutput(previewOutput: PreviewOutput): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **PreviewOutput** instance from this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|-----------------------------------|
-| previewOutput | PreviewOutput | Yes | PreviewOutput instance to remove |
-
-
-**Return values**
-
-| Type | Description |
-|---------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-captureSession.removeOutput(previewOutput).then(() => {
- console.log('Promise returned to indicate that the PreviewOutput instance is removed.');
-})
-```
-
-### removeOutput(photoOutput: PhotoOutput, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **PhotoOutput** instance from this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|----------------------|-----------|------------------------------------|
-| photoOutput | PhotoOutput | Yes | PhotoOutput instance to remove |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.removeOutput(photoOutput, (err) => {
- if (err) {
- console.error('Failed to remove the PhotoOutput instance. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PhotoOutput instance is removed.');
-});
-```
-
-### removeOutput(photoOutput: PhotoOutput): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **PhotoOutput** instance from this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|---------------------------------|
-| photoOutput | PhotoOutput | Yes | PhotoOutput instance to remove |
-
-
-**Return values**
-
-| Type | Description |
-|---------------|------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-captureSession.removeOutput(photoOutput).then(() => {
- console.log('Promise returned to indicate that the PhotoOutput instance is removed.');
-})
-```
-
-### removeOutput(videoOutput: VideoOutput, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **VideoOutput** instance from this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|----------------------|-----------|------------------------------------|
-| videoOutput | VideoOutput | Yes | VideoOutput instance to remove |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.removeOutput(videoOutput, (err) => {
- if (err) {
- console.error('Failed to remove the VideoOutput instance. ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the VideoOutput instance is removed.');
-});
-```
-
-### removeOutput(videoOutput: VideoOutput): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Removes a **VideoOutput** instance from this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|---------------|---------------------|-----------|---------------------------------|
-| videoOutput | VideoOutput | Yes | VideoOutput instance to remove |
-
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-captureSession.removeOutput(videoOutput).then(() => {
- console.log('Promise returned to indicate that the VideoOutput instance is removed.');
-})
-```
-
-### start\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.start((err) => {
- if (err) {
- console.error('Failed to start the session ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the session start success.');
-});
-```
-
-### start\(\): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.start().then(() => {
- console.log('Promise returned to indicate the session start success.');
-})
-```
-
-### stop\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Stops this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.stop((err) => {
- if (err) {
- console.error('Failed to stop the session ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the session stop success.');
-});
-```
-
-### stop(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Stops this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.stop().then(() => {
- console.log('Promise returned to indicate the session stop success.');
-})
-```
-
-### release\(callback: AsyncCallback\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **CaptureSession** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-captureSession.release((err) => {
- if (err) {
- console.error('Failed to release the CaptureSession instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the CaptureSession instance is released successfully.');
-});
-```
-
-### release(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **CaptureSession** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-captureSession.release().then(() => {
- console.log('Promise returned to indicate that the CaptureSession instance is released successfully.');
-})
-```
-
-### on(type: 'error', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for **CaptureSession** errors. This method uses a callback to get errors.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Capture session error event. |
-| callback | Callback | Yes | Callback used to get the capture session errors. |
-
-**Example**
-
-```
-captureSession.on('error', (captureSessionError) => {
- console.log('Capture session error code: ' + captureSessionError.code);
-})
-```
-
-## createPreviewOutput(surfaceId: string, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **PreviewOutput** instance. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-------------------------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from XComponent view |
-| callback | AsyncCallback | Yes | Callback used to return the PreviewOutput instance |
-
-**Example**
-
-```
-camera.createPreviewOutput((surfaceId), (err, previewOutput) => {
- if (err) {
- console.error('Failed to create the PreviewOutput instance. ${err.message}');
- return;
- }
- console.log('Callback returned with previewOutput instance');
-});
-```
-
-## createPreviewOutput(surfaceId: string): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **PreviewOutput** instance. This method uses a promise to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-----------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from XComponent view |
-
-**Return values**
-
-| Type | Description |
-|-------------------------|---------------------------------------------------|
-| Promise | Promise used to return the PreviewOutput instance |
-
-**Example**
-
-```
-camera.createPreviewOutput(surfaceId).then((previewOutput) => {
- console.log('Promise returned with the PreviewOutput instance');
-})
-```
-
-## PreviewOutput
-
-Implements preview output.
-
-### release(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **PreviewOutput** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-previewOutput.release((err) => {
- if (err) {
- console.error('Failed to release the PreviewOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PreviewOutput instance is released successfully.');
-});
-```
-
-### release(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **PreviewOutput** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|-----------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-previewOutput.release().then(() => {
- console.log('Promise returned to indicate that the PreviewOutput instance is released successfully.');
-})
-```
-
-### on(type: 'frameStart', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for preview frame start events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :---------------- | :-------- | :----------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-previewOutput.on('frameStart', () => {
- console.log('Preview frame started');
-})
-```
-
-### on(type: 'frameEnd', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for preview frame end event. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :---------------- | :-------- | :----------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-previewOutput.on('frameEnd', () => {
- console.log('Preview frame ended');
-})
-```
-
-### on(type: 'error', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for **PreviewOutput** errors. This method uses a callback to get errors.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Preview output error event. |
-| callback | Callback | Yes | Callback used to get the preview output errors. |
-
-**Example**
-
-```
-previewOutput.on('error', (previewOutputError) => {
- console.log('Preview output error code: ' + previewOutputError.code);
-})
-```
-
-## createPhotoOutput(surfaceId: string, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **PhotoOutput** instance. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-------------------------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from ImageReceiver |
-| callback | AsyncCallback | Yes | Callback used to return the PhotoOutput instance |
-
-**Example**
-
-```
-camera.createPhotoOutput((surfaceId), (err, photoOutput) => {
- if (err) {
- console.error('Failed to create the PhotoOutput instance. ${err.message}');
- return;
- }
- console.log('Callback returned with the PhotoOutput instance.');
-});
-```
-
-## createPhotoOutput(surfaceId: string): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **PhotoOutput** instance. This method uses a promise to return the PhotoOutput instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-----------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from ImageReceiver |
-
-**Return values**
-
-| Type | Description |
-|-------------------------|--------------------------------------------------|
-| Promise | Promise used to return the PhotoOutput instance |
-
-**Example**
-
-```
-camera.createPhotoOutput(surfaceId).then((photoOutput) => {
- console.log('Promise returned with PhotoOutput instance');
-})
-```
-## ImageRotation
-
-Enumerates the image rotation angles.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default Value | Description |
-|--------------|---------------|----------------------------------------|
-| ROTATION_0 | 0 | The capture image rotates 0 degrees |
-| ROTATION_90 | 90 | The capture image rotates 90 degrees |
-| ROTATION_180 | 180 | The capture image rotates 180 degrees |
-| ROTATION_270 | 270 | The capture image rotates 270 degrees |
-
-
-## Location
-
-Defines the location of a captured image.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Type | Access | Description |
-|-----------|--------|--------------|-------------|
-| latitude | number | read / write | Latitude |
-| longitude | number | read / write | Longitude |
-
-## QualityLevel
-
-Enumerates the image quality levels.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Default value | Description |
-|----------------------|---------------|----------------------|
-| QUALITY_LEVEL_HIGH | 0 | High image quality |
-| QUALITY_LEVEL_MEDIUM | 1 | Medium image quality |
-| QUALITY_LEVEL_LOW | 2 | Low image quality |
-
-
-## PhotoCaptureSetting
-
-Defines the settings for image capture.
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-| Name | Type | Mandatory | Description |
-|----------|---------------|-----------|---------------------|
-| quality | QualityLevel | Optional | Photo image quality |
-| rotation | ImageRotation | Optional | Photo rotation |
-
-
-## PhotoOutput
-
-Implements photo output.
-
-### capture(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Captures a photo. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|---------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-photoOutput.capture((err) => {
- if (err) {
- console.error('Failed to capture the photo ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the photo capture request success.');
-});
-```
-
-### capture(setting: PhotoCaptureSetting, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Captures a photo with the specified capture settings. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| setting | PhotoCaptureSetting | Yes | Photo capture settings |
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-photoOutput.capture(settings, (err) => {
- if (err) {
- console.error('Failed to capture the photo ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the photo capture request success.');
-});
-```
-
-### capture(setting?: PhotoCaptureSetting): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Captures a photo with the specified capture settings. This method uses a promise to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|---------------------|-----------|----------------------------------------------|
-| setting | PhotoCaptureSetting | No | Photo capture settings |
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-photoOutput.capture().then(() => {
- console.log('Promise returned to indicate that photo capture request success.');
-})
-```
-
-### release(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **PhotoOutput** instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-photoOutput.release((err) => {
- if (err) {
- console.error('Failed to release the PhotoOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the PhotoOutput instance is released successfully.');
-});
-```
-
-### release(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this **PhotoOutput** instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-photoOutput.release().then(() => {
- console.log('Promise returned to indicate that the PhotoOutput instance is released successfully.');
-})
-```
-
-### on(type: 'captureStart', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for photo capture start events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to get the capture ID. |
-
-**Example**
-
-```
-photoOutput.on('captureStart', (captureId) => {
- console.log('photo capture stated, captureId : ' + captureId);
-})
-```
-
-### on(type: 'frameShutter', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for frame shutter events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to get the frame shutter information.|
-
-**Example**
-
-```
-photoOutput.on('frameShutter', (frameShutterInfo) => {
- console.log('photo capture end, captureId : ' + frameShutterInfo.captureId);
- console.log('Timestamp for frame : ' + frameShutterInfo.timestamp);
-})
-```
-
-### on(type: 'captureEnd', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for photo capture end events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :------------------------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to get the capture end information |
-
-**Example**
-
-```
-photoOutput.on('captureEnd', (captureEndInfo) => {
- console.log('photo capture end, captureId : ' + captureEndInfo.captureId);
- console.log('frameCount : ' + captureEndInfo.frameCount);
-})
-```
-
-### on(type: 'error', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for **PhotoOutput** errors. This method uses a callback to get errors.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Photo output error event. |
-| callback | Callback | Yes | Callback used to get the photo output errors. |
-
-**Example**
-
-```
-photoOutput.on('error', (photoOutputError) => {
- console.log('Photo output error code: ' + photoOutputError.code);
-})
-```
-
-## createVideoOutput(surfaceId: string, callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **VideoOutput** instance. This method uses an asynchronous callback to return the instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-------------------------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from VideoRecorder |
-| callback | AsyncCallback | Yes | Callback used to return the VideoOutput instance |
-
-**Example**
-
-```
-camera.createVideoOutput((surfaceId), (err, videoOutput) => {
- if (err) {
- console.error('Failed to create the VideoOutput instance. ${err.message}');
- return;
- }
- console.log('Callback returned with the VideoOutput instance');
-});
-```
-
-## createVideoOutput(surfaceId: string): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Creates a **VideoOutput** instance. This method uses a promise to return the VideoOutput instance.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|------------|-----------------|-----------|----------------------------------------------------|
-| surfaceId | string | Yes | Surface ID received from VideoRecorder |
-
-**Return values**
-
-| Type | Description |
-|---------------------------------------|-------------------------------------------------|
-| Promise<[VideoOutput](#videooutput)\> | Promise used to return the VideoOutput instance |
-
-**Example**
-
-```
-camera.createVideoOutput(surfaceId).then((videoOutput) => {
- console.log('Promise returned with the VideoOutput instance');
-})
-```
-## VideoOutput
-
-Implements video output.
-
-### start(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts the video output. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-videoOutput.start((err) => {
- if (err) {
- console.error('Failed to start the video output ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the video output start success.');
-});
-```
-
-### start(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Starts the video output. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-videoOutput.start().then(() => {
- console.log('Promise returned to indicate that start method execution success.');
-})
-```
-
-### stop(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Stops the video output. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-videoOutput.stop((err) => {
- if (err) {
- console.error('Failed to stop the video output ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate the video output stop success.');
-});
-```
-
-### stop(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Stops the video output. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-**Example**
-
-```
-videoOutput.start().then(() => {
- console.log('Promise returned to indicate that stop method execution success.');
-})
-```
-
-### release(callback: AsyncCallback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this VideoOutput instance. This method uses an asynchronous callback to return the result.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------|-----------|----------------------------------------------|
-| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-videoOutput.release((err) => {
- if (err) {
- console.error('Failed to release the VideoOutput instance ${err.message}');
- return;
- }
- console.log('Callback invoked to indicate that the VideoOutput instance is released successfully.');
-});
-```
-
-### release(): Promise;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Releases this VideoOutput instance. This method uses a promise to return the result.
-
-**Return values**
-
-| Type | Description |
-|----------------|---------------------------------------------|
-| Promise | Promise used to return the result |
-
-
-**Example**
-
-```
-videoOutput.release().then(() => {
- console.log('Promise returned to indicate that the VideoOutput instance is released successfully.');
-})
-```
-
-### on(type: 'frameStart', callback: Callback): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Listens for video frame start events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :---------------- | :-------- | :----------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-videoOutput.on('frameStart', () => {
- console.log('Video frame started');
-})
-```
-
-### on(type: 'frameEnd', callback: Callback): void;
-
-Listens for video frame end events. This method uses a callback to get the event information.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :---------------- | :-------- | :----------------------------------|
-| type | string | Yes | Name of the event to listen for. |
-| callback | Callback | Yes | Callback used to return the result |
-
-**Example**
-
-```
-videoOutput.on('frameEnd', () => {
- console.log('Video frame ended');
-})
-```
-
-### on(type: 'error', callback: Callback): void;
-
-Listens for **VideoOutput** errors. This method uses a callback to get errors.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| :------- | :--------------------- | :-------- | :-----------------------------------------------|
-| type | string | Yes | Video output error event. |
-| callback | Callback | Yes | Callback used to get the video output errors. |
-
-**Example**
-
-```
-videoOutput.on('error', (VideoOutputError) => {
- console.log('Video output error code: ' + VideoOutputError.code);
-})
-```
\ No newline at end of file
diff --git a/en/application-dev/reference/apis/js-apis-data-preferences.md b/en/application-dev/reference/apis/js-apis-data-preferences.md
deleted file mode 100644
index 31d9f3831681723461ec95cbcae475230187c346..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-data-preferences.md
+++ /dev/null
@@ -1,623 +0,0 @@
-# Lightweight Storage
-
-Lightweight storage provides applications with data processing capability and allows applications to perform lightweight data storage and query. Data is stored in key-value (KV) pairs. Keys are of the string type, and values can be of the number, string, or Boolean type.
-
-
->  **NOTE**
-> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-
-
-## Modules to Import
-
-```
-import data_Preferences from '@ohos.data.preferences'
-```
-
-## Attributes
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-| Name| Type| Readable| Writable| Description|
-| -------- | -------- | -------- | -------- | -------- |
-| MAX_KEY_LENGTH | string | Yes| No| Maximum length of a key. It is 80 bytes.|
-| MAX_VALUE_LENGTH | string | Yes| No| Maximum length of a value of the string type. It is 8192 bytes.|
-
-
-## data_Preferences.getPreferences
-
-getPreferences(context: Context, name: string, callback: AsyncCallback<Preferences>): void
-
-Reads a file and loads the data to the **Preferences** instance. This method uses an asynchronous callback to return the execution result.
-
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
- | callback | AsyncCallback<[Preferences](#preferences)> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- var path = this.context.getDataBaseDir()
- data_Preferences.getPreferences(this.context, 'mystore', function (err, preferences) {
- if (err) {
- console.info("Get the preferences failed, path: " + path + '/mystore')
- return;
- }
- preferences.putSync('startup', 'auto')
- preferences.flushSync()
- })
- ```
-
-
-## data_Preferences.getPreferences
-
-getPreferences(context: Context, name: string): Promise<Preferences>
-
-Reads a file and loads the data to the **Preferences** instance. This method uses a promise to return the execution result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<[Preferences](#preferences)> | Promise used to return the result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- var path = this.context.getDataBaseDir()
- let promisePre = data_Preferences.getPreferences(this.context, 'mystore')
- promisePre.then((preferences) => {
- preferences.putSync('startup', 'auto')
- preferences.flushSync()
- }).catch((err) => {
- console.info("Get the preferences failed, path: " + path + '/mystore')
- })
- ```
-
-
-## data_Preferences.deletePreferences
-
-deletePreferences(context: Context, name: string, callback: AsyncCallback<void>): void
-
-Removes the singleton **Preferences** instance of the specified file from the memory, and deletes the specified file, its backup file, and corrupted files. After the specified files are deleted, the **Preferences** instance cannot be used for data operations. Otherwise, data inconsistency will occur. This method uses an asynchronous callback to return the execution result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- data_Preferences.deletePreferences(this.context, 'mystore', function (err) {
- if (err) {
- console.info("Deleted failed with err: " + err)
- return
- }
- console.info("Deleted successfully.")
- })
- ```
-
-
-## data_Preferences.deletePreferences
-
-deletePreferences(context: Context, name: string): Promise<void>
-
-Removes the singleton **Preferences** instance of the specified file from the memory, and deletes the specified file, its backup file, and corrupted files. After the specified files are deleted, the **Preferences** instance cannot be used for data operations. Otherwise, data inconsistency will occur. This method uses a promise to return the execution result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- let promisedelPre = data_Preferences.deletePreferences(this.context, 'mystore')
- promisedelPre.then(() => {
- console.info("Deleted successfully.")
- }).catch((err) => {
- console.info("Deleted failed with err: " + err)
- })
- ```
-
-
-## data_Preferences.removePreferencesFromCache
-
-removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback<void>): void
-
-Removes the singleton **Preferences** instance of a file from the cache. The removed instance cannot be used for data operations. Otherwise, data inconsistency will occur.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- data_Preferences.removePreferencesFromCache(this.context, 'mystore', function (err) {
- if (err) {
- console.info("Removed preferences from cache failed with err: " + err)
- return
- }
- console.info("Removed preferences from cache successfully.")
- })
- ```
-
-
-## data_Preferences.removePreferencesFromCache
-
-removePreferencesFromCache(context: Context, name: string): Promise<void>
-
-Removes the singleton **Preferences** instance of a file from the cache. The removed instance cannot be used for data operations. Otherwise, data inconsistency will occur.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | context | Context | Yes| Context of the app or functionality.|
- | name | string | Yes| Name of the app's internal data storage.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- import Ability from '@ohos.application.Ability'
- import data_Preferences from '@ohos.data.preferences'
- let promiserevPre = data_Preferences.removePreferencesFromCache(this.context, 'mystore')
- promiserevPre.then(() => {
- console.info("Removed preferences from cache successfully.")
- }).catch((err) => {
- console.info("Removed preferences from cache failed with err: " + err)
- })
- ```
-
-
-## Preferences
-
-Provides APIs for obtaining and modifying storage data.
-
-
-### get
-
-get(key: string, defValue: ValueType, callback: AsyncCallback<ValueType>): void
-
-Obtains the value corresponding to a key. If the value is null or not in the default value format, the default value is returned.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data. It cannot be empty.|
- | defValue | ValueType | Yes| Default value to be returned. It can be a number, string, or Boolean value.|
- | callback | AsyncCallback<ValueType> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- preferences.get('startup', 'default', function(err, value) {
- if (err) {
- console.info("Get the value of startup failed with err: " + err)
- return
- }
- console.info("The value of startup is " + value)
- })
- ```
-
-
-### get
-
-get(key: string, defValue: ValueType): Promise<ValueType>
-
-Obtains the value corresponding to a key. If the value is null or not in the default value format, the default value is returned.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data. It cannot be empty.|
- | defValue | ValueType | Yes| Default value to be returned. It can be a number, string, or Boolean value.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<ValueType> | Promise used to return the result.|
-
-- Example
- ```
- let promiseget = preferences.get('startup', 'default')
- promiseget.then((value) => {
- console.info("The value of startup is " + value)
- }).catch((err) => {
- console.info("Get the value of startup failed with err: " + err)
- })
- ```
-
-
-### put
-
-put(key: string, value: ValueType, callback: AsyncCallback<void>): void
-
-Obtains the **Preferences** instance corresponding to the specified file, writes data to the **Preferences** instance using a **Preferences** API, and saves data to the file using **flush()** or **flushSync()**.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data to modify. It cannot be empty.|
- | value | ValueType | Yes| New value to store. It can be a number, string, or Boolean value.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- preferences.put('startup', 'auto', function (err) {
- if (err) {
- console.info("Put the value of startup failed with err: " + err)
- return
- }
- console.info("Put the value of startup successfully.")
- })
- ```
-
-
-### put
-
-put(key: string, value: ValueType): Promise<void>
-
-Obtains the **Preferences** instance corresponding to the specified file, writes data to the **Preferences** instance using a **Preferences** API, and saves data to the file using **flush()** or **flushSync()**.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data to modify. It cannot be empty.|
- | value | ValueType | Yes| New value to store. It can be a number, string, or Boolean value.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- let promiseput = preferences.put('startup', 'auto')
- promiseput.then(() => {
- console.info("Put the value of startup successfully.")
- }).catch((err) => {
- console.info("Put the value of startup failed with err: " + err)
- })
- ```
-
-
-### has
-
-has(key: string, callback: AsyncCallback<boolean>): boolean
-
-Checks whether the **Preference** object contains data with a given key.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data. It cannot be empty.|
- | callback | AsyncCallback<boolean> | Yes| Callback used to return the execution result.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | boolean | Returns **true** if the **Preference** object contains data with the specified key; returns **false** otherwise.|
-
-- Example
- ```
- preferences.has('startup', function (err, isExist) {
- if (err) {
- console.info("Check the key of startup failed with err: " + err)
- return
- }
- if (isExist) {
- console.info("The key of startup is contained.")
- }
- })
- ```
-
-
-### has
-
-has(key: string): Promise<boolean>
-
-Checks whether the **Preference** object contains data with a given key.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data. It cannot be empty.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<boolean> | Promise used to return the result.|
-
-- Example
- ```
- let promisehas = preferences.has('startup')
- promisehas.then((isExist) => {
- if (isExist) {
- console.info("The key of startup is contained.")
- }
- }).catch((err) => {
- console.info("Check the key of startup failed with err: " + err)
- })
- ```
-
-
-### delete
-
-delete(key: string, callback: AsyncCallback<void>): void
-
-Deletes data with the specified key from this **Preference** object.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data. It cannot be empty.|
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- preferences.delete('startup', function (err) {
- if (err) {
- console.info("Delete startup key failed with err: " + err)
- return
- }
- console.info("Deleted startup key successfully.")
- })
- ```
-
-
-### delete
-
-delete(key: string): Promise<void>
-
-Deletes data with the specified key from this **Preference** object.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | key | string | Yes| Key of the data.|
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- let promisedel = preferences.delete('startup')
- promisedel.then(() => {
- console.info("Deleted startup key successfully.")
- }).catch((err) => {
- console.info("Delete startup key failed with err: " + err)
- })
- ```
-
-
-### flush
-
-flush(callback: AsyncCallback<void>): void
-
-Saves the modification of this object to the **Preferences** instance and synchronizes the modification to the file.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- preferences.flush(function (err) {
- if (err) {
- console.info("Flush to file failed with err: " + err)
- return
- }
- console.info("Flushed to file successfully.")
- })
- ```
-
-
-### flush
-
-flush(): Promise<void>
-
-Saves the modification of this object to the **Preferences** instance and synchronizes the modification to the file.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- let promiseflush = preferences.flush()
- promiseflush.then(() => {
- console.info("Flushed to file successfully.")
- }).catch((err) => {
- console.info("Flush to file failed with err: " + err)
- })
- ```
-
-
-### clear
-
-clear(callback: AsyncCallback<void>): void
-
-Clears this **Preferences** object.
-
-This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Mandatory| Description|
- | -------- | -------- | -------- | -------- |
- | callback | AsyncCallback<void> | Yes| Callback used to return the execution result.|
-
-- Example
- ```
- preferences.clear(function (err) {
- if (err) {
- console.info("Clear to file failed with err: " + err)
- return
- }
- console.info("Cleared to file successfully.")
- })
- ```
-
-
-### clear
-
-clear(): Promise<void>
-
-Clears this **Preferences** object.
-
-This method uses a promise to return the result.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Return value
- | Type| Description|
- | -------- | -------- |
- | Promise<void> | Promise used to return the result.|
-
-- Example
- ```
- let promiseclear = preferences.clear()
- promiseclear.then(() => {
- console.info("Cleared to file successfully.")
- }).catch((err) => {
- console.info("Clear to file failed with err: " + err)
- })
- ```
-
-
-### on('change')
-
-on(type: 'change', callback: Callback<{ key : string }>): void
-
-Subscribes to data changes. When the value of the subscribed key changes, a callback will be invoked after the **flush()** method is executed.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Description|
- | -------- | -------- | -------- |
- | type | string | Event type. The value **change** indicates data change events.|
- | callback | Callback<{ key : string }> | Callback used to return data changes.|
-
-- Example
- ```
- var observer = function (key) {
- console.info("The key of " + key + " changed.")
- }
- preferences.on('change', observer)
- preferences.put('startup', 'auto')
- preferences.flush() // observer will be called.
- ```
-
-
-### off('change')
-
-off(type: 'change', callback: Callback<{ key : string }>): void
-
-Unsubscribes from data changes.
-
-**System capability**: SystemCapability.DistributedDataManager.Preferences.Core
-
-- Parameters
- | Name| Type| Description|
- | -------- | -------- | -------- |
- | type | string | Event type. The value **change** indicates data change events.|
- | callback | Callback<{ key : string }> | Callback used to return data changes.|
-
-- Example
- ```
- var observer = function (key) {
- console.info("The key of " + key + " changed.")
- }
- preferences.off('change', observer)
- ```
diff --git a/en/application-dev/reference/apis/js-apis-data-storage.md b/en/application-dev/reference/apis/js-apis-data-storage.md
index 6f563185d3e06f23f584f13b2974074299b6c445..1f77fa17150dfa3b26394418a7b4411cde17a986 100644
--- a/en/application-dev/reference/apis/js-apis-data-storage.md
+++ b/en/application-dev/reference/apis/js-apis-data-storage.md
@@ -4,7 +4,7 @@ Lightweight storage provides applications with data processing capability and al
>  **NOTE**
-> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. The APIs of this module are no longer maintained since API Version 9. You are advised to use [@ohos.data.preferences](js-apis-data-preferences.md).
+> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
@@ -45,7 +45,7 @@ Reads a file and loads the data to the **Storage** instance in synchronous mode.
```
import dataStorage from '@ohos.data.storage'
import featureAbility from '@ohos.ability.featureAbility'
-
+
var context = featureAbility.getContext()
var path = await context.getFilesDir()
let storage = dataStorage.getStorageSync(path + '/mystore')
@@ -72,7 +72,7 @@ Reads a file and loads the data to the **Storage** instance. This method uses an
```
import dataStorage from '@ohos.data.storage'
import featureAbility from '@ohos.ability.featureAbility'
-
+
var context = featureAbility.getContext()
var path = await context.getFilesDir()
dataStorage.getStorage(path + '/mystore', function (err, storage) {
@@ -108,7 +108,7 @@ Reads a file and loads the data to the **Storage** instance. This method uses a
```
import dataStorage from '@ohos.data.storage'
import featureAbility from '@ohos.ability.featureAbility'
-
+
var context = featureAbility.getContext()
var path = await context.getFilesDir()
let promisegetSt = dataStorage.getStorage(path + '/mystore')
diff --git a/en/application-dev/reference/apis/js-apis-display.md b/en/application-dev/reference/apis/js-apis-display.md
index d0c2ad5562ab851003c8e33828fdeb25f5f68847..8a787a420d2f2ec87d298c42f5f0b9533d5953e6 100644
--- a/en/application-dev/reference/apis/js-apis-display.md
+++ b/en/application-dev/reference/apis/js-apis-display.md
@@ -38,7 +38,7 @@ Describes the attributes of a display.
| id | number | Yes| No| ID of the display.|
| name | string | Yes| No| Name of the display.|
| alive | boolean | Yes| No| Whether the display is alive.|
-| state | [DisplayState](#DisplayState) | Yes| No| State of the display.|
+| state | [DisplayState](#displaystate) | Yes| No| State of the display.|
| refreshRate | number | Yes| No| Refresh rate of the display.|
| rotation | number | Yes| No| Screen rotation angle of the display.|
| width | number | Yes| No| Width of the display, in pixels.|
@@ -61,7 +61,7 @@ Obtains the default display object.
- Parameters
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
- | callback | AsyncCallback<[Display](#Display)> | Yes| Callback used to return the default display object.|
+ | callback | AsyncCallback<[Display](#display)> | Yes| Callback used to return the default display object.|
- Example
```
@@ -88,7 +88,7 @@ Obtains the default display object.
| Type | Description |
| ---------------------------------- | ---------------------------------------------- |
- | Promise<[Display](#Display)> | Promise used to return the default display object.|
+ | Promise<[Display](#display)> | Promise used to return the default display object.|
- Example
@@ -113,7 +113,7 @@ Obtains all the display objects.
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------------- | ---- | ------------------------------- |
- | callback | AsyncCallback<Array<[Display](Display)>> | Yes | Callback used to return all the display objects.|
+ | callback | AsyncCallback<Array<[Display](#display)>> | Yes | Callback used to return all the display objects.|
- Example
@@ -139,7 +139,7 @@ Obtains all the display objects.
| Type | Description |
| ----------------------------------------------- | ------------------------------------------------------- |
- | Promise<Array<[Display](#Display)>> | Promise used to return an array containing all the display objects.|
+ | Promise<Array<[Display](#display)>> | Promise used to return an array containing all the display objects.|
- Example
diff --git a/en/application-dev/reference/apis/js-apis-basic-features-logs.md b/en/application-dev/reference/apis/js-apis-logs.md
similarity index 100%
rename from en/application-dev/reference/apis/js-apis-basic-features-logs.md
rename to en/application-dev/reference/apis/js-apis-logs.md
diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md
index 89c0c298d6a369fcf7ac7fc3abc63be304b56977..ae07870d380fb69569ef860b469f865b2d3baad6 100644
--- a/en/application-dev/reference/apis/js-apis-media.md
+++ b/en/application-dev/reference/apis/js-apis-media.md
@@ -125,73 +125,6 @@ Creates an **AudioRecorder** instance to control audio recording.
let audiorecorder = media.createAudioRecorder();
```
-## media.createVideoRecorder9+
-
-createVideoRecorder(callback: AsyncCallback\<[VideoRecorder](#videorecorder9)>): void
-
-Creates a **VideoRecorder** instance in asynchronous mode. This API uses a callback to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | ----------------------------------------------- | ---- | ------------------------------ |
-| callback | AsyncCallback<[VideoRecorder](#videorecorder9)> | Yes | Callback used to return the **VideoRecorder** instance created.|
-
-**Example**
-
-```js
-let videoRecorder
-
-media.createVideoRecorder((error, video) => {
- if (typeof(video) != 'undefined') {
- videoRecorder = video;
- console.info('video createVideoRecorder success');
- } else {
- console.info(`video createVideoRecorder fail, error:${error.message}`);
- }
-});
-```
-
-## media.createVideoRecorder9+
-
-createVideoRecorder(): Promise<[VideoRecorder](#videorecorder9)>
-
-Creates a **VideoRecorder** instance in asynchronous mode. This API uses a promise to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| ----------------------------------------- | ----------------------------------- |
-| Promise<[VideoRecorder](#videorecorder9)> | Promise used to return the **VideoRecorder** instance created.|
-
-**Example**
-
-```js
-let videoRecorder
-
-function failureCallback(error) {
- console.info(`video failureCallback, error:${error.message}`);
-}
-function catchCallback(error) {
- console.info(`video catchCallback, error:${error.message}`);
-}
-
-await media.createVideoRecorder.then((video) => {
- if (typeof(video) != 'undefined') {
- videoRecorder = video;
- console.info('video createVideoRecorder success');
- } else {
- console.info('video createVideoRecorder fail');
- }
-}, failureCallback).catch(catchCallback);
-```
-
-
-
## MediaErrorCode8+
Enumerates the media error codes.
@@ -1836,662 +1769,6 @@ Enumerates the audio output formats.
| AMR_WB | 4 | AMR_WB. This API is merely defined in OpenHarmony 3.1 Release and cannot be used currently. It can be used in OpenHarmony 3.1 MR.|
| AAC_ADTS | 6 | Audio Data Transport Stream (ADTS), which is a transport stream format of AAC-based audio.|
-## VideoRecorder9+
-
-Implements video recording. Before calling an API of the **VideoRecorder** class, you must call [createVideoRecorder()](#mediacreatevideorecorder9) to create a [VideoRecorder](#videorecorder9) instance.
-
-For details about the video recording demo, see [Video Recording Development](../../media/video-recorder.md).
-
-### Attributes
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Type | Readable| Writable| Description |
-| ------------------ | -------------------------------------- | ---- | ---- | ---------------- |
-| state8+ | [VideoRecordState](#videorecordstate9) | Yes | No | Video recording state.|
-
-### prepare9+
-
-prepare(config: VideoRecorderConfig, callback: AsyncCallback\): void;
-
-Sets video recording parameters in asynchronous mode. This API uses a callback to return the result.
-
-**Required permissions:** ohos.permission.MICROPHONE and ohos.permission.CAMERA
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------------------------------- | ---- | ----------------------------------- |
-| config | [VideoRecorderConfig](#videorecorderconfig9) | Yes | Video recording parameters to set. |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-let videoProfile = {
- audioBitrate : 48000,
- audioChannels : 2,
- audioCodec : 'audio/mp4a-latm',
- audioSampleRate : 48000,
- fileFormat : 'mp4',
- videoBitrate : 48000,
- videoCodec : 'video/mp4v-es',
- videoFrameWidth : 640,
- videoFrameHeight : 480,
- videoFrameRate : 30
-}
-
-let videoConfig = {
- audioSourceType : 1,
- videoSourceType : 0,
- profile : videoProfile,
- url : 'fd://xx', // The file must be created by the caller and granted with proper permissions.
- orientationHint : 0,
- location : { latitude : 30, longitude : 130 },
-}
-
-// asyncallback
-let videoRecorder = null;
-let events = require('events');
-let eventEmitter = new events.EventEmitter();
-
-eventEmitter.on('prepare', () => {
- videoRecorder.prepare(videoConfig, (err) => {
- if (typeof (err) == 'undefined') {
- console.info('prepare success');
- } else {
- console.info('prepare failed and error is ' + err.message);
- }
- });
-});
-
-media.createVideoRecorder((err, recorder) => {
- if (typeof (err) == 'undefined' && typeof (recorder) != 'undefined') {
- videoRecorder = recorder;
- console.info('createVideoRecorder success');
- eventEmitter.emit('prepare'); // Trigger the 'prepare' event.
- } else {
- console.info('createVideoRecorder failed and error is ' + err.message);
- }
-});
-```
-
-### prepare9+
-
-prepare(config: VideoRecorderConfig): Promise\;
-
-Sets video recording parameters in asynchronous mode. This API uses a promise to return the result.
-
-**Required permissions:** ohos.permission.MICROPHONE and ohos.permission.CAMERA
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name| Type | Mandatory| Description |
-| ------ | -------------------------------------------- | ---- | ------------------------ |
-| config | [VideoRecorderConfig](#videorecorderconfig9) | Yes | Video recording parameters to set.|
-
-**Return value**
-
-| Type | Description |
-| -------------- | ---------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-let videoProfile = {
- audioBitrate : 48000,
- audioChannels : 2,
- audioCodec : 'audio/mp4a-latm',
- audioSampleRate : 48000,
- fileFormat : 'mp4',
- videoBitrate : 48000,
- videoCodec : 'video/mp4v-es',
- videoFrameWidth : 640,
- videoFrameHeight : 480,
- videoFrameRate : 30
-}
-
-let videoConfig = {
- audioSourceType : 1,
- videoSourceType : 0,
- profile : videoProfile,
- url : 'fd://xx', // The file must be created by the caller and granted with proper permissions.
- orientationHint : 0,
- location : { latitude : 30, longitude : 130 },
-}
-
-// promise
-let videoRecorder = null;
-await media.createVideoRecorder().then((recorder) => {
- if (typeof (recorder) != 'undefined') {
- videoRecorder = recorder;
- console.info('createVideoRecorder success');
- } else {
- console.info('createVideoRecorder failed');
- }
-}, (err) => {
- console.info('error hanppend message is ' + err.message);
-}).catch((err) => {
- console.info('catch err error message is ' + err.message);
-});
-
-await videoRecorder.prepare(videoConfig).then(() => {
- console.info('prepare success');
-}, (err) => {
- console.info('prepare failed and error is ' + err.message);
-}).catch((err) => {
- console.info('prepare failed and catch error is ' + err.message);
-});
-```
-
-### getInputSurface9+
-
-getInputSurface(callback: AsyncCallback\): void;
-
-Obtains the surface required for recording in asynchronous mode. This surface is provided for the caller. The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding data.
-
-Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp is based on the system startup time.
-
-This API can be called only after [prepare()](#videorecorder_prepare1) is called.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | ---------------------- | ---- | --------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to obtain the result.|
-
-**Example**
-
-```js
-// asyncallback
-let surfaceID = null; // Surface ID passed to the external system.
-videoRecorder.getInputSurface((err, surfaceId) => {
- if (typeof (err) == 'undefined') {
- console.info('getInputSurface success');
- surfaceID = surfaceId;
- } else {
- console.info('getInputSurface failed and error is ' + err.message);
- }
-});
-```
-
-### getInputSurface9+
-
-getInputSurface(): Promise\;
-
- Obtains the surface required for recording in asynchronous mode. This surface is provided for the caller. The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding data.
-
-Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp is based on the system startup time.
-
-This API can be called only after [prepare()](#videorecorder_prepare1) is called.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| ---------------- | -------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-let surfaceID = null; // Surface ID passed to the external system.
-await videoRecorder.getInputSurface().then((surfaceId) => {
- console.info('getInputSurface success');
- surfaceID = surfaceId;
-}, (err) => {
- console.info('getInputSurface failed and error is ' + err.message);
-}).catch((err) => {
- console.info('getInputSurface failed and catch error is ' + err.message);
-});
-```
-
-### start9+
-
-start(callback: AsyncCallback\): void;
-
-Starts video recording in asynchronous mode. This API uses a callback to return the result.
-
-This API can be called only after [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) are called, because the data source must pass data to the surface first.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.start((err) => {
- if (typeof (err) == 'undefined') {
- console.info('start videorecorder success');
- } else {
- console.info('start videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### start9+
-
-start(): Promise\;
-
-Starts video recording in asynchronous mode. This API uses a promise to return the result.
-
-This API can be called only after [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) are called, because the data source must pass data to the surface first.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.start().then(() => {
- console.info('start videorecorder success');
-}, (err) => {
- console.info('start videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('start videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### pause9+
-
-pause(callback: AsyncCallback\): void;
-
-Pauses video recording in asynchronous mode. This API uses a callback to return the result.
-
-This API can be called only after [start()](#videorecorder_start1) is called. You can resume recording by calling [resume()](#videorecorder_resume1).
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.pause((err) => {
- if (typeof (err) == 'undefined') {
- console.info('pause videorecorder success');
- } else {
- console.info('pause videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### pause9+
-
-pause(): Promise\;
-
-Pauses video recording in asynchronous mode. This API uses a promise to return the result.
-
-This API can be called only after [start()](#videorecorder_start1) is called. You can resume recording by calling [resume()](#videorecorder_resume1).
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.pause().then(() => {
- console.info('pause videorecorder success');
-}, (err) => {
- console.info('pause videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('pause videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### resume9+
-
-resume(callback: AsyncCallback\): void;
-
-Resumes video recording in asynchronous mode. This API uses a callback to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.resume((err) => {
- if (typeof (err) == 'undefined') {
- console.info('resume videorecorder success');
- } else {
- console.info('resume videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### resume9+
-
-resume(): Promise\;
-
-Resumes video recording in asynchronous mode. This API uses a promise to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.resume().then(() => {
- console.info('resume videorecorder success');
-}, (err) => {
- console.info('resume videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('resume videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### stop9+
-
-stop(callback: AsyncCallback\): void;
-
-Stops video recording in asynchronous mode. This API uses a callback to return the result.
-
-To start another recording, you must call [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) again.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.stop((err) => {
- if (typeof (err) == 'undefined') {
- console.info('stop videorecorder success');
- } else {
- console.info('stop videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### stop9+
-
-stop(): Promise\;
-
-Stops video recording in asynchronous mode. This API uses a promise to return the result.
-
-To start another recording, you must call [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) again.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.stop().then(() => {
- console.info('stop videorecorder success');
-}, (err) => {
- console.info('stop videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('stop videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### release9+
-
-release(callback: AsyncCallback\): void;
-
-Releases the video recording resource in asynchronous mode. This API uses a callback to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | -------------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.release((err) => {
- if (typeof (err) == 'undefined') {
- console.info('release videorecorder success');
- } else {
- console.info('release videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### release9+
-
-release(): Promise\;
-
-Releases the video recording resource in asynchronous mode. This API uses a promise to return the result.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ----------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.release().then(() => {
- console.info('release videorecorder success');
-}, (err) => {
- console.info('release videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('release videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### reset9+
-
-reset(callback: AsyncCallback\): void;
-
-Resets video recording in asynchronous mode. This API uses a callback to return the result.
-
-To start another recording, you must call [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) again.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | -------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
-
-**Example**
-
-```js
-// asyncallback
-videoRecorder.reset((err) => {
- if (typeof (err) == 'undefined') {
- console.info('reset videorecorder success');
- } else {
- console.info('reset videorecorder failed and error is ' + err.message);
- }
-});
-```
-
-### reset9+
-
-reset(): Promise\;
-
-Resets video recording in asynchronous mode. This API uses a promise to return the result.
-
-To start another recording, you must call [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) again.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Return value**
-
-| Type | Description |
-| -------------- | ------------------------------------- |
-| Promise\ | Promise used to return the result.|
-
-**Example**
-
-```js
-// promise
-await videoRecorder.reset().then(() => {
- console.info('reset videorecorder success');
-}, (err) => {
- console.info('reset videorecorder failed and error is ' + err.message);
-}).catch((err) => {
- console.info('reset videorecorder failed and catch error is ' + err.message);
-});
-```
-
-### on('error')9+
-
-on(type: 'error', callback: ErrorCallback): void
-
-Subscribes to the video recording error event.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-**Parameters**
-
-| Name | Type | Mandatory| Description |
-| -------- | ------------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'error' in this API. The 'error' event is triggered when an error occurs during video recording.|
-| callback | ErrorCallback | Yes | Callback invoked when the event is triggered. |
-
-**Example**
-
-```js
-videoRecorder.on('error', (error) => { // Set the 'error' event callback.
- console.info(`audio error called, errName is ${error.name}`); // Print the error name.
- console.info(`audio error called, errCode is ${error.code}`); // Print the error code.
- console.info(`audio error called, errMessage is ${error.message}`); // Print the detailed description of the error type.
-});
-// This event is reported when an error occurs during the retrieval of videoRecordState.
-```
-
-## VideoRecordState9+
-
-Enumerates the video recording states. You can obtain the state through the **state** attribute.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Type | Description |
-| -------- | ------ | ---------------------- |
-| idle | string | The video recorder is idle. |
-| prepared | string | The video recording parameters are set.|
-| playing | string | Video recording is in progress. |
-| paused | string | Video recording is paused. |
-| stopped | string | Video recording is stopped. |
-| error | string | Audio playback is in the error state. |
-
-## VideoRecorderConfig9+
-
-Describes the video recording parameters.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Type | Mandatory| Description |
-| --------------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ |
-| audioSourceType | [AudioSourceType](#audiosourcetype9) | Yes | Type of the audio source for video recording. |
-| videoSourceType | [VideoSourceType](#videosourcetype9) | Yes | Type of the video source for video recording. |
-| profile | [VideoRecorderProfile](#videorecorderprofile9) | Yes | Video recording profile. |
-| rotation | number | No | Rotation angle of the recorded video. |
-| location | [Location](#location) | No | Geographical location of the recorded video. |
-| url | string | Yes | Video output URL. Supported: fd://xx (fd number)  The file must be created by the caller and granted with proper permissions.|
-
-## AudioSourceType9+
-
-Enumerates the audio source types for video recording.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Value | Description |
-| ------------------------- | ---- | ---------------------- |
-| AUDIO_SOURCE_TYPE_DEFAULT | 0 | Default audio input source.|
-| AUDIO_SOURCE_TYPE_MIC | 1 | Mic audio input source. |
-
-## VideoSourceType9+
-
-Enumerates the video source types for video recording.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Value | Description |
-| ----------------------------- | ---- | ------------------------------- |
-| VIDEO_SOURCE_TYPE_SURFACE_YUV | 0 | The input surface carries raw data.|
-| VIDEO_SOURCE_TYPE_SURFACE_ES | 1 | The input surface carries ES data. |
-
-## VideoRecorderProfile9+
-
-Describes the video recording profile.
-
-**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-
-| Name | Type | Mandatory| Description |
-| ---------------- | -------------------------------------------- | ---- | ---------------- |
-| audioBitrate | number | Yes | Audio encoding bit rate.|
-| audioChannels | number | Yes | Number of audio channels.|
-| audioCodec | [CodecMimeType](#codecmimetype8) | Yes | Audio encoding format. |
-| audioSampleRate | number | Yes | Audio sampling rate. |
-| fileFormat | [ContainerFormatType](#containerformattype8) | Yes | Container format of a file.|
-| videoBitrate | number | Yes | Video encoding bit rate.|
-| videoCodec | [CodecMimeType](#codecmimetype8) | Yes | Video encoding format. |
-| videoFrameWidth | number | Yes | Width of the recorded video frame.|
-| videoFrameHeight | number | Yes | Height of the recorded video frame.|
-| videoFrameRate | number | Yes | Video frame rate. |
-
## ContainerFormatType8+
Enumerates the container format types (CFTs).
diff --git a/en/application-dev/reference/apis/js-apis-pasteboard.md b/en/application-dev/reference/apis/js-apis-pasteboard.md
new file mode 100644
index 0000000000000000000000000000000000000000..f6bfa278469a5c930c2140078ceee5f0613ec56b
--- /dev/null
+++ b/en/application-dev/reference/apis/js-apis-pasteboard.md
@@ -0,0 +1,1047 @@
+# Pasteboard
+
+
+>  **Note:**
+> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
+
+
+## Modules to Import
+
+
+```
+import pasteboard from '@ohos.pasteboard';
+```
+
+
+## Attributes
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+| Name | Type | Readable | Writable | Description |
+| -------- | -------- | -------- | -------- | -------- |
+| MAX_RECORD_NUM7+ | number | Yes | No | Maximum number of records allowed in a **PasteData** object. |
+| MIMETYPE_TEXT_HTML7+ | string | Yes | No | MIME type of the HTML text. |
+| MIMETYPE_TEXT_WANT7+ | string | Yes | No | MIME type of the Want text. |
+| MIMETYPE_TEXT_PLAIN7+ | string | Yes | No | MIME type of the plain text. |
+| MIMETYPE_TEXT_URI7+ | string | Yes | No | MIME type of the URI text. |
+
+
+## pasteboard.createPlainTextData
+
+createPlainTextData(text:string): PasteData
+
+Creates a **PasteData** object for plain text.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | text | string | Yes | Plain text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteData](#pastedata) | **PasteData** object with the specified content. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("content");
+ ```
+
+
+## pasteboard.createHtmlData7+
+
+createHtmlData(htmlText:string): PasteData
+
+Creates a **PasteData** object for HTML text.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | htmlText | string | Yes | HTML text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteData](#pastedata) | **PasteData** object with the specified content. |
+
+- Example
+
+ ```
+ var html = "\n" + "\n" + "\n" + "\n" + "HTML-PASTEBOARD_HTML\n" + "\n" + "\n" + "
HEAD
\n" + " \n" + "\n" + "";
+ var pasteData = pasteboard.createHtmlData(html);
+ ```
+
+
+## pasteboard.createWantData7+
+
+createWantData(want:Want): PasteData
+
+Creates a **PasteData** object for Want text.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | want | [Want](js-apis-featureAbility.md#want) | Yes | Want text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteData](#pastedata) | **PasteData** object with the specified content. |
+
+- Example
+
+ ```
+ var object = {
+ bundleName: "com.example.aafwk.test",
+ abilityName: "com.example.aafwk.test.TwoAbility"
+ };
+ var pasteData = pasteboard.createWantData(object);
+ ```
+
+
+## pasteboard.createUriData7+
+
+createUriData(uri:string): PasteData
+
+Creates a **PasteData** object for URI text.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | uri | string | Yes | URI text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteData](#pastedata) | **PasteData** object with the specified content. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createUriData("dataability:///com.example.myapplication1?user.txt");
+ ```
+
+
+## pasteboard.createPlainTextRecord7+
+
+createPlainTextRecord(text:string): PasteDataRecord
+
+Creates a **PasteDataRecord** object of the plain text type.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | text | string | Yes | Plain text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataRecord](#pastedatarecord7) | New plain text record. |
+
+- Example
+
+ ```
+ var record = pasteboard.createPlainTextRecord("hello");
+ ```
+
+
+## pasteboard.createHtmlTextRecord7+
+
+createHtmlTextRecord(htmlText:string): PasteDataRecord
+
+Creates a **PasteDataRecord** object of the HTML text type.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | htmlText | string | Yes | HTML text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataRecord](#pastedatarecord7) | New HTML record. |
+
+- Example
+
+ ```
+ var html = "\n" + "\n" + "\n" + "\n" + "HTML-PASTEBOARD_HTML\n" + "\n" + "\n" + "
HEAD
\n" + " \n" + "\n" + "";
+ var record = pasteboard.createHtmlTextRecord(html);
+ ```
+
+
+## pasteboard.createWantRecord7+
+
+createWantRecord(want:Want): PasteDataRecord
+
+Creates a **PasteDataRecord** object of the Want text type.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | want | [Want](js-apis-featureAbility.md#want) | Yes | Want text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataRecord](#pastedatarecord7) | New Want record. |
+
+- Example
+
+ ```
+ var object = {
+ bundleName: "com.example.aafwk.test",
+ abilityName: "com.example.aafwk.test.TwoAbility"
+ };
+ var record = pasteboard.createWantRecord(object);
+ ```
+
+
+## pasteboard.createUriRecord7+
+
+createUriRecord(uri:string): PasteDataRecord
+
+Creates a **PasteDataRecord** object of the URI text type.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | uri | string | Yes | URI text. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataRecord](#pastedatarecord7) | New URI record. |
+
+- Example
+
+ ```
+ var record = pasteboard.createUriRecord("dataability:///com.example.myapplication1?user.txt");
+ ```
+
+
+## PasteDataProperty7+
+
+Defines the properties of all data records on the pasteboard, including the timestamp, data type, and additional data.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+| Name | Type | Readable | Writable | Description |
+| -------- | -------- | -------- | -------- | -------- |
+| additions | {[key: string]: object} | Yes | Yes | Additional property data. |
+| mimeTypes | Array<string> | Yes | No | Non-repeating data types of the data records on the pasteboard. |
+| tag | string | Yes | Yes | User-defined tag. |
+| timestamp | number | Yes | No | Timestamp at which the data is written to the pasteboard, in milliseconds. |
+| localOnly | boolean | Yes | Yes | Whether local access only is set for the pasteboard. - The default value is **true**. - **true**: The **PasteData** is set for local access only. - **false**: The **PasteData** can be shared between devices. |
+
+
+## PasteDataRecord7+
+
+A data record is an abstract definition of the content on the pasteboard. The pasteboard content consists of one or more plain text, HTML, URI, or Want records.
+
+
+### Attributes
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+| Name | Type | Readable | Writable | Description |
+| -------- | -------- | -------- | -------- | -------- |
+| htmlText7+ | string | Yes | No | HTML text. |
+| want7+ | [Want](js-apis-featureAbility.md#want) | Yes | No | Want text. |
+| mimeType7+ | string | Yes | No | Data type. |
+| plainText7+ | string | Yes | No | Plain text. |
+| uri7+ | string | Yes | No | URI text. |
+
+
+### convertToText7+
+
+convertToText(): Promise<string>
+
+Forcibly converts the content in this **PasteData** object to the plain text. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. If the operation is successful, the plain text content after conversion is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ var record = pasteboard.createUriRecord("dataability:///com.example.myapplication1?user.txt");
+ record.convertToText().then((data) => {
+ console.info('convertToText success data : ' + JSON.stringify(data));
+ }).catch((error) => {
+ console.error('convertToText failed because ' + JSON.stringify(error));
+ });
+ ```
+
+
+### convertToText7+
+
+convertToText(callback: AsyncCallback<string>): void
+
+Forcibly converts the content in this **PasteData** object to the plain text. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<string> | Yes | Callback used to return the result. If this callback is successful, the plain text content after conversion is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ var record = pasteboard.createUriRecord("dataability:///com.example.myapplication1?user.txt");
+ record.convertToText((err, data) => {
+ if (err) {
+ console.error('convertToText failed because ' + JSON.stringify(err));
+ return;
+ }
+ console.info('convertToText success data : ' + JSON.stringify(data));
+ });
+ ```
+
+
+## PasteData
+
+Before calling any **PasteData** method, you must obtain a **PasteData** object.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+
+### getPrimaryText
+
+
+getPrimaryText(): string
+
+
+Obtains the plain text of the primary record.
+
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+
+- Parameters
+ None
+
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | string | Plain text. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var plainText = pasteData.getPrimaryText();
+ ```
+
+
+### getPrimaryHtml7+
+
+getPrimaryHtml(): string
+
+Obtains the HTML text of the primary record.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | string | HTML text. |
+
+- Example
+
+ ```
+ var html = "\n" + "\n" + "\n" + "\n" + "HTML-PASTEBOARD_HTML\n" + "\n" + "\n" + "
HEAD
\n" + " \n" + "\n" + "";
+ var pasteData = pasteboard.createHtmlData(html);
+ var htmlText = pasteData.getPrimaryHtml();
+ ```
+
+
+### getPrimaryWant7+
+
+getPrimaryWant(): Want
+
+Obtains the **Want** object of the primary record.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [Want](js-apis-featureAbility.md#want) | Want object. |
+
+- Example
+
+ ```
+ var object = {
+ bundleName: "com.example.aafwk.test",
+ abilityName: "com.example.aafwk.test.TwoAbility"
+ };
+ var pasteData = pasteboard.createWantData(object);
+ var want = pasteData.getPrimaryWant();
+ ```
+
+
+### getPrimaryUri7+
+
+getPrimaryUri(): string
+
+Obtains the URI text of the primary record.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | string | URI text. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createUriData("dataability:///com.example.myapplication1?user.txt");
+ var uri = pasteData.getPrimaryUri();
+ ```
+
+
+### addTextRecord7+
+
+addTextRecord(text: string): void
+
+Adds a plain text record to this pasteboard, and adds **MIME_TEXT_PLAIN** to **mimeTypes** in [PasteDataProperty](#pastedataproperty7). The parameters cannot be empty. Otherwise, the operation fails.
+
+The pasteboard supports a maximum number of 128 data records.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | text | string | Yes | Plain text. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ pasteData.addTextRecord("good");
+ ```
+
+
+### addHtmlRecord7+
+
+addHtmlRecord(htmlText: string): void
+
+Adds an HTML text record to this pasteboard, and adds **MIMETYPE_TEXT_HTML** to **mimeTypes** in [PasteDataProperty](#pastedataproperty7). The parameters cannot be empty. Otherwise, the operation fails.
+
+The pasteboard supports a maximum number of 128 data records.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | htmlText | string | Yes | HTML text. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var html = "\n" + "\n" + "\n" + "\n" + "HTML-PASTEBOARD_HTML\n" + "\n" + "\n" + "
HEAD
\n" + " \n" + "\n" + "";
+ pasteData.addHtmlRecord(html);
+ ```
+
+
+### addWantRecord7+
+
+addWantRecord(want: Want): void
+
+Adds a Want text record to this pasteboard, and adds **MIMETYPE_TEXT_WANT** to **mimeTypes** in [PasteDataProperty](#pastedataproperty7). The parameters cannot be empty. Otherwise, the operation fails.
+
+The pasteboard supports a maximum number of 128 data records.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | want | [Want](js-apis-featureAbility.md#want) | Yes | Want object. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var object = {
+ bundleName: "com.example.aafwk.test",
+ abilityName: "com.example.aafwk.test.TwoAbility"
+ };
+ pasteData.addWantRecord(object);
+ ```
+
+
+### addUriRecord7+
+
+addUriRecord(uri: string): void
+
+Adds a URI text record to this pasteboard, and adds **MIMETYPE_TEXT_URI** to **mimeTypes** in [PasteDataProperty](#pastedataproperty7). The parameters cannot be empty. Otherwise, the operation fails.
+
+The pasteboard supports a maximum number of 128 data records.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | uri | string | Yes | URI text. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ pasteData.addUriRecord("dataability:///com.example.myapplication1?user.txt");
+ ```
+
+
+### addRecord7+
+
+addRecord(record: PasteDataRecord): void
+
+Adds a data record to this pasteboard, and adds its type to **mimeTypes** in [PasteDataProperty](#pastedataproperty7). The parameters cannot be empty. Otherwise, the operation fails.
+
+The pasteboard supports a maximum number of 128 data records.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | record | [PasteDataRecord](#pastedatarecord7) | Yes | Record to add. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createUriData("dataability:///com.example.myapplication1?user.txt");
+ var textRecord = pasteboard.createPlainTextRecord("hello");
+ var html = "\n" + "\n" + "\n" + "\n" + "HTML-PASTEBOARD_HTML\n" + "\n" + "\n" + "
HEAD
\n" + " \n" + "\n" + "";
+ var htmlRecord = pasteboard.createHtmlTextRecord(html);
+ pasteData.addRecord(textRecord);
+ pasteData.addRecord(htmlRecord);
+ ```
+
+
+### getMimeTypes7+
+
+getMimeTypes(): Array<string>
+
+Obtains **mimeTypes** in [PasteDataProperty](#pastedataproperty7) from this pasteboard. If the pasteboard is empty, the returned list is also empty.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Array<string> | List of non-duplicate MIME types. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var types = pasteData.getMimeTypes();
+ ```
+
+
+### getPrimaryMimeType7+
+
+getPrimaryMimeType(): string
+
+Obtains the data type of the primary record.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | string | Data type of the primary record. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var type = pasteData.getPrimaryMimeType();
+ ```
+
+
+### getProperty7+
+
+getProperty(): PasteDataProperty
+
+Obtains the property description object.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataProperty](#pastedataproperty7) | Property description object. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var property = pasteData.getProperty();
+ ```
+
+
+### getRecordAt7+
+
+getRecordAt(index: number): PasteDataRecord
+
+Obtains the record with the specified index.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | index | number | Yes | Index of the specified record. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [PasteDataRecord](#pastedatarecord7) | Record with the specified index. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var record = pasteData.getRecordAt(0);
+ ```
+
+
+### getRecordCount7+
+
+getRecordCount(): number
+
+Obtains the number of data records in this pasteboard.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | number | Number of records. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var count = pasteData.getRecordCount();
+ ```
+
+
+### getTag7+
+
+getTag(): string
+
+Obtains the user-defined tag content. If the tag content is not set, null is returned.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | string | User-defined tag content if obtained and null if no tag is set. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var tag = pasteData.getTag();
+ ```
+
+
+### hasMimeType7+
+
+hasMimeType(mimeType: string): boolean
+
+Checks whether the content of this pasteboard contains the specified data type.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | mimeType | string | Yes | Type of the data to query. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | boolean | Returns **true** if the specified data type exists; returns **false** otherwise. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var hasType = pasteData.hasMimeType(pasteboard.MIMETYPE_TEXT_PLAIN);
+ ```
+
+
+### removeRecordAt7+
+
+removeRecordAt(index: number): boolean
+
+Removes the data record with a specified index from this pasteboard.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | index | number | Yes | Specified index. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | boolean | Returns **true** if the operation is successful; returns **false** otherwise. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var isRemove = pasteData.removeRecordAt(0);
+ ```
+
+
+### replaceRecordAt7+
+
+replaceRecordAt(index: number, record: PasteDataRecord): boolean
+
+Replaces the data record with a specified index in this pasteboard.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | index | number | Yes | Specified index. |
+ | record | [PasteDataRecord](#pastedatarecord7) | Yes | New record. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | boolean | Returns **true** if the operation is successful; returns **false** otherwise. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("hello");
+ var record = pasteboard.createUriRecord("dataability:///com.example.myapplication1?user.txt");
+ var isReplace = pasteData.replaceRecordAt(0, record);
+ ```
+
+
+## pasteboard.getSystemPasteboard
+
+getSystemPasteboard(): SystemPasteboard
+
+Obtains the system pasteboard.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | [SystemPasteboard](#systempasteboard) | System pasteboard. |
+
+- Example
+
+ ```
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ ```
+
+
+## SystemPasteboard
+
+ Before calling any **SystemPasteboard** method, you must obtain a **SystemPasteboard** object using [getSystemPasteboard](#pasteboardgetsystempasteboard).
+
+```
+var systemPasteboard = pasteboard.getSystemPasteboard();
+```
+
+
+### setPasteData
+
+setPasteData(data:PasteData, callback:AsyncCallback<void>): void
+
+Writes data to a pasteboard. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | data | [PasteData](#pastedata) | Yes | **PasteData** object. |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the data write result. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("content");
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ systemPasteboard.setPasteData(pasteData, (error, data) => {
+ if (error) {
+ console.error('Failed to setPasteData. Cause: ' + error.message);
+ return;
+ }
+ console.info('setPasteData successfully.');
+ });
+ ```
+
+
+### setPasteData
+
+setPasteData(data:PasteData): Promise<void>
+
+Writes data to a pasteboard. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Description |
+ | -------- | -------- | -------- |
+ | data | [PasteData](#pastedata) | **PasteData** object. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the data write result. |
+
+- Example
+
+ ```
+ var pasteData = pasteboard.createPlainTextData("content");
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ systemPasteboard.setPasteData(pasteData).then((data) => {
+ console.info('setPasteData success.');
+ }).catch((error) => {
+ console.error('Failed to setPasteData. Cause: ' + error.message);
+ });
+ ```
+
+
+### getPasteData
+
+getPasteData( callback:AsyncCallback<PasteData>): void
+
+Reads the system pasteboard content. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<[PasteData](#pastedata)> | Yes | Callback used to return the system pasteboard data. |
+
+- Example
+
+ ```
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ systemPasteboard.getPasteData((error, pasteData) => {
+ if (error) {
+ console.error('Failed to getPasteData. Cause: ' + error.message);
+ return;
+ }
+ var text = pasteData.getPrimaryText();
+ });
+ ```
+
+
+### getPasteData
+
+getPasteData(): Promise<PasteData>
+
+Reads the system pasteboard content. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<[PasteData](#pastedata)> | Promise used to return the system pasteboard data. |
+
+- Example
+
+ ```
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ systemPasteboard.getPasteData().then((pasteData) => {
+ var text = pasteData.getPrimaryText();
+ }).catch((error) => {
+ console.error('Failed to getPasteData. Cause: ' + error.message);
+ })
+ ```
+
+
+### on('update')7+
+
+on(type: 'update', callback: () =>void ): void
+
+Subscribes to the content change event of the system pasteboard. If the pasteboard content changes, the callback is triggered.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Data type. The value **update** indicates the pasteboard content has changed. |
+ | callback | function | Yes | Callback invoked when the pasteboard content changes. |
+
+- Example
+
+ ```
+ var systemPasteboard = pasteboard.getSystemPasteboard();
+ var listener = ()=>{
+ console.info('The system pasteboard has changed');
+ };
+ systemPasteboard.on('update', listener);
+ ```
+
+
+### off('update')7+
+
+off(type: 'update', callback? : () =>void ): void
+
+Unsubscribes from the system pasteboard content change event.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Data type. The value **update** indicates the pasteboard content has changed. |
+ | callback | function | No | Callback invoked when the pasteboard content changes. |
+
+- Example
+
+ ```
+ systemPasteboard.off('update', listener);
+ ```
+
+
+### hasPasteData7+
+
+hasPasteData(callback: AsyncCallback<boolean>): void
+
+Checks whether the system pasteboard contains content. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Returns **true** if the pasteboard contains content; returns **false** otherwise. |
+
+- Example
+
+ ```
+ systemPasteboard.hasPasteData((err, data) => {
+ if (err) {
+ console.error('failed to hasPasteData because ' + JSON.stringify(err));
+ return;
+ }
+ console.info('success hasPasteData : ' + JSON.stringify(data));
+ });
+ ```
+
+
+### hasPasteData7+
+
+hasPasteData(): Promise<boolean>
+
+Checks whether the system pasteboard contains content. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Returns **true** if the pasteboard contains content; returns **false** otherwise. |
+
+- Example
+
+ ```
+ systemPasteboard.hasPasteData().then((data) => {
+ console.info('Operation succeeded. ' + JSON.stringify(data));
+ }).catch((error) => {
+ console.error('failed to hasPasteData because ' + JSON.stringify(error));
+ });
+ ```
+
+
+### clear7+
+
+clear(callback: AsyncCallback<void>): void
+
+Clears the system pasteboard content. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+
+- Example
+
+ ```
+ systemPasteboard.clear((err, data) => {
+ if (err) {
+ console.error('failed to clear because ' + JSON.stringify(err));
+ return;
+ }
+ console.info('success clear');
+ });
+ ```
+
+
+### clear7+
+
+clear(): Promise<void>
+
+Clears the system pasteboard content. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.Pasteboard
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. |
+
+- Example
+
+ ```
+ systemPasteboard.clear().then((data) => {
+ console.info('success clear');
+ }).catch((error) => {
+ console.error('failed to clear because ' + JSON.stringify(error));
+ });
+ ```
diff --git a/en/application-dev/reference/apis/js-apis-request.md b/en/application-dev/reference/apis/js-apis-request.md
new file mode 100644
index 0000000000000000000000000000000000000000..0a8f08d0210217fcf972ce30e1bdabdcc8e1ac10
--- /dev/null
+++ b/en/application-dev/reference/apis/js-apis-request.md
@@ -0,0 +1,971 @@
+# Upload and Download
+
+
+>  **Note:**
+> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
+
+
+## Modules to Import
+
+
+```
+import request from '@ohos.request';
+```
+
+
+## Constraints
+
+- HTTPS is supported by default. To support HTTP, you need to add **network** to the **config.json** file and set the **cleartextTraffic** attribute to **true**.
+
+ ```
+ "deviceConfig": {
+ "default": {
+ "network": {
+ "cleartextTraffic": true
+ }
+ ...
+ }
+ }
+ ```
+
+
+## Constants
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+| Name | Type | Readable | Writable | Description |
+| -------- | -------- | -------- | -------- | -------- |
+| NETWORK_MOBILE | number | Yes | No | Whether download is allowed when the cellular network is used. |
+| NETWORK_WIFI | number | Yes | No | Whether download is allowed when the WLAN is used. |
+| ERROR_CANNOT_RESUME7+ | number | Yes | No | Failure to resume the download due to an error. |
+| ERROR_DEVICE_NOT_FOUND7+ | number | Yes | No | Failure to find a storage device such as an SD card. |
+| ERROR_FILE_ALREADY_EXISTS7+ | number | Yes | No | Failure to download the file because it already exists. |
+| ERROR_FILE_ERROR7+ | number | Yes | No | File operation failure. |
+| ERROR_HTTP_DATA_ERROR7+ | number | Yes | No | HTTP transmission failure. |
+| ERROR_INSUFFICIENT_SPACE7+ | number | Yes | No | Insufficient storage space. |
+| ERROR_TOO_MANY_REDIRECTS7+ | number | Yes | No | Error caused by too many network redirections. |
+| ERROR_UNHANDLED_HTTP_CODE7+ | number | Yes | No | Unidentified HTTP code. |
+| ERROR_UNKNOWN7+ | number | Yes | No | Unknown error. |
+| PAUSED_QUEUED_FOR_WIFI7+ | number | Yes | No | Download paused and queuing for WLAN connection, because the file size exceeds the maximum value allowed by a cellular network session. |
+| PAUSED_UNKNOWN7+ | number | Yes | No | Download paused due to unknown reasons. |
+| PAUSED_WAITING_FOR_NETWORK7+ | number | Yes | No | Download paused due to a network connection problem, for example, network disconnection. |
+| PAUSED_WAITING_TO_RETRY7+ | number | Yes | No | Download paused and then retried. |
+| SESSION_FAILED7+ | number | Yes | No | Download failure without retry. |
+| SESSION_PAUSED7+ | number | Yes | No | Download paused. |
+| SESSION_PENDING7+ | number | Yes | No | Download pending. |
+| SESSION_RUNNING7+ | number | Yes | No | Download in progress. |
+| SESSION_SUCCESSFUL7+ | number | Yes | No | Successful download. |
+
+
+## request.upload
+
+upload(config: UploadConfig): Promise<UploadTask>
+
+Uploads files. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | config | [UploadConfig](#uploadconfig) | Yes | Configurations of the upload. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<[UploadTask](#uploadtask)> | Promise used to return the **UploadTask** object. |
+
+- Example
+
+ ```
+ request.upload({ url: 'https://patch' }).then((data) => {
+ uploadTask = data;
+ }).catch((err) => {
+ console.error('Failed to request the upload. Cause: ' + JSON.stringify(err));
+ })
+ ```
+
+
+## request.upload
+
+upload(config: UploadConfig, callback: AsyncCallback<UploadTask>): void
+
+Uploads files. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | config | [UploadConfig](#uploadconfig) | Yes | Configurations of the upload. |
+ | callback | AsyncCallback<[UploadTask](#uploadtask)> | No | Callback used to return the **UploadTask** object. |
+
+- Example
+
+ ```
+ request.upload({ url: 'https://patch' }, (err, data) => {
+ if (err) {
+ console.error('Failed to request the upload. Cause: ' + JSON.stringify(err));
+ return;
+ }
+ uploadTask = data;
+ });
+ ```
+
+
+## UploadTask
+
+Implements file uploads. Before using a method of this class, you must obtain an **UploadTask** object.
+
+
+### on('progress')
+
+on(type: 'progress', callback:(uploadedSize: number, totalSize: number) => void): void
+
+Subscribes to the upload progress event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to subscribe to. The value is **progress** (upload progress). |
+ | callback | function | Yes | Callback for the upload progress event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | uploadedSize | number | Yes | Size of the uploaded files, in KB. |
+ | totalSize | number | Yes | Total size of the files to upload, in KB. |
+
+- Example
+
+ ```
+ uploadTask.on('progress', function callback(uploadedSize, totalSize) {
+ console.info("upload totalSize:" + totalSize + " uploadedSize:" + uploadedSize);
+ }
+ );
+ ```
+
+
+### on('headerReceive')7+
+
+on(type: 'headerReceive', callback: (header: object) => void): void
+
+Subscribes to the **headerReceive** event, which is triggered when an HTTP response header is received. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to subscribe to. The value is **headerReceive** (response header). |
+ | callback | function | Yes | Callback for the HTTP Response Header event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | header | object | Yes | HTTP Response Header. |
+
+- Example
+
+ ```
+ uploadTask.on('headerReceive', function callback(headers){
+ console.info("upOnHeader headers:" + JSON.stringify(headers));
+ }
+ );
+ ```
+
+
+### off('progress')
+
+off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void
+
+Unsubscribes from the upload progress event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to unsubscribe from. The value is **progress** (upload progress). |
+ | callback | function | No | Callback for the upload progress event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | uploadedSize | number | Yes | Size of the uploaded files, in KB. |
+ | totalSize | number | Yes | Total size of the files to upload, in KB. |
+
+- Example
+
+ ```
+ uploadTask.off('progress', function callback(uploadedSize, totalSize) {
+ console.info('uploadedSize: ' + uploadedSize, 'totalSize: ' + totalSize);
+ }
+ );
+ ```
+
+
+### off('headerReceive')7+
+
+off(type: 'headerReceive', callback?: (header: object) => void): void
+
+Unsubscribes from the **headerReceive** event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to unsubscribe from. The value is **headerReceive** (response header). |
+ | callback | function | No | Callback for the HTTP Response Header event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | header | object | Yes | HTTP Response Header. |
+
+- Example
+
+ ```
+ uploadTask.off('headerReceive', function callback(headers) {
+ console.info("upOnHeader headers:" + JSON.stringify(headers));
+ }
+ );
+ ```
+
+
+### remove
+
+remove(): Promise<boolean>
+
+Removes this upload task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return the task removal result. If **true** is returned, the task is removed. If **false** is returned, the task fails to be removed. |
+
+- Example
+
+ ```
+ uploadTask.remove().then((result) => {
+ if (result) {
+ console.info('Upload task removed successfully. ');
+ } else {
+ console.error('Failed to remove the upload task. ');
+ }
+ }).catch((err) => {
+ console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err));
+ });
+ ```
+
+
+### remove
+
+remove(callback: AsyncCallback<boolean>): void
+
+Removes this upload task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return the result. |
+
+- Example
+
+ ```
+ uploadTask.remove((err, result) => {
+ if (err) {
+ console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err));
+ return;
+ }
+ if (result) {
+ console.info('Upload task removed successfully.');
+ } else {
+ console.error('Failed to remove the upload task.');
+ }
+ });
+ ```
+
+
+## UploadConfig
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+| Name | Type | Mandatory | Description |
+| -------- | -------- | -------- | -------- |
+| url | string | Yes | Resource URL. |
+| header | object | No | HTTP or HTTPS header added to an upload request. |
+| method | string | No | Request methods available: **POST** and **PUT**. The default value is **POST**. |
+| files | Array<[File](#file)> | Yes | List of files to upload, which is submitted through **multipart/form-data**. |
+| data | Array<[RequestData](#requestdata)> | No | Form data in the request body. |
+
+
+## File
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+| Name | Type | Mandatory | Description |
+| -------- | -------- | -------- | -------- |
+| filename | string | No | File name in the header when **multipart** is used. |
+| name | string | No | Name of a form item when **multipart** is used. The default value is **file**. |
+| uri | string | Yes | Local path for storing files. The **dataability** and **internal** protocol types are supported. However, the **internal** protocol type supports only temporary directories. The following is an example: dataability:///com.domainname.dataability.persondata/person/10/file.txt internal://cache/path/to/file.txt |
+| type | string | No | Type of the file content. By default, the type is obtained based on the extension of the file name or URI. |
+
+
+## RequestData
+
+**System capability**: SystemCapability.MiscServices.Upload
+
+| Name | Type | Mandatory | Description |
+| -------- | -------- | -------- | -------- |
+| name | string | Yes | Name of a form element. |
+| value | string | Yes | Value of a form element. |
+
+
+## request.download
+
+download(config: DownloadConfig): Promise<DownloadTask>
+
+Downloads files. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | config | [DownloadConfig](#downloadconfig) | Yes | Configurations of the download. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<[DownloadTask](#downloadtask)> | Promise used to return the result. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }).then((data) => {
+ downloadTask = data;
+ }).catch((err) => {
+ console.error('Failed to request the download. Cause: ' + JSON.stringify(err));
+ })
+ ```
+
+
+## request.download
+
+download(config: DownloadConfig, callback: AsyncCallback<DownloadTask>): void
+
+Downloads files. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | config | [DownloadConfig](#downloadconfig) | Yes | Configurations of the download. |
+ | callback | AsyncCallback<[DownloadTask](#downloadtask)> | No | Callback used to return the result. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxxx.hap',
+ filePath: 'xxx/xxxxx.hap'}, (err, data) => {
+ if (err) {
+ console.error('Failed to request the download. Cause: ' + JSON.stringify(err));
+ return;
+ }
+ downloadTask = data;
+ });
+ ```
+
+
+## DownloadTask
+
+Implements file downloads.
+
+
+### on('progress')
+
+on(type: 'progress', callback:(receivedSize: number, totalSize: number) => void): void
+
+Subscribes to the download progress event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to subscribe to. The value is **progress** (download progress). |
+ | callback | function | Yes | Callback for the download progress event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | receivedSize | number | Yes | Size of the downloaded files, in KB. |
+ | totalSize | number | Yes | Total size of the files to download, in KB. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + err);
+ return;
+ }
+ downloadTask = data;
+ downloadTask.on('progress', function download_callback(receivedSize, totalSize) {
+ console.info("download receivedSize:" + receivedSize + " totalSize:" + totalSize);
+ }
+ );
+ });
+ ```
+
+
+### off('progress')
+
+off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void
+
+Unsubscribes from the download progress event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to unsubscribe from. The value is **progress** (download progress). |
+ | callback | function | No | Callback for the download progress event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | receivedSize | number | Yes | Size of the downloaded files, in KB. |
+ | totalSize | number | Yes | Total size of the files to download, in KB. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + err);
+ return;
+ }
+ downloadTask = data;
+ downloadTask .off('progress', function download_callback(receivedSize, totalSize) {
+ console.info("download receivedSize:" + receivedSize + " totalSize:" + totalSize);
+ }
+ );
+ });
+ ```
+
+
+### on('complete'|'pause'|'remove')7+
+
+on(type: 'complete'|'pause'|'remove', callback:() => void): void
+
+Subscribes to a download event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Event type. - **complete**: download task completion event. - **pause**: download task pause event. - **remove**: download task removal event. |
+ | callback | function | Yes | Callback used to return the result. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + err);
+ return;
+ }
+ downloadTask= data;
+ downloadTask.on('complete', function callback() {
+ console.info('Download task completed.');
+ }
+ );
+ });
+ ```
+
+
+### off('complete'|'pause'|'remove')7+
+
+off(type: 'complete'|'pause'|'remove', callback?:() => void): void
+
+Unsubscribes from the download event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Event type. - **complete**: download task completion event. - **pause**: download task pause event. - **remove**: download task removal event. |
+ | callback | function | No | Callback used to return the result. |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + JSON.stringify(err));
+ return;
+ }
+ downloadTask = data;
+ downloadTask.off('complete', function callback() {
+ console.info('Download task completed.');
+ }
+ );
+ });
+ ```
+
+
+### on('fail')7+
+
+on(type: 'fail', callback: (err: number) => void): void
+
+Subscribes to the download task failure event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the subscribed event. The value is **fail** (download failure). |
+ | callback | function | Yes | Callback for the download task failure event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | err | number | Yes | Error code of the download failure. For details about the error cause, see [ERROR_*](#constants). |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + err);
+ return;
+ }
+ downloadTask = data;
+ downloadTask.on('fail', function callBack(err) {
+ console.info('Download task failed. Cause:' + err);
+ }
+ );
+ });
+ ```
+
+
+### off('fail')7+
+
+off(type: 'fail', callback?: (err: number) => void): void
+
+Unsubscribes from the download task failure event. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to unsubscribe from. The value is **fail** (download failure). |
+ | callback | function | No | Callback for the download task failure event. |
+
+ Parameters of the callback function
+
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | err | number | Yes | Error code of the download failure. For details about the error cause, see [ERROR_*](#constants). |
+
+- Example
+
+ ```
+ request.download({ url: 'https://xxxx/xxxx.hap' }, (err, data)=> {
+ if (err) {
+ console.error('Failed to request download. Cause:' + err);
+ return;
+ }
+ downloadTask = data;
+ downloadTask.off('fail', function callBack(err) {
+ console.info('Download task failed. Cause:' + err);
+ }
+ );
+ });
+ ```
+
+
+### remove
+
+remove(): Promise<boolean>
+
+Removes this download task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return the task removal result. |
+
+- Example
+
+ ```
+ downloadTask.remove().then((result) => {
+ if (result) {
+ console.info('Download task removed.');
+ } else {
+ console.error('Failed to remove the download task.');
+ }
+ }).catch ((err) => {
+ console.error('Failed to remove the download task.');
+ });
+ ```
+
+
+### remove
+
+remove(callback: AsyncCallback<boolean>): void
+
+Removes this download task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return the task removal result. |
+
+- Example
+
+ ```
+ downloadTask.remove((err, result)=>{
+ if(err) {
+ console.error('Failed to remove the download task.');
+ return;
+ }
+ if (result) {
+ console.info('Download task removed.');
+ } else {
+ console.error('Failed to remove the download task.');
+ }
+ });
+ ```
+
+
+### query7+
+
+query(): Promise<DownloadInfo>
+
+Queries this download task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<[DownloadInfo](#downloadinfo7)> | Promise used to return the download task information. |
+
+- Example
+
+ ```
+ downloadTask.query().then((downloadInfo) => {
+ console.info('Download task queried. Data:' + JSON.stringify(downloadInfo))
+ }) .catch((err) => {
+ console.error('Failed to query the download task. Cause:' + err)
+ });
+ ```
+
+
+### query7+
+
+query(callback: AsyncCallback<DownloadInfo>): void
+
+Queries this download task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<[DownloadInfo](#downloadinfo7)> | Yes | Callback used to return the download task information. |
+
+- Example
+
+ ```
+ downloadTask.query((err, downloadInfo)=>{
+ if(err) {
+ console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err));
+ } else {
+ console.info('download query success. data:'+ JSON.stringify(downloadInfo));
+ }
+ });
+ ```
+
+
+### queryMimeType7+
+
+queryMimeType(): Promise<string>
+
+Queries **MimeType** of this download task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<string> | Promise used to return **MimeType** of the download task. |
+
+- Example
+
+ ```
+ downloadTask.queryMimeType().then((data) => {
+ console.info('Download task queried. Data:' + JSON.stringify(data));
+ }).catch((err) => {
+ console.error('Failed to query the download MimeType. Cause:' + JSON.stringify(err))
+ });
+ ```
+
+
+### queryMimeType7+
+
+queryMimeType(callback: AsyncCallback<string>): void;
+
+Queries **MimeType** of this download task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<string> | Yes | Callback used to return **MimeType** of the download task. |
+
+- Example
+
+ ```
+ downloadTask.queryMimeType((err, data)=>{
+ if(err) {
+ console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err));
+ } else {
+ console.info('Download task queried. data:' + JSON.stringify(data));
+ }
+ });
+ ```
+
+
+### pause7+
+
+pause(): Promise<void>
+
+Pauses this download task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the download task pause result. |
+
+- Example
+
+ ```
+ downloadTask.pause().then((result) => {
+ if (result) {
+ console.info('Download task paused. ');
+ } else {
+ console.error('Failed to pause the download task. Cause:' + JSON.stringify(result));
+ }
+ }).catch((err) => {
+ console.error('Failed to pause the download task. Cause:' + JSON.stringify(err));
+ });
+ ```
+
+
+### pause7+
+
+pause(callback: AsyncCallback<void>): void
+
+Pauses this download task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+
+- Example
+
+ ```
+ downloadTask.pause((err, result)=>{
+ if(err) {
+ console.error('Failed to pause the download task. Cause:' + JSON.stringify(err));
+ return;
+ }
+ if (result) {
+ console.info('Download task paused. ');
+ } else {
+ console.error('Failed to pause the download task. Cause:' + JSON.stringify(result));
+ }
+ });
+ ```
+
+
+### resume7+
+
+resume(): Promise<void>
+
+Resumes this download task. This method uses a promise to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. |
+
+- Example
+
+ ```
+ downloadTask.resume().then((result) => {
+ if (result) {
+ console.info('Download task resumed.')
+ } else {
+ console.error('Failed to resume the download task. ');
+ }
+ console.info('Download task resumed.')
+ }).catch((err) => {
+ console.error('Failed to resume the download task. Cause:' + err);
+ });
+ ```
+
+
+### resume7+
+
+resume(callback: AsyncCallback<void>): void
+
+Resumes this download task. This method uses an asynchronous callback to return the result.
+
+**Required permission**: ohos.permission.INTERNET
+
+**System capability**: SystemCapability.MiscServices.Download
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+
+- Example
+
+ ```
+ downloadTask.resume((err, result)=>{
+ if (err) {
+ console.error('Failed to resume the download task. Cause:' + err);
+ return;
+ }
+ if (result) {
+ console.info('Download task resumed.');
+ } else {
+ console.error('Failed to resume the download task.');
+ }
+ });
+ ```
+
+
+## DownloadConfig
+
+**System capability**: SystemCapability.MiscServices.Download
+
+| Name | Type | Mandatory | Description |
+| -------- | -------- | -------- | -------- |
+| url | string | Yes | Resource URL. |
+| header | object | No | HTTP or HTTPS header added to a download request. |
+| enableMetered | boolean | No | Download allowed in metered connections. |
+| enableRoaming | boolean | No | Download allowed on a roaming network. |
+| description | string | No | Description of the download session. |
+| filePath7+ | string | No | Download path. (The default path is [ERROR:Invalid link:en-us_topic_0000001135742582.xml#xref8132147102215,link:en-us_topic_0000001127125012.xml#section1856519365229](en-us_topic_0000001127125012.xml#section1856519365229)). - filePath:'workspace/test.txt': The **workspace** directory is created in the default path to store files. - filePath:'test.txt': Files are stored in the default path. - filePath:'workspace/': The **workspace** directory is created in the default path to store files. |
+| networkType | number | No | Network type allowed for download. |
+| title | string | No | Title of the download session. |
+
+
+## DownloadInfo7+
+
+**System capability**: SystemCapability.MiscServices.Download
+
+| Name | Type | Mandatory | Description |
+| -------- | -------- | -------- | -------- |
+| downloadId | number | Yes | ID of the downloaded file. |
+| failedReason | number | No | Download failure cause, which can be any constant of [ERROR_*](#constants). |
+| fileName | string | Yes | Name of the downloaded file. |
+| filePath | string | Yes | URI of the saved file. |
+| pausedReason | number | No | Reason for session pause, which can be any constant of [PAUSED_*](#constants). |
+| status | number | Yes | Download status code, which can be any constant of [SESSION_*](#constants). |
+| targetURI | string | Yes | URI of the downloaded file. |
+| downloadTitle | string | Yes | Title of the downloaded file. |
+| downloadTotalBytes | number | Yes | Total size of the downloaded file (int bytes). |
+| description | string | Yes | Description of the file to download. |
+| downloadedBytes | number | Yes | Size of the files downloaded (int bytes). |
diff --git a/en/application-dev/reference/apis/js-apis-resource-manager.md b/en/application-dev/reference/apis/js-apis-resource-manager.md
index 7af90e99d9b1b57f167acb10de07c8bffbc5875c..e5e05092630126119a870b5e8e430d62abaac43b 100644
--- a/en/application-dev/reference/apis/js-apis-resource-manager.md
+++ b/en/application-dev/reference/apis/js-apis-resource-manager.md
@@ -1,4 +1,4 @@
-Resource Management
+# Resource Management
>  **NOTE**
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
@@ -19,9 +19,9 @@ Obtains the **ResourceManager** object of this application. This method uses a c
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | ---- | ----------------------------- |
-| callback | AsyncCallback<[ResourceManager](#resourcemanager)> | Yes | Callback used to return the **ResourceManager** object obtained.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback<[ResourceManager](#resourcemanager)> | Yes | Callback used to return the **ResourceManager** object obtained. |
**Example**
```
@@ -50,10 +50,10 @@ Obtains the **ResourceManager** object of an application. This method uses an as
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------- | ---------------------------------------- | ---- | ----------------------------- |
-| bundleName | string | Yes | Bundle name of the target application. |
-| callback | AsyncCallback<[ResourceManager](#resourcemanager)> | Yes | Callback used to return the **ResourceManager** object obtained.|
+| Name | Type | Mandatory | Description |
+| ---------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| bundleName | string | Yes | Bundle name of the target application. |
+| callback | AsyncCallback<[ResourceManager](#resourcemanager)> | Yes | Callback used to return the **ResourceManager** object obtained. |
**Example**
```
@@ -71,9 +71,9 @@ Obtains the **ResourceManager** object of this application. This method uses a p
**System capability**: SystemCapability.Global.ResourceManager
**Return value**
-| Type | Description |
-| ---------------------------------------- | ----------------- |
-| Promise<[ResourceManager](#resourcemanager)> | Promise used to return the **ResourceManager** object obtained.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise<[ResourceManager](#resourcemanager)> | Promise used to return the **ResourceManager** object obtained. |
**Example**
```
@@ -100,14 +100,14 @@ Obtains the **ResourceManager** object of an application. This method uses a pro
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------- | ------ | ---- | ------------- |
-| bundleName | string | Yes | Bundle name of the target application.|
+| Name | Type | Mandatory | Description |
+| ---------- | ------ | --------- | -------------------------------------- |
+| bundleName | string | Yes | Bundle name of the target application. |
**Return value**
-| Type | Description |
-| ---------------------------------------- | ------------------ |
-| Promise<[ResourceManager](#resourcemanager)> | Promise used to return the **ResourceManager** object obtained.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise<[ResourceManager](#resourcemanager)> | Promise used to return the **ResourceManager** object obtained. |
**Example**
```
@@ -125,10 +125,10 @@ Enumerates the screen directions.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Default Value | Description |
-| -------------------- | ---- | ---- |
-| DIRECTION_VERTICAL | 0 | Portrait |
-| DIRECTION_HORIZONTAL | 1 | Landscape |
+| Name | Default Value | Description |
+| -------------------- | ------------- | ----------- |
+| DIRECTION_VERTICAL | 0 | Portrait |
+| DIRECTION_HORIZONTAL | 1 | Landscape |
## DeviceType
@@ -137,14 +137,14 @@ Enumerates the device types.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Default Value | Description |
-| -------------------- | ---- | ---- |
-| DEVICE_TYPE_PHONE | 0x00 | Mobile phone. |
-| DEVICE_TYPE_TABLET | 0x01 | Tablet. |
-| DEVICE_TYPE_CAR | 0x02 | Automobile. |
-| DEVICE_TYPE_PC | 0x03 | Computer. |
-| DEVICE_TYPE_TV | 0x04 | TV. |
-| DEVICE_TYPE_WEARABLE | 0x06 | Wearable. |
+| Name | Default Value | Description |
+| -------------------- | ------------- | ------------- |
+| DEVICE_TYPE_PHONE | 0x00 | Mobile phone. |
+| DEVICE_TYPE_TABLET | 0x01 | Tablet. |
+| DEVICE_TYPE_CAR | 0x02 | Automobile. |
+| DEVICE_TYPE_PC | 0x03 | Computer. |
+| DEVICE_TYPE_TV | 0x04 | TV. |
+| DEVICE_TYPE_WEARABLE | 0x06 | Wearable. |
## ScreenDensity
@@ -153,14 +153,14 @@ Enumerates the screen density types.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Default Value | Description |
-| -------------- | ---- | ---------- |
-| SCREEN_SDPI | 120 | Screen density with small-scale dots per inch (SDPI). |
-| SCREEN_MDPI | 160 | Screen density with medium-scale dots per inch (MDPI). |
-| SCREEN_LDPI | 240 | Screen density with large-scale dots per inch (LDPI). |
-| SCREEN_XLDPI | 320 | Screen density with extra-large-scale dots per inch (XLDPI). |
-| SCREEN_XXLDPI | 480 | Screen density with extra-extra-large-scale dots per inch (XXLDPI). |
-| SCREEN_XXXLDPI | 640 | Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI).|
+| Name | Default Value | Description |
+| -------------- | ------------- | ---------------------------------------- |
+| SCREEN_SDPI | 120 | Screen density with small-scale dots per inch (SDPI). |
+| SCREEN_MDPI | 160 | Screen density with medium-scale dots per inch (MDPI). |
+| SCREEN_LDPI | 240 | Screen density with large-scale dots per inch (LDPI). |
+| SCREEN_XLDPI | 320 | Screen density with extra-large-scale dots per inch (XLDPI). |
+| SCREEN_XXLDPI | 480 | Screen density with extra-extra-large-scale dots per inch (XXLDPI). |
+| SCREEN_XXXLDPI | 640 | Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI). |
## Configuration
@@ -170,10 +170,10 @@ Defines the device configuration.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Type | Readable | Writable | Description |
-| --------- | ----------------------- | ---- | ---- | -------- |
-| direction | [Direction](#direction) | Yes | No | Screen direction of the device.|
-| locale | string | Yes | No | Current system language. |
+| Name | Type | Readable | Writable | Description |
+| --------- | ----------------------- | -------- | -------- | ------------------------------- |
+| direction | [Direction](#direction) | Yes | No | Screen direction of the device. |
+| locale | string | Yes | No | Current system language. |
## DeviceCapability
@@ -183,10 +183,10 @@ Defines the device capability.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Type | Readable | Writable | Description |
-| ------------- | ------------------------------- | ---- | ---- | -------- |
-| screenDensity | [ScreenDensity](#screendensity) | Yes | No | Screen density of the device.|
-| deviceType | [DeviceType](#devicetype) | Yes | No | Type of the device. |
+| Name | Type | Readable | Writable | Description |
+| ------------- | ------------------------------- | -------- | -------- | ----------------------------- |
+| screenDensity | [ScreenDensity](#screendensity) | Yes | No | Screen density of the device. |
+| deviceType | [DeviceType](#devicetype) | Yes | No | Type of the device. |
## RawFileDescriptor8+
@@ -194,11 +194,11 @@ Defines the device capability.
Defines the descriptor information of the raw file.
**System capability**: SystemCapability.Global.ResourceManager
-| Name | Type | Description |
-| ------ | ------ | ------------------ |
-| fd | number | Descriptor of a raw file.|
-| offset | number | Offset to the start position of the raw file. |
-| length | number | Length of the raw file. |
+| Name | Type | Description |
+| ------ | ------ | ---------------------------------------- |
+| fd | number | Descriptor of a raw file. |
+| offset | number | Offset to the start position of the raw file. |
+| length | number | Length of the raw file. |
## ResourceManager
@@ -220,10 +220,10 @@ Obtains the string corresponding to the specified resource ID. This method uses
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | --------------------------- | ---- | --------------- |
-| resId | number | Yes | Resource ID. |
-| callback | AsyncCallback<string> | Yes | Callback used to return the string obtained.|
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| callback | AsyncCallback<string> | Yes | Callback used to return the string obtained. |
**Example**
```
@@ -248,14 +248,14 @@ Obtains the string corresponding to the specified resource ID. This method uses
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | ---- | ----- |
-| resId | number | Yes | Resource ID.|
+| Name | Type | Mandatory | Description |
+| ----- | ------ | --------- | ------------ |
+| resId | number | Yes | Resource ID. |
**Return value**
-| Type | Description |
-| --------------------- | ----------- |
-| Promise<string> | Promise used to return the string obtained.|
+| Type | Description |
+| --------------------- | ---------------------------------------- |
+| Promise<string> | Promise used to return the string obtained. |
**Example**
```
@@ -278,10 +278,10 @@ Obtains the array of strings corresponding to the specified resource ID. This me
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | ---- | ----------------- |
-| resId | number | Yes | Resource ID. |
-| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the obtained array of strings.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the obtained array of strings. |
**Example**
```
@@ -306,14 +306,14 @@ Obtains the array of strings corresponding to the specified resource ID. This me
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | ---- | ----- |
-| resId | number | Yes | Resource ID.|
+| Name | Type | Mandatory | Description |
+| ----- | ------ | --------- | ------------ |
+| resId | number | Yes | Resource ID. |
**Return value**
-| Type | Description |
-| ---------------------------------- | ------------- |
-| Promise<Array<string>> | Promise used to return the array of strings obtained.|
+| Type | Description |
+| ---------------------------------- | ---------------------------------------- |
+| Promise<Array<string>> | Promise used to return the array of strings obtained. |
**Example**
```
@@ -336,10 +336,10 @@ Obtains the content of the media file corresponding to the specified resource ID
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------- | ---- | ------------------ |
-| resId | number | Yes | Resource ID. |
-| callback | AsyncCallback<Uint8Array> | Yes | Callback used to return the content of the media file obtained.|
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------------- | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| callback | AsyncCallback<Uint8Array> | Yes | Callback used to return the content of the media file obtained. |
**Example**
```
@@ -364,14 +364,14 @@ Obtains the content of the media file corresponding to the specified resource ID
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | ---- | ----- |
-| resId | number | Yes | Resource ID.|
+| Name | Type | Mandatory | Description |
+| ----- | ------ | --------- | ------------ |
+| resId | number | Yes | Resource ID. |
**Return value**
-| Type | Description |
-| ------------------------- | -------------- |
-| Promise<Uint8Array> | Promise used to return the content of the media file obtained.|
+| Type | Description |
+| ------------------------- | ---------------------------------------- |
+| Promise<Uint8Array> | Promise used to return the content of the media file obtained. |
**Example**
```
@@ -394,10 +394,10 @@ Obtains the Base64 code of the image corresponding to the specified resource ID.
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | --------------------------- | ---- | ------------------------ |
-| resId | number | Yes | Resource ID. |
-| callback | AsyncCallback<string> | Yes | Callback used to return the Base64 code of the image obtained.|
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| callback | AsyncCallback<string> | Yes | Callback used to return the Base64 code of the image obtained. |
**Example**
```
@@ -422,14 +422,14 @@ Obtains the Base64 code of the image corresponding to the specified resource ID.
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | ---- | ----- |
-| resId | number | Yes | Resource ID.|
+| Name | Type | Mandatory | Description |
+| ----- | ------ | --------- | ------------ |
+| resId | number | Yes | Resource ID. |
**Return value**
-| Type | Description |
-| --------------------- | -------------------- |
-| Promise<string> | Promise used to return the Base64 code of the image obtained.|
+| Type | Description |
+| --------------------- | ---------------------------------------- |
+| Promise<string> | Promise used to return the Base64 code of the image obtained. |
**Example**
```
@@ -452,9 +452,9 @@ Obtains the device configuration. This method uses an asynchronous callback to r
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | ---- | ------------------------- |
-| callback | AsyncCallback<[Configuration](#configuration)> | Yes | Callback used to return the obtained device configuration.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback<[Configuration](#configuration)> | Yes | Callback used to return the obtained device configuration. |
**Example**
```
@@ -479,9 +479,9 @@ Obtains the device configuration. This method uses a promise to return the resul
**System capability**: SystemCapability.Global.ResourceManager
**Return value**
-| Type | Description |
-| ---------------------------------------- | ---------------- |
-| Promise<[Configuration](#configuration)> | Promise used to return the device configuration.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise<[Configuration](#configuration)> | Promise used to return the device configuration. |
**Example**
```
@@ -504,9 +504,9 @@ Obtains the device capability. This method uses an asynchronous callback to retu
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | ---- | ---------------------------- |
-| callback | AsyncCallback<[DeviceCapability](#devicecapability)> | Yes | Callback used to return the obtained device capability.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback<[DeviceCapability](#devicecapability)> | Yes | Callback used to return the obtained device capability. |
**Example**
```
@@ -531,9 +531,9 @@ Obtains the device capability. This method uses a promise to return the result.
**System capability**: SystemCapability.Global.ResourceManager
**Return value**
-| Type | Description |
-| ---------------------------------------- | ------------------- |
-| Promise<[DeviceCapability](#devicecapability)> | Promise used to return the obtained device capability.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise<[DeviceCapability](#devicecapability)> | Promise used to return the obtained device capability. |
**Example**
```
@@ -556,11 +556,11 @@ Obtains the specified number of singular-plural strings corresponding to the spe
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | --------------------------- | ---- | ------------------------------- |
-| resId | number | Yes | Resource ID. |
-| num | number | Yes | Number that determines the plural or singular form. |
-| callback | AsyncCallback<string> | Yes | Callback used to return the singular-plural string obtained.|
+| Name | Type | Mandatory | Description |
+| -------- | --------------------------- | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| num | number | Yes | Number that determines the plural or singular form. |
+| callback | AsyncCallback<string> | Yes | Callback used to return the singular-plural string obtained. |
**Example**
```
@@ -585,15 +585,15 @@ Obtains the specified number of singular-plural strings corresponding to the spe
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | ---- | ----- |
-| resId | number | Yes | Resource ID.|
-| num | number | Yes | Number that determines the plural or singular form. |
+| Name | Type | Mandatory | Description |
+| ----- | ------ | --------- | ---------------------------------------- |
+| resId | number | Yes | Resource ID. |
+| num | number | Yes | Number that determines the plural or singular form. |
**Return value**
-| Type | Description |
-| --------------------- | ------------------------- |
-| Promise<string> | Promise used to return the singular-plural string obtained.|
+| Type | Description |
+| --------------------- | ---------------------------------------- |
+| Promise<string> | Promise used to return the singular-plural string obtained. |
**Example**
```
@@ -615,10 +615,10 @@ Obtains the content of the raw file in the specified path. This method uses an a
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------- | ---- | ----------------------- |
-| path | string | Yes | Path of the raw file. |
-| callback | AsyncCallback<Uint8Array> | Yes | Callback used to return the raw file content, in byte arrays.|
+| Name | Type | Mandatory | Description |
+| -------- | ------------------------------- | --------- | ---------------------------------------- |
+| path | string | Yes | Path of the raw file. |
+| callback | AsyncCallback<Uint8Array> | Yes | Callback used to return the raw file content, in byte arrays. |
**Example**
```
@@ -642,14 +642,14 @@ Obtains the content of the raw file in the specified path. This method uses a pr
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---- | ------ | ---- | ----------- |
-| path | string | Yes | Path of the raw file.|
+| Name | Type | Mandatory | Description |
+| ---- | ------ | --------- | --------------------- |
+| path | string | Yes | Path of the raw file. |
**Return value**
-| Type | Description |
-| ------------------------- | ----------- |
-| Promise<Uint8Array> | Promise used to return the raw file content, in byte arrays.|
+| Type | Description |
+| ------------------------- | ---------------------------------------- |
+| Promise<Uint8Array> | Promise used to return the raw file content, in byte arrays. |
**Example**
```
@@ -671,10 +671,10 @@ Obtains the descriptor of the raw file in the specified path. This method uses a
**System capability**: SystemCapability.Global.ResourceManager
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | ---- | -------------------------------- |
-| path | string | Yes | Path of the raw file. |
-| callback | AsyncCallback<[RawFileDescriptor](#rawfiledescriptor8+  **Note:**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
+
+
+## Modules to Import
+
+
+```
+import screenlock from '@ohos.screenLock';
+```
+
+
+## screenlock.isScreenLocked
+
+isScreenLocked(callback: AsyncCallback<boolean>): void
+
+Checks whether the screen is locked. This method uses an asynchronous callback to return the result.
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return the result. If **true** is returned, the screen is locked. If **false** is returned, the screen is not locked. |
+
+- Example
+
+ ```
+ screenlock.isScreenLocked((err, data)=>{
+ if (err) {
+ console.error('isScreenLocked callback error -> ${JSON.stringify(err)}');
+ return;
+ }
+ console.info('isScreenLocked callback success data -> ${JSON.stringify(data)}');
+ });
+ ```
+
+
+## screenlock.isScreenLocked
+
+isScreenLocked(): Promise<boolean>
+
+Checks whether the screen is locked. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+- Return Values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return the result. |
+
+- Example
+
+ ```
+ screenlock.isScreenLocked().then((data) => {
+ console.log('isScreenLocked success: data -> ${JSON.stringify(data)}');
+ }).catch((err) => {
+ console.error('isScreenLocked fail, promise: err -> ${JSON.stringify(err)}');
+ });
+ ```
+
+
+## screenlock.isSecureMode
+
+isSecureMode(callback: AsyncCallback<boolean>): void
+
+
+Checks whether a device is in secure mode. This method uses an asynchronous callback to return the result.
+
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return the result. If **true** is returned, the device is in secure mode. If **false** is returned, the device is not in secure mode. |
+
+- Example
+
+ ```
+ screenlock.isSecureMode((err, data)=>{
+ if (err) {
+ console.error('isSecureMode callback error -> ${JSON.stringify(err)}');
+ return;
+ }
+ console.info('isSecureMode callback success data -> ${JSON.stringify(err)}');
+ });
+ ```
+
+
+## screenlock.isSecureMode
+
+isSecureMode(): Promise<boolean>
+
+Checks whether a device is in secure mode. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+- Return Values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return the result. |
+
+- Example
+
+ ```
+ screenlock.isSecureMode().then((data) => {
+ console.log('isSecureMode success: data->${JSON.stringify(data)}');
+ }).catch((err) => {
+ console.error('isSecureMode fail, promise: err->${JSON.stringify(err)}');
+ });
+ ```
+
+
+## screenlock.unlockScreen
+
+unlockScreen(callback: AsyncCallback<void>): void
+
+
+Unlocks the screen. This method uses an asynchronous callback to return the result.
+
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<void> | Yes | Callback function. If the callback fails, an error message is returned. |
+
+- Example
+
+ ```
+ screenlock.unlockScreen((err)=>{
+ if (err) {
+ console.error('unlockScreen callback error -> ${JSON.stringify(err)}');
+ return;
+ }
+ console.info('unlockScreen callback success');
+ });
+ ```
+
+
+## screenlock.unlockScreen
+
+unlockScreen(): Promise<void>
+
+Unlocks the screen. This method uses a promise to return the result.
+
+**System capability**: SystemCapability.MiscServices.ScreenLock
+
+- Return Values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. |
+
+- Example
+
+ ```
+ screenlock.unlockScreen().then(() => {
+ console.log('unlockScreen success');
+ }).catch((err) => {
+ console.error('unlockScreen fail, promise: err->${JSON.stringify(err)}');
+ });
+ ```
diff --git a/en/application-dev/reference/apis/js-apis-screenshot.md b/en/application-dev/reference/apis/js-apis-screenshot.md
index 82e50e09cfa95f0610c99d44fa4af11375a575a1..2c8e375b6123ec8d0938c1fca2823360cee823b3 100644
--- a/en/application-dev/reference/apis/js-apis-screenshot.md
+++ b/en/application-dev/reference/apis/js-apis-screenshot.md
@@ -18,8 +18,8 @@ Describes screenshot options.
| Name | Type | Mandatory| Description |
| ---------- | ------------- | ---- | ------------------------------------------------------------ |
-| screenRect | [Rect](#Rect) | No | Region of the screen to capture. If this parameter is null, the full screen will be captured.|
-| imageSize | [Size](#Size) | No | Size of the screen region to capture. If this parameter is null, the full screen will be captured.|
+| screenRect | [Rect](#rect) | No | Region of the screen to capture. If this parameter is null, the full screen will be captured.|
+| imageSize | [Size](#size) | No | Size of the screen region to capture. If this parameter is null, the full screen will be captured.|
| rotation | number | No | Rotation angle of the screenshot. Currently, the value can be **0** only. The default value is **0**.|
@@ -62,7 +62,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
- | options | [ScreenshotOptions](#ScreenshotOptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.|
+ | options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.|
| callback | AsyncCallback<image.PixelMap> | Yes | Callback used to return a **PixelMap** object. |
- Example
@@ -102,7 +102,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro
| Name | Type | Mandatory| Description |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
- | options | [ScreenshotOptions](#ScreenshotOptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.|
+ | options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.|
- Return value
diff --git a/en/application-dev/reference/apis/js-apis-storage-statistics.md b/en/application-dev/reference/apis/js-apis-storage-statistics.md
index cf3f8347a415bde8aa969e6d9585d8d3f69dd643..66b51201e3e42e7c852b7f372c4d392ed543ea29 100644
--- a/en/application-dev/reference/apis/js-apis-storage-statistics.md
+++ b/en/application-dev/reference/apis/js-apis-storage-statistics.md
@@ -126,70 +126,3 @@ Asynchronously obtains the available space of the specified volume. This method
});
```
-## storagestatistics.getBundleStats
-
-getBundleStats(packageName: string): Promise<BundleStats>
-
-Obtains the bundle status. This method uses a promise to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
-
-- Parameters
-
- | Name | Type | Mandatory| Description |
- | ----------- | ------ | ---- | -------- |
- | packageName | string | Yes | Bundle name of the app.|
-
-- Return value
-
- | Type | Description |
- | ------------------------------------------ | -------------------------- |
- | Promise<[Bundlestats](#bundlestats)> | Promise used to return the bundle status on the volume.|
-
-- Example
-
- ```js
- let packageName = "";
- storagestatistics.getBundleStats(packageName).then(function(BundleStats){
- console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats));
- }).catch(function(err){
- console.info("getBundleStats failed with error:"+ err);
- });
- ```
-
-## storagestatistics.getBundleStats
-
-getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>): void
-
-Obtains the bundle status. This method uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
-
-- Parameters
-
- | Name | Type | Mandatory| Description |
- | -------- | --------------------------------------------------------- | ---- | ------------------------------------ |
- | packageName | string | Yes | Bundle name of the app.|
- | callback | callback:AsyncCallback<[Bundlestats](#bundlestats)> | Yes | Callback invoked to return the bundle status on the volume.|
-
-- Example
-
- ```js
- let packageName = "";
- storagestatistics.getBundleStats(packageName, function(error, BundleStats){
- // Do something
- console.info("getBundleStats successfully:"+ JSON.stringify(BundleStats));
- });
- ```
-
-## BundleStats9+
-
-**System capability**: SystemCapability.FileManagement.StorageService.SpatialStatistics
-
-### Attributes
-
-| Name | Type | Description |
-| --------- | ------ | -------------- |
-| appSize9+ | number | Size of the app. |
-| cacheSize9+ | number | Size of the cached data. |
-| dataSize9+ | number | Total data size of the app.|
diff --git a/en/application-dev/reference/apis/js-apis-system-sensor.md b/en/application-dev/reference/apis/js-apis-system-sensor.md
index 9ed5217402da967c4557d220c14e3c2bfc0c7076..e8c267f0b0b0d584013882632f71f7faa88ed4b7 100644
--- a/en/application-dev/reference/apis/js-apis-system-sensor.md
+++ b/en/application-dev/reference/apis/js-apis-system-sensor.md
@@ -17,9 +17,9 @@ import sensor from '@system.sensor';
## Error Codes
- | Error Code| Description|
-| -------- | -------- |
-| 900 | The current device does not support the corresponding sensor.|
+| Error Code | Description |
+| ---------- | ---------------------------------------- |
+| 900 | The current device does not support the corresponding sensor. |
## sensor.subscribeAccelerometer
@@ -33,19 +33,19 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| interval | string | Yes| Execution frequency of the callback for returning the acceleration sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
-| success | Function | Yes| Called when the acceleration sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| -------- | -------- | --------- | ---------------------------------------- |
+| interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
+| success | Function | Yes | Called when the acceleration sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| x | number | Acceleration on the x-axis.|
-| y | number | Acceleration on the y-axis.|
-| z | number | Acceleration on the z-axis.|
+| Name | Type | Description |
+| ---- | ------ | --------------------------- |
+| x | number | Acceleration on the x-axis. |
+| y | number | Acceleration on the y-axis. |
+| z | number | Acceleration on the z-axis. |
**Example**
@@ -92,16 +92,16 @@ Subscribes to data changes of the compass sensor. If this API is called multiple
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the compass sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the compass sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| direction | number | Direction of the device, in degrees.|
+| Name | Type | Description |
+| --------- | ------ | ------------------------------------ |
+| direction | number | Direction of the device, in degrees. |
**Example**
@@ -143,16 +143,16 @@ Subscribes to data changes of the proximity sensor. If this API is called multip
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the proximity sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the proximity sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| distance | number | Distance between a visible object and the device screen.|
+| Name | Type | Description |
+| -------- | ------ | ---------------------------------------- |
+| distance | number | Distance between a visible object and the device screen. |
**Example**
@@ -194,16 +194,16 @@ Subscribes to data changes of the ambient light sensor. If this API is called mu
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the ambient light sensor data changes|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the ambient light sensor data changes |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| intensity | number | Light intensity, in lux.|
+| Name | Type | Description |
+| --------- | ------ | ------------------------ |
+| intensity | number | Light intensity, in lux. |
**Example**
@@ -247,16 +247,16 @@ Subscribes to data changes of the step counter sensor. If this API is called mul
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the step counter sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the step counter sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| steps | number | Number of counted steps after the sensor is restarted. |
+| Name | Type | Description |
+| ----- | ------ | ---------------------------------------- |
+| steps | number | Number of counted steps after the sensor is restarted. |
**Example**
@@ -301,16 +301,16 @@ Subscribes to data changes of the barometer sensor. If this API is called multip
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the barometer sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the barometer sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| pressure | number | Pressure, in pascal.|
+| Name | Type | Description |
+| -------- | ------ | -------------------- |
+| pressure | number | Pressure, in pascal. |
**Example**
@@ -356,16 +356,16 @@ Subscribes to data changes of the heart rate sensor. If this API is called multi
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the heart rate sensor data changes. This callback is invoked every five seconds.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | ---------------------------------------- |
+| success | Function | Yes | Called when the heart rate sensor data changes. This callback is invoked every five seconds. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| heartRate | number | Heart rate.|
+| Name | Type | Description |
+| --------- | ------ | ----------- |
+| heartRate | number | Heart rate. |
**Example**
@@ -410,16 +410,16 @@ Subscribes to changes of the wearing state of a wearable device. If this API is
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | Yes| Called when the wearing state changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| ------- | -------- | --------- | -------------------------------------- |
+| success | Function | Yes | Called when the wearing state changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| value | boolean | Whether the wearable device is worn.|
+| Name | Type | Description |
+| ----- | ------- | ------------------------------------ |
+| value | boolean | Whether the wearable device is worn. |
**Example**
@@ -461,17 +461,17 @@ Obtains the wearing state of a wearable device.
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| success | Function | No| Callback upon success.|
-| fail | Function | No| Callback upon failure.|
-| complete | Function | No| Called when the execution is complete.|
+| Name | Type | Mandatory | Description |
+| -------- | -------- | --------- | -------------------------------------- |
+| success | Function | No | Callback upon success. |
+| fail | Function | No | Callback upon failure. |
+| complete | Function | No | Called when the execution is complete. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| value | boolean | Whether the wearable device is worn.|
+| Name | Type | Description |
+| ----- | ------- | ------------------------------------ |
+| value | boolean | Whether the wearable device is worn. |
**Example**
@@ -498,18 +498,18 @@ If this API is called multiple times for the same application, the last call tak
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| interval | string | Yes| Interval at which the callback is invoked to return the device orientation sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
-| success | Function | Yes| Called when the device orientation sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| -------- | -------- | --------- | ---------------------------------------- |
+| interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
+| success | Function | Yes | Called when the device orientation sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| alpha | number | Rotation angle around the Z axis when the X/Y axis of the mobile phone coincides with the X/Y axis of the earth.|
-| beta | number | Rotation angle around the X axis when the Y/Z axis of the mobile phone coincides with the Y/Z axis of the earth.|
-| gamma | number | Rotation angle around the Y axis when the X/Z axis of the mobile phone coincides with the X/Z axis of the earth.|
+| Name | Type | Description |
+| ----- | ------ | ---------------------------------------- |
+| alpha | number | Rotation angle around the Z axis when the X/Y axis of the mobile device coincides with the X/Y axis of the earth. |
+| beta | number | Rotation angle around the X axis when the Y/Z axis of the mobile device coincides with the Y/Z axis of the earth. |
+| gamma | number | Rotation angle around the Y axis when the X/Z axis of the mobile device coincides with the X/Z axis of the earth. |
**Example**
@@ -558,19 +558,19 @@ If this API is called multiple times for the same application, the last call tak
**Parameters**
-| Name| Type| Mandatory| Description|
-| -------- | -------- | -------- | -------- |
-| interval | string | Yes| Interval at which the callback is invoked to return the gyroscope sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
-| success | Function | Yes| Called when the gyroscope sensor data changes.|
-| fail | Function | No| Callback upon failure.|
+| Name | Type | Mandatory | Description |
+| -------- | -------- | --------- | ---------------------------------------- |
+| interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data. The default value is **normal**. The options are as follows: - **game**: called at an interval of 20 ms, which is applicable to gaming scenarios. - **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios. - **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. |
+| success | Function | Yes | Called when the gyroscope sensor data changes. |
+| fail | Function | No | Callback upon failure. |
Return values of the success callback
- | Name| Type| Description|
-| -------- | -------- | -------- |
-| x | number | Rotation angular velocity of the X axis.|
-| y | number | Rotation angular velocity of the Y axis.|
-| z | number | Rotation angular velocity of the Z axis.|
+| Name | Type | Description |
+| ---- | ------ | ---------------------------------------- |
+| x | number | Rotation angular velocity of the X axis. |
+| y | number | Rotation angular velocity of the Y axis. |
+| z | number | Rotation angular velocity of the Z axis. |
**Example**
diff --git a/en/application-dev/reference/apis/js-apis-basic-features-timer.md b/en/application-dev/reference/apis/js-apis-timer.md
similarity index 100%
rename from en/application-dev/reference/apis/js-apis-basic-features-timer.md
rename to en/application-dev/reference/apis/js-apis-timer.md
diff --git a/en/application-dev/reference/apis/js-apis-update.md b/en/application-dev/reference/apis/js-apis-update.md
index a9a417c88513e0d39dd5f6fa68892574b7a62d0b..d84b4bdcd5acbe6169c8172961f935f254f5a7d2 100644
--- a/en/application-dev/reference/apis/js-apis-update.md
+++ b/en/application-dev/reference/apis/js-apis-update.md
@@ -1,6 +1,6 @@
# Update
->  **NOTE**
+>  **NOTE**
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The Update module applies to updates throughout the entire system, including built-in resources and preset applications, but not third-party applications.
@@ -8,7 +8,7 @@ The Update module applies to updates throughout the entire system, including bui
There are two types of updates: SD card update and over the air (OTA) update.
- The SD card update depends on the update packages and SD cards.
-- The OTA update depends on the server deployed by the phone manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the phone manufacturer.
+- The OTA update depends on the server deployed by the device manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the device manufacturer.
## Modules to Import
@@ -30,16 +30,16 @@ Obtains the **Updater** object for local update.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ----------- | --------------------------- | ---- | -------- |
-| upgradeFile | string | Yes | Update file.|
-| updateType | [UpdateTypes](#updatetypes) | Yes | Update type.|
+| Name | Type | Mandatory | Description |
+| ----------- | --------------------------- | --------- | ------------ |
+| upgradeFile | string | Yes | Update file. |
+| updateType | [UpdateTypes](#updatetypes) | Yes | Update type. |
-**Return Value**
+**Return value**
-| Type | Description |
-| ------------------- | -------- |
-| [Updater](#updater) | **Updater** object.|
+| Type | Description |
+| ------------------- | ------------------- |
+| [Updater](#updater) | **Updater** object. |
**Example**
@@ -61,17 +61,17 @@ Obtains the **Updater** object for the device to be updated.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ----------- | --------------------------- | ---- | ---------- |
-| upgradeFile | string | Yes | Update file. |
-| device | string | Yes | Device to be updated.|
-| updateType | [UpdateTypes](#updatetypes) | Yes | Update type. |
+| Name | Type | Mandatory | Description |
+| ----------- | --------------------------- | --------- | --------------------- |
+| upgradeFile | string | Yes | Update file. |
+| device | string | Yes | Device to be updated. |
+| updateType | [UpdateTypes](#updatetypes) | Yes | Update type. |
-**Return Value**
+**Return value**
-| Type | Description |
-| ------------------- | -------- |
-| [Updater](#updater) | **Updater** object.|
+| Type | Description |
+| ------------------- | ------------------- |
+| [Updater](#updater) | **Updater** object. |
**Example**
@@ -93,17 +93,17 @@ Obtains the **Updater** object from another device for the device to be updated.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ----------- | --------------------------- | ---- | ---------- |
-| upgradeFile | string | Yes | Update file. |
-| device | string | Yes | Device to be updated.|
-| updateType | [UpdateTypes](#updatetypes) | Yes | Update type. |
+| Name | Type | Mandatory | Description |
+| ----------- | --------------------------- | --------- | --------------------- |
+| upgradeFile | string | Yes | Update file. |
+| device | string | Yes | Device to be updated. |
+| updateType | [UpdateTypes](#updatetypes) | Yes | Update type. |
-**Return Value**
+**Return value**
-| Type | Description |
-| ------------------- | -------- |
-| [Updater](#updater) | **Updater** object.|
+| Type | Description |
+| ------------------- | ------------------- |
+| [Updater](#updater) | **Updater** object. |
**Example**
@@ -121,15 +121,15 @@ try {
getNewVersionInfo(callback: AsyncCallback\): void
-Obtains the new version information. This API uses an asynchronous callback to return the result.
+Obtains the new version information. This function uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | ------------------------------------------------ | ---- | ------------------ |
-| callback | AsyncCallback<[NewVersionInfo](#newversioninfo)> | No | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback<[NewVersionInfo](#newversioninfo)> | No | Callback used to return the new version information. |
**Example**
@@ -146,15 +146,15 @@ update.getNewVersionInfo(info => {
getNewVersionInfo(): Promise\
-Obtains the new version information. This API uses a promise to return the result.
+Obtains the new version information. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
-**Return Value**
+**Return value**
-| Type | Description |
-| ------------------------------------------- | ------------------------- |
-| Promise\<[NewVersionInfo](#newversioninfo)> | Promise used to return the result.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise\<[NewVersionInfo](#newversioninfo)> | Promise used to return the new version information. |
**Example**
@@ -172,15 +172,15 @@ updater.getNewVersionInfo().then(value => {
checkNewVersion(callback: AsyncCallback\): void
-Checks whether the current version is the latest. This API uses an asynchronous callback to return the result.
+Checks whether the current version is the latest. This function uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | ------------------------------------------------- | ---- | ------------------ |
-| callback | AsyncCallback\<[NewVersionInfo](#newversioninfo)> | No | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback\<[NewVersionInfo](#newversioninfo)> | No | Callback used to return the new version information. |
**Example**
@@ -197,15 +197,15 @@ update.checkNewVersion(info => {
checkNewVersion(): Promise\
-Checks whether the current version is the latest. This API uses a promise to return the result.
+Checks whether the current version is the latest. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
-**Return Value**
+**Return value**
-| Type | Description |
-| ------------------------------------------- | ------------------------- |
-| Promise\<[NewVersionInfo](#newversioninfo)> | Promise used to return the result.|
+| Type | Description |
+| ---------------------------------------- | ---------------------------------------- |
+| Promise\<[NewVersionInfo](#newversioninfo)> | Promise used to return the new version information. |
**Example**
@@ -229,10 +229,10 @@ Verifies whether the update package is valid.
**Parameters**
-| Name | Type | Mandatory| Description |
-| ----------- | ------ | ---- | ------------------ |
-| upgradeFile | string | Yes | Path of the update package to be verified.|
-| certsFile | string | Yes | Certificate path. |
+| Name | Type | Mandatory | Description |
+| ----------- | ------ | --------- | ---------------------------------------- |
+| upgradeFile | string | Yes | Path of the update package to be verified. |
+| certsFile | string | Yes | Certificate path. |
**Example**
@@ -247,15 +247,15 @@ update.verifyUpdatePackage("XXX", "XXX");
rebootAndCleanUserData(): Promise\
-Reboots the device and clears the user partition data. This API uses a promise to return the result.
+Reboots the device and clears the user partition data. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
-**Return Value**
+**Return value**
-| Type | Description |
-| ---------------- | ------------------------------- |
-| Promise\ | Promise used to return the result.|
+| Type | Description |
+| ---------------- | ---------------------------------------- |
+| Promise\ | Promise used to return the execution result. |
**Example**
@@ -271,15 +271,15 @@ update.rebootAndCleanUserData().then(result => {
rebootAndCleanUserData(callback: AsyncCallback\): void
-Reboots the device and clears the user partition data. This API uses an asynchronous callback to return the result.
+Reboots the device and clears the user partition data. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | ---------------------- |
-| callback | AsyncCallback\| Yes | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the execution result. |
**Example**
@@ -293,15 +293,15 @@ update.rebootAndCleanUserData(result => {
applyNewVersion(): Promise\
-Installs the update package. This API uses a promise to return the result.
+Installs the update package. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
-**Return Value**
+**Return value**
-| Type | Description |
-| ---------------- | ------------------------------- |
-| Promise\ | Promise used to return the result.|
+| Type | Description |
+| ---------------- | ---------------------------------------- |
+| Promise\ | Promise used to return the execution result. |
**Example**
@@ -317,15 +317,15 @@ update.applyNewVersion().then(result => {
applyNewVersion(callback: AsyncCallback\): void
-Installs the update package. This API uses an asynchronous callback to return the result.
+Installs the update package. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | ---------------------- |
-| callback | AsyncCallback\| Yes | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback\ | Yes | Callback used to return the execution result. |
**Example**
@@ -356,7 +356,7 @@ updater.download();
### upgrade
-updater.upgrade():void
+upgrade():void
Starts an update.
@@ -377,16 +377,16 @@ updater.upgrade();
setUpdatePolicy(policy: UpdatePolicy, callback: AsyncCallback\): void
-Sets the update policy. This API uses an asynchronous callback to return the result.
+Sets the update policy. This function uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | ----------------------------- | ---- | ------------ |
-| policy | [UpdatePolicy](#updatepolicy) | Yes | Update policy to set.|
-| callback | AsyncCallback\ | Yes | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| policy | [UpdatePolicy](#updatepolicy) | Yes | Update policy to set. |
+| callback | Callback used to return the execution result. | Yes | Callback used to return the execution result. |
**Example**
@@ -408,21 +408,21 @@ update.setUpdatePolicy(policy, result => {
setUpdatePolicy(policy: UpdatePolicy): Promise\
-Sets the update policy. This API uses a promise to return the result.
+Sets the update policy. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name| Type | Mandatory| Description |
-| ------ | ----------------------------- | ---- | ------------ |
-| policy | [UpdatePolicy](#updatepolicy) | Yes | Update policy to set.|
+| Name | Type | Mandatory | Description |
+| ------ | ----------------------------- | --------- | --------------------- |
+| policy | [UpdatePolicy](#updatepolicy) | Yes | Update policy to set. |
-**Return Value**
+**Return value**
-| Type | Description |
-| ---------------- | ----------------------- |
-| Promise\ | Promise used to return the result.|
+| Type | Description |
+| ---------------- | ---------------------------------------- |
+| Promise\ | Promise used to return the execution result. |
**Example**
@@ -445,15 +445,15 @@ update.setUpdatePolicy(policy).then(result =>
getUpdatePolicy(callback: AsyncCallback\): void
-Obtains the update policy. This API uses an asynchronous callback to return the result.
+Obtains the update policy. This function uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Update.UpdateService
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | --------------------------------------------- | ---- | -------------------- |
-| callback | AsyncCallback\<[UpdatePolicy](#updatepolicy)> | No | Callback used to return the result.|
+| Name | Type | Mandatory | Description |
+| -------- | ---------------------------------------- | --------- | ---------------------------------------- |
+| callback | AsyncCallback\<[UpdatePolicy](#updatepolicy)> | No | Callback used to return the update policy. |
**Example**
@@ -470,15 +470,15 @@ update.getUpdatePolicy(policy => {
getUpdatePolicy(): Promise\
-Obtains the update policy. This API uses a promise to return the result.
+Obtains the update policy. This function uses a promise to return the result.
**System capability**: SystemCapability.Update.UpdateService
-**Return Value**
+**Return value**
-| Type | Description |
-| --------------------------------------- | --------------------------- |
-| Promise\<[UpdatePolicy](#updatepolicy)> | Promise used to return the result.|
+| Type | Description |
+| --------------------------------------- | ---------------------------------------- |
+| Promise\<[UpdatePolicy](#updatepolicy)> | Promise used to return the update policy. |
**Example**
@@ -498,10 +498,10 @@ Enumerates update types.
**System capability**: SystemCapability.Update.UpdateService
-| Name| Description |
-| ------ | -------- |
-| OTA | OTA update. |
-| patch | Patch update.|
+| Name | Description |
+| ----- | ------------- |
+| OTA | OTA update. |
+| patch | Patch update. |
## PackageTypes
@@ -509,15 +509,15 @@ Enumerates update package types.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Default Value| Description |
-| -------------------- | ------ | -------------- |
-| PACKAGE_TYPE_NORMAL | 1 | Common update package. |
-| PACKAGE_TYPE_BASE | 2 | Basic update package. |
-| PACKAGE_TYPE_CUST | 3 | Custom update package. |
-| PACKAGE_TYPE_PRELOAD | 4 | Preinstalled update package. |
-| PACKAGE_TYPE_COTA | 5 | Parameter configuration update package.|
-| PACKAGE_TYPE_VERSION | 6 | Version update package. |
-| PACKAGE_TYPE_PATCH | 7 | Patch packages |
+| Name | Default Value | Description |
+| -------------------- | ------------- | --------------------------------------- |
+| PACKAGE_TYPE_NORMAL | 1 | Common update package. |
+| PACKAGE_TYPE_BASE | 2 | Basic update package. |
+| PACKAGE_TYPE_CUST | 3 | Custom update package. |
+| PACKAGE_TYPE_PRELOAD | 4 | Preinstalled update package. |
+| PACKAGE_TYPE_COTA | 5 | Parameter configuration update package. |
+| PACKAGE_TYPE_VERSION | 6 | Version update package. |
+| PACKAGE_TYPE_PATCH | 7 | Patch package. |
## InstallMode
@@ -525,11 +525,11 @@ Enumerates update modes.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Default Value| Description |
-| ------------------- | ------ | -------- |
-| INSTALL_MODE_NORMAL | 0 | Normal update.|
-| INSTALL_MODE_NIGHT | 1 | Update at night.|
-| INSTALL_MODE_AUTO | 2 | Automatic update.|
+| Name | Default Value | Description |
+| ------------------- | ------------- | ----------------- |
+| INSTALL_MODE_NORMAL | 0 | Normal update. |
+| INSTALL_MODE_NIGHT | 1 | Update at night. |
+| INSTALL_MODE_AUTO | 2 | Automatic update. |
## NewVersionStatus
@@ -537,12 +537,12 @@ Enumerates new version check results.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Default Value| Description |
-| ------------------- | ------ | ---------------- |
-| VERSION_STATUS_ERR | -1 | System error while checking for the new version. |
-| VERSION_STATUS_NEW | 0 | New version detected. |
-| VERSION_STATUS_NONE | 1 | No new version detected.|
-| VERSION_STATUS_BUSY | 2 | System busy while checking for the new version. |
+| Name | Default Value | Description |
+| ------------------- | ------------- | ---------------------------------------- |
+| VERSION_STATUS_ERR | -1 | System error while checking for the new version. |
+| VERSION_STATUS_NEW | 0 | New version detected. |
+| VERSION_STATUS_NONE | 1 | No new version detected. |
+| VERSION_STATUS_BUSY | 2 | System busy while checking for the new version. |
## UpdatePolicy
@@ -550,11 +550,11 @@ Defines the update policy.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Type | Mandatory| Description |
-| ------------------- | --------------------------- | ---- | -------------- |
-| autoDownload | bool | Yes | Automatic update switch. |
-| installMode | [InstallMode](#installmode) | Yes | Installation mode. |
-| autoUpgradeInterval | Array\ | Yes | Period of time for automatic update.|
+| Name | Type | Mandatory | Description |
+| ------------------- | --------------------------- | --------- | ------------------------------------ |
+| autoDownload | bool | Yes | Automatic update switch. |
+| installMode | [InstallMode](#installmode) | Yes | Update mode. |
+| autoUpgradeInterval | Array\ | Yes | Period of time for automatic update. |
## NewVersionInfo
@@ -562,12 +562,12 @@ Defines the new version information.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Type | Mandatory| Description |
-| --------------- | ------------------------------------------- | ---- | -------- |
-| status | [NewVersionStatus](#newversionstatus) | Yes | Update status.|
-| errMsg | string | Yes | Error message.|
-| checkResults | Array<[CheckResult](#checkresult)> | Yes | Version check result.|
-| descriptionInfo | Array\<[DescriptionInfo](#descriptioninfo)> | Yes | Version description information.|
+| Name | Type | Mandatory | Description |
+| --------------- | ---------------------------------------- | --------- | -------------------------------- |
+| status | [NewVersionStatus](#newversionstatus) | Yes | Update status. |
+| errMsg | string | Yes | Error message. |
+| checkResults | Array<[CheckResult](#checkresult)> | Yes | Version check result. |
+| descriptionInfo | Array\<[DescriptionInfo](#descriptioninfo)> | Yes | Version description information. |
## CheckResult
@@ -575,14 +575,14 @@ Defines the version check result.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Type | Mandatory| Description |
-| ------------- | ----------------------------- | ---- | ------------ |
-| versionName | string | Yes | Version name. |
-| versionCode | number | Yes | Version code. |
-| size | number | Yes | Version size. |
-| verifyInfo | string | Yes | Version verification information.|
-| packageType | [PackageTypes](#packagetypes) | Yes | Version type. |
-| descriptionId | string | Yes | Version description information.|
+| Name | Type | Mandatory | Description |
+| ------------- | ----------------------------- | --------- | --------------------------------- |
+| versionName | string | Yes | Version name. |
+| versionCode | number | Yes | Version code. |
+| size | number | Yes | Version size. |
+| verifyInfo | string | Yes | Version verification information. |
+| packageType | [PackageTypes](#packagetypes) | Yes | Version type. |
+| descriptionId | string | Yes | Version description information. |
## DescriptionInfo
@@ -590,7 +590,7 @@ Defines the version description information.
**System capability**: SystemCapability.Update.UpdateService
-| Name | Type| Mandatory| Description |
-| ------------- | -------- | ---- | ----------------- |
-| descriptionId | string | Yes | Version ID information.|
-| content | string | Yes | Version changelog information.|
+| Name | Type | Mandatory | Description |
+| ------------- | ------ | --------- | ------------------------------ |
+| descriptionId | string | Yes | Version ID information. |
+| content | string | Yes | Version changelog information. |
diff --git a/en/application-dev/reference/apis/js-apis-volumemanager.md b/en/application-dev/reference/apis/js-apis-volumemanager.md
deleted file mode 100644
index 0b5491d66aad03a77512c492f96b31f264b05da5..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-volumemanager.md
+++ /dev/null
@@ -1,179 +0,0 @@
-# Volume Management
-
->  **NOTE**
->
-> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-> - This is a system API and cannot be called by third-party applications.
-
-## Modules to Import
-
-```js
-import volumemanager from "@ohos.volumeManager";
-```
-
-## volumemanager.getAllVolumes9+
-
-getAllVolumes(): Promise<Array<Volume>>
-
-Asynchronously obtains information about all available volumes. This method uses a promise to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Return value
-
- | Type | Description |
- | ---------------------------------- | -------------------------- |
- | Promise<[Volume](#volume)[]> | Promise used to return the execution result.|
-
-- Example
-
- ```js
- volumemanager.getAllVolumes().then(function(volumes){
- // do something
- });
- ```
-
-## volumemanager.getAllVolumes9+
-
-getAllVolumes(callback: AsyncCallback<Array<Volume>>): void
-
-Asynchronously obtains information about all available volumes. This method uses a callback to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Parameters
-
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------------------------------- | ---- | ------------------------------------ |
- | callback | callback:AsyncCallback<[Volume](#volume)[]> | Yes | Callback invoked to return the volume information obtained.|
-
-- Example
-
- ```js
- let uuid = "";
- volumemanager.getAllVolumes(uuid, function(error, volumes){
- // do something
- });
- ```
-
-
-## volumemanager.mount9+
-
-mount(volumeId: string): Promise<boolean>
-
-Asynchronously mounts a volume. This method uses a promise to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Parameters
-
- | Name | Type | Mandatory| Description|
- | -------- | ------ | ---- | ---- |
- | volumeId | string | Yes | Volume ID.|
-
-- Return value
-
- | Type | Description |
- | ---------------------- | ---------- |
- | Promise<boolean> | Promise used to return the execution result.|
-
-- Example
-
- ```js
- let volumeId = "";
- volumemanager.mount(volumeId).then(function(flag){
- // do something
- });
- ```
-
-## volumemanager.mount9+
-
-mount(volumeId: string, callback:AsyncCallback<boolean>):void
-
-Asynchronously obtains the available space of the specified volume. This method uses a callback to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Parameters
-
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------------------- | ---- | -------------------- |
- | volumeId | string | Yes | Volume ID. |
- | callback | callback:AsyncCallback<boolean> | Yes | Callback invoked to return the execution result.|
-
-- Example
-
- ```js
- let volumeId = "";
- volumemanager.mount(volumeId, function(error, flag){
- // do something
- });
- ```
-
-## volumemanager.unmount9+
-
-unmount(volumeId: string): Promise<boolean>
-
-Asynchronously unmounts a volume. This method uses a promise to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Parameters
-
- | Name | Type | Mandatory| Description|
- | -------- | ------ | ---- | ---- |
- | volumeId | string | Yes | Volume ID.|
-
-- Return value
-
- | Type | Description |
- | ---------------------- | ---------- |
- | Promise<boolean> | Promise used to return the execution result.|
-
-- Example
-
- ```js
- let volumeId = "";
- volumemanager.unmount(volumeId).then(function(flag){
- // do something
- });
- ```
-
-## volumemanager.unmount9+
-
-unmount(volumeId: string, callback:AsyncCallback<boolean>):void
-
-Asynchronously unmounts a volume. This method uses a callback to return the result.
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-- Parameters
-
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------------------- | ---- | -------------------- |
- | volumeId | string | Yes | Volume ID. |
- | callback | callback:AsyncCallback<boolean> | Yes | Callback invoked to return the execution result.|
-
-- Example
-
- ```js
- let volumeId = "";
- volumemanager.unmount(volumeId, function(error, flag){
- // do something
- });
- ```
-
-## Volume9+
-
-**System capability**: SystemCapability.FileManagement.StorageService.Volume
-
-### Attributes
-
-| Name | Type | Description |
-| ----------- | ------- | -------------------- |
-| id9+ | number | Volume ID. |
-| uuid9+ | string | Universally unique identifier (UUID) of the volume. |
-| description9+ | string | Description of the volume. |
-| removable9+ | boolean | Whether the volume is a removable storage device.|
-| state9+ | int | Current volume status. |
-| path9+ | string | Mount address of the volume. |
diff --git a/en/application-dev/reference/apis/js-apis-wallpaper.md b/en/application-dev/reference/apis/js-apis-wallpaper.md
new file mode 100644
index 0000000000000000000000000000000000000000..8f0d4aaae67090bf9335b223e6882852397a4a23
--- /dev/null
+++ b/en/application-dev/reference/apis/js-apis-wallpaper.md
@@ -0,0 +1,628 @@
+# Wallpaper
+
+
+>  **Note:**
+> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
+
+
+## Modules to Import
+
+
+```
+import wallpaper from '@ohos.wallpaper';
+```
+
+
+## WallpaperType
+
+Defines the wallpaper type.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+| Name | Description |
+| -------- | -------- |
+| WALLPAPER_LOCKSCREEN | Lock screen wallpaper. |
+| WALLPAPER_SYSTEM | Home screen wallpaper. |
+
+
+## wallpaper.getColors
+
+getColors(wallpaperType: WallpaperType, callback: AsyncCallback<Array<RgbaColor>>): void
+
+Obtains the main color information of the wallpaper of a specified type.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+ | callback | AsyncCallback<Array<[RgbaColor](#rgbacolor)>> | Yes | Callback used to return the main color information of the wallpaper. |
+
+- Example
+
+ ```
+ wallpaper.getColors(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to getColors because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to getColors.`);
+ });
+ ```
+
+
+## wallpaper.getColors
+
+getColors(wallpaperType: WallpaperType): Promise<Array<RgbaColor>>
+
+Obtains the main color information of the wallpaper of a specified type.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<Array<[RgbaColor](#rgbacolor)>> | Promise used to return the main color information of the wallpaper. |
+
+- Example
+
+ ```
+ wallpaper.getColors(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to getColors.`);
+ }).catch((error) => {
+ console.error(`failed to getColors because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.getId
+
+getId(wallpaperType: WallpaperType, callback: AsyncCallback<number>): void
+
+Obtains the ID of the wallpaper of the specified type.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+ | callback | AsyncCallback<number> | Yes | Callback used to return the wallpaper ID. If the wallpaper of the specified type is configured, a number greater than or equal to **0** is returned. Otherwise, **-1** is returned. The value ranges from -1 to 2^31-1. |
+
+- Example
+
+ ```
+ wallpaper.getId(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to getId because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to getId: ` + JSON.stringify(data));
+ });
+ ```
+
+
+## wallpaper.getId
+
+getId(wallpaperType: WallpaperType): Promise<number>
+
+Obtains the ID of the wallpaper of the specified type.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<number> | Promise used to return the wallpaper ID. If this type of wallpaper is configured, a number greater than or equal to **0** is returned. Otherwise, **-1** is returned. The value ranges from -1 to 2^31-1. |
+
+- Example
+
+ ```
+ wallpaper.getId(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to getId: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to getId because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.getMinHeight
+
+getMinHeight(callback: AsyncCallback<number>): void
+
+Obtains the minimum height of the wallpaper.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<number> | Yes | Callback used to return the minimum wallpaper height, in pixels. If the return value is **0**, no wallpaper is set. In this case, the default height should be used instead. |
+
+- Example
+
+ ```
+ wallpaper.getMinHeight((error, data) => {
+ if (error) {
+ console.error(`failed to getMinHeight because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to getMinHeight: ` + JSON.stringify(data));
+ });
+ ```
+
+
+## wallpaper.getMinHeight
+
+getMinHeight(): Promise<number>
+
+Obtains the minimum height of the wallpaper.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<number> | Promise used to return the minimum wallpaper height, in pixels. If the return value is **0**, no wallpaper is set. In this case, the default height should be used instead. |
+
+- Example
+
+ ```
+ wallpaper.getMinHeight().then((data) => {
+ console.log(`success to getMinHeight: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to getMinHeight because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.getMinWidth
+
+getMinWidth(callback: AsyncCallback<number>): void
+
+Obtains the minimum width of the wallpaper.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<number> | Yes | Callback used to return the minimum wallpaper width, in pixels. If the return value is **0**, no wallpaper is set. In this case, the default width should be used instead. |
+
+- Example
+
+ ```
+ wallpaper.getMinWidth((error, data) => {
+ if (error) {
+ console.error(`failed to getMinWidth because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to getMinWidth: ` + JSON.stringify(data));
+ });
+ ```
+
+
+## wallpaper.getMinWidth
+
+getMinWidth(): Promise<number>
+
+Obtains the minimum width of the wallpaper.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<number> | Promised used to return the minimum wallpaper width, in pixels. If the return value is **0**, no wallpaper is set. In this case, the default width should be used instead. |
+
+- Example
+
+ ```
+ wallpaper.getMinWidth().then((data) => {
+ console.log(`success to getMinWidth: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to getMinWidth because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.isChangePermitted
+
+isChangePermitted(callback: AsyncCallback<boolean>): void
+
+Checks whether to allow the application to change the wallpaper for the current user.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return the queried result. Returns **true** if it is allowed; returns **false** otherwise. |
+
+- Example
+
+ ```
+ wallpaper.isChangePermitted((error, data) => {
+ if (error) {
+ console.error(`failed to isChangePermitted because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to isChangePermitted: ` + JSON.stringify(data));
+ });
+ ```
+
+
+## wallpaper.isChangePermitted
+
+isChangePermitted(): Promise<boolean>
+
+Checks whether to allow the application to change the wallpaper for the current user.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return whether to allow the application to change the wallpaper for the current user. Returns **true** if it is allowed; returns **false** otherwise. |
+
+- Example
+
+ ```
+ wallpaper.isChangePermitted().then((data) => {
+ console.log(`success to isChangePermitted: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to isChangePermitted because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.isOperationAllowed
+
+isOperationAllowed(callback: AsyncCallback<boolean>): void
+
+Checks whether the user is allowed to set wallpapers.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | Yes | Callback used to return whether the user is allowed to set wallpapers. Returns **true** if it is allowed; returns **false** otherwise. |
+
+- Example
+
+ ```
+ wallpaper.isOperationAllowed((error, data) => {
+ if (error) {
+ console.error(`failed to isOperationAllowed because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to isOperationAllowed: ` + JSON.stringify(data));
+ });
+ ```
+
+
+## wallpaper.isOperationAllowed
+
+isOperationAllowed(): Promise<boolean>
+
+Checks whether the user is allowed to set wallpapers.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<boolean> | Promise used to return whether the user is allowed to set wallpapers. Returns **true** if it is allowed; returns **false** otherwise. |
+
+- Example
+
+ ```
+ wallpaper.isOperationAllowed().then((data) => {
+ console.log(`success to isOperationAllowed: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to isOperationAllowed because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.reset
+
+reset(wallpaperType: WallpaperType, callback: AsyncCallback<void>): void
+
+Removes a wallpaper of the specified type and restores the default one.
+
+**Required permission**: ohos.permission.SET_WALLPAPER
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, the result of removal is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ wallpaper.reset(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to reset because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to reset.`);
+ });
+ ```
+
+
+## wallpaper.reset
+
+reset(wallpaperType: WallpaperType): Promise<void>
+
+Removes a wallpaper of the specified type and restores the default one.
+
+**Required permission**: ohos.permission.SET_WALLPAPER
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. If the operation is successful, the result of removal is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ wallpaper.reset(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to reset.`);
+ }).catch((error) => {
+ console.error(`failed to reset because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.setWallpaper
+
+setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback<void>): void
+
+Sets a specified source as the wallpaper of a specified type.
+
+**Required permission**: ohos.permission.SET_WALLPAPER
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | source | string \| [PixelMap](js-apis-image.md#pixelmap7) | Yes | Uri path of the JPEG or PNG file, or bitmap of the PNG file. |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+ | callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, the setting result is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ //The source type is string.
+ let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg";
+ wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to setWallpaper because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to setWallpaper.`);
+ });
+
+ //The source type is image.PixelMap.
+ import image from '@ohos.multimedia.image';
+ let imageSource = image.createImageSource("file://" + wallpaperPath);
+ let opts = {
+ "desiredSize": {
+ "height": 3648,
+ "width": 2736
+ }
+ };
+ imageSource.createPixelMap(opts).then((pixelMap) => {
+ wallpaper.setWallpaper(pixelMap, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to setWallpaper because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to setWallpaper.`);
+ });
+ }).catch((error) => {
+ console.error(`failed to createPixelMap because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.setWallpaper
+
+setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise<void>
+
+Sets a specified source as the wallpaper of a specified type.
+
+**Required permission**: ohos.permission.SET_WALLPAPER
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | source | string \| [PixelMap](js-apis-image.md#pixelmap7) | Yes | Uri path of the JPEG or PNG file, or bitmap of the PNG file. |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<void> | Promise used to return the result. If the operation is successful, the setting result is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ //The source type is string.
+ let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg";
+ wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to setWallpaper.`);
+ }).catch((error) => {
+ console.error(`failed to setWallpaper because: ` + JSON.stringify(error));
+ });
+
+ //The source type is image.PixelMap.
+ import image from '@ohos.multimedia.image';
+ let imageSource = image.createImageSource("file://" + wallpaperPath);
+ let opts = {
+ "desiredSize": {
+ "height": 3648,
+ "width": 2736
+ }
+ };
+ imageSource.createPixelMap(opts).then((pixelMap) => {
+ wallpaper.setWallpaper(pixelMap, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to setWallpaper.`);
+ }).catch((error) => {
+ console.error(`failed to setWallpaper because: ` + JSON.stringify(error));
+ });
+ }).catch((error) => {
+ console.error(`failed to createPixelMap because: ` + JSON.stringify(error));
+ });
+ ```
+
+## wallpaper.getFile8+
+
+getFile(wallpaperType: WallpaperType, callback: AsyncCallback<number>): void
+
+Obtains the wallpaper of the specified type.
+
+**Required permissions**: ohos.permission.GET_WALLPAPER and ohos.permission.READ_USER_STORAGE
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+ | callback | AsyncCallback<number> | Yes | Callback used to return the result. If the operation is successful, the file descriptor ID to the wallpaper is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ wallpaper.getFile(wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error, data) => {
+ if (error) {
+ console.error(`failed to getFile because: ` + JSON.stringify(error));
+ return;
+ }
+ console.log(`success to getFile: ` + JSON.stringify(data));
+ });
+ ```
+
+## wallpaper.getFile8+
+
+getFile(wallpaperType: WallpaperType): Promise<number>
+
+Obtains the wallpaper of the specified type.
+
+**Required permissions**: ohos.permission.GET_WALLPAPER and ohos.permission.READ_USER_STORAGE
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | wallpaperType | [WallpaperType](#wallpapertype) | Yes | Wallpaper type. |
+
+- Return values
+ | Type | Description |
+ | -------- | -------- |
+ | Promise<number> | Promise used to return the result. If the operation is successful, the file descriptor ID to the wallpaper is returned. Otherwise, error information is returned. |
+
+- Example
+
+ ```
+ wallpaper.getFile(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
+ console.log(`success to getFile: ` + JSON.stringify(data));
+ }).catch((error) => {
+ console.error(`failed to getFile because: ` + JSON.stringify(error));
+ });
+ ```
+
+
+## wallpaper.on('colorChange')
+
+on(type: 'colorChange', callback: (colors: Array<RgbaColor>, wallpaperType: WallpaperType) => void): void
+
+Subscribes to the wallpaper color change event.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to subscribe to. The value **colorChange** indicates subscribing to the wallpaper color change event. |
+ | callback | function | Yes | Callback triggered when the wallpaper color changes. The wallpaper type and main colors are returned. - colors Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolor). - wallpaperType Wallpaper type. |
+
+- Example
+
+ ```
+ let listener = (colors, wallpaperType) => {
+ console.log(`wallpaper color changed.`);
+ };
+ wallpaper.on('colorChange', listener);
+ ```
+
+
+## wallpaper.off('colorChange')
+
+off(type: 'colorChange', callback?: (colors: Array<RgbaColor>, wallpaperType: WallpaperType) => void): void
+
+Unsubscribes from the wallpaper color change event.
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+- Parameters
+ | Name | Type | Mandatory | Description |
+ | -------- | -------- | -------- | -------- |
+ | type | string | Yes | Type of the event to unsubscribe from. The value **colorChange** indicates unsubscribing from the wallpaper color change event. |
+ | callback | function | No | Callback for the wallpaper color change event. If this parameter is not specified, all callbacks corresponding to the wallpaper color change event are invoked. - colors Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolor). - wallpaperType Wallpaper type. |
+
+- Example
+
+ ```
+ let listener = (colors, wallpaperType) => {
+ console.log(`wallpaper color changed.`);
+ };
+ wallpaper.on('colorChange', listener);
+ // Unsubscribe from the listener.
+ wallpaper.off('colorChange', listener);
+ //Unsubscribe from all subscriptions of the colorChange type.
+ wallpaper.off('colorChange');
+ ```
+
+
+## RgbaColor
+
+**System capability**: SystemCapability.MiscServices.Wallpaper
+
+| Name | Type | Readable | Writable | Description |
+| -------- | -------- | -------- | -------- | -------- |
+| red | number | Yes | Yes | Red color. The value ranges from 0 to 255. |
+| green | number | Yes | Yes | Green color. The value ranges from 0 to 255. |
+| blue | number | Yes | Yes | Blue color. The value ranges from 0 to 255. |
+| alpha | number | Yes | Yes | Alpha value. The value ranges from 0 to 255. |
diff --git a/en/application-dev/reference/apis/js-apis-workScheduler.md b/en/application-dev/reference/apis/js-apis-workScheduler.md
deleted file mode 100644
index 770f833363445e40fa738a4347ff68444125b3f6..0000000000000000000000000000000000000000
--- a/en/application-dev/reference/apis/js-apis-workScheduler.md
+++ /dev/null
@@ -1,340 +0,0 @@
-# Work Scheduler
-
->  **NOTE**
-> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
-
-
-## Modules to Import
-
-```
-import workScheduler from '@ohos.workScheduler'
-```
-
-## workScheduler.startWork
-startWork(work: WorkInfo): boolean
-
-Instructs the **WorkSchedulerService** to add the specified task to the execution queue.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| ---- | --------------------- | ---- | -------------- |
-| work | [WorkInfo](#workinfo) | Yes | Task to be added to the execution queue.|
-
-**Return value**
-
-| Type | Description |
-| ------- | -------------------------------- |
-| boolean | Returns **true** if the task is added to the execution queue; returns **false** otherwise.|
-
-**Example**
-
-```
- let workInfo = {
- workId: 1,
- batteryLevel:50,
- batteryStatus:workScheduler.BatteryStatus.BATTERY_STATUS_LOW,
- isRepeat: false,
- isPersisted: true,
- bundleName: "com.example.myapplication",
- abilityName: "MyExtension"
- }
- var res = workScheduler.startWork(workInfo);
- console.info("workschedulerLog res:" + res);
-```
-
-## workScheduler.stopWork
-stopWork(work: WorkInfo, needCancel?: boolean): boolean
-
-Instructs the **WorkSchedulerService** to stop the specified task.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| ---------- | --------------------- | ---- | ---------- |
-| work | [WorkInfo](#workinfo) | Yes | Task to stop. |
-| needCancel | boolean | Yes | Whether to cancel the task.|
-
-**Return value**
-
-| Type | Description |
-| ------- | ----------------------- |
-| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
-
-**Example**
-
-```
- let workInfo = {
- workId: 1,
- batteryLevel:50,
- batteryStatus:workScheduler.BatteryStatus.BATTERY_STATUS_LOW,
- isRepeat: false,
- isPersisted: true,
- bundleName: "com.example.myapplication",
- abilityName: "MyExtension"
- }
- var res = workScheduler.stopWork(workInfo, false);
- console.info("workschedulerLog res:" + res);
-```
-
-## workScheduler.getWorkStatus
-getWorkStatus(workId: number, callback : AsyncCallback\): void
-
-Obtains the latest task status. This API uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------------- | ---- | ---------------------------------------- |
-| workId | number | Yes | Task ID. |
-| callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
-
-**Example**
-
-```
- workScheduler.getWorkStatus(50, (err, res) => {
- if (err) {
- console.info('workschedulerLog getWorkStatus failed, because:' + err.data);
- } else {
- for (let item in res) {
- console.info('workschedulerLog getWorkStatus success,' + item + ' is:' + res[item]);
- }
- }
- });
-```
-
-## workScheduler.getWorkStatus
-getWorkStatus(workId: number): Promise\
-
-Obtains the latest task status. This API uses a promise to return the result.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| ------ | ------ | ---- | -------- |
-| workId | number | Yes | Task ID.|
-
-**Return value**
-
-| Type | Description |
-| ------------------------------- | ---------------------------------------- |
-| Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
-
-**Example**
-
-```
- workScheduler.getWorkStatus(50).then((res) => {
- for (let item in res) {
- console.info('workschedulerLog getWorkStatus success,' + item + ' is:' + res[item]);
- }
- }).catch((err) => {
- console.info('workschedulerLog getWorkStatus failed, because:' + err.data);
- })
-```
-
-## workScheduler.obtainAllWorks
-obtainAllWorks(callback : AsyncCallback\): Array\
-
-Obtains all tasks associated with this application. This API uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| -------- | -------------------- | ---- | ------------------------------- |
-| callback | AsyncCallback\ | Yes | Callback used to return all tasks associated with the current application.|
-
-**Return value**
-
-| Type | Description |
-| ----------------------------- | --------------- |
-| Array\<[WorkInfo](#workinfo)> | All tasks associated with the current application.|
-
-**Example**
-
-```
- workScheduler.obtainAllWorks((err, res) =>{
- if (err) {
- console.info('workschedulerLog obtainAllWorks failed, because:' + err.data);
- } else {
- console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res));
- }
- });
-```
-
-## workScheduler.obtainAllWorks
-obtainAllWorks(): Promise>
-
-Obtains all tasks associated with this application. This API uses a promise to return the result.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Return value**
-
-| Type | Description |
-| -------------------------------------- | ------------------------------ |
-| Promise> | Promise used to return all tasks associated with the current application.|
-
-**Example**
-
-```
- workScheduler.obtainAllWorks().then((res) => {
- console.info('workschedulerLog obtainAllWorks success, data is:' + JSON.stringify(res));
- }).catch((err) => {
- console.info('workschedulerLog obtainAllWorks failed, because:' + err.data);
- })
-```
-
-## workScheduler.stopAndClearWorks
-stopAndClearWorks(): boolean
-
-Stops and cancels all tasks associated with the current application.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Example**
-
-```
- let res = workScheduler.stopAndClearWorks();
- console.info("workschedulerLog res:" + res);
-```
-
-## workScheduler.isLastWorkTimeOut
-isLastWorkTimeOut(workId: number, callback : AsyncCallback\): boolean
-
-Checks whether the last execution of the specified task timed out. This API uses an asynchronous callback to return the result.
-
-**System capability**: SystemCapability.ResourceSchedule.WorkScheduler
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-| -------- | -------------------- | ---- | ---------------------------------------- |
-| workId | number | Yes | Task ID. |
-| callback | AsyncCallback\