diff --git a/README_zh.md b/README_zh.md
index 0add1ca75ee7fb41dd56d1a180b3abf30098ea76..27ad5abed9665603e2bf925f5e59b5dcf221f658 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -33,7 +33,14 @@ OpenHarmony_v1.x_release:OpenHarmony 1.1.4 LTS稳定版本,[了解版本详
[了解更多版本详情](zh-cn/release-notes/)。
+## 第三方开源软件及许可说明
+3rd-Party-License:[第三方开源软件及许可证说明](zh-cn/contribute/第三方开源软件及许可证说明.md)
+## 贡献
+非常欢迎您参与[贡献](zh-cn/contribute/参与贡献.md),我们鼓励开发者以各种方式参与文档反馈和贡献。
+您可以对现有文档进行评价、简单更改、反馈文档质量问题、贡献您的原创内容,详细请参考[贡献文档](zh-cn/contribute/贡献文档.md)。
+
+卓越贡献者将会在开发者社区文档贡献专栏表彰公示。
\ No newline at end of file
diff --git a/en/application-dev/reference/apis/Readme-EN.md b/en/application-dev/reference/apis/Readme-EN.md
index f9f0247e9fff7af42e5d4ba0e57bec7750d41fa5..b33bcf666262b6c1b98d4ed734c08b4a2a6d03bc 100644
--- a/en/application-dev/reference/apis/Readme-EN.md
+++ b/en/application-dev/reference/apis/Readme-EN.md
@@ -45,8 +45,13 @@
- [SMS](js-apis-sms.md)
- [SIM Management](js-apis-sim.md)
- [Radio](js-apis-radio.md)
- - [observer](js-apis-observer.md)
+ - [Observer](js-apis-observer.md)
- [Cellular Data](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](js-apis-wifi.md)
- [Bluetooth](js-apis-bluetooth.md)
diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md
index 33ea80fda600d889e265ace58cb3de2b5f0d19fb..4d2b6c07f8170d6f930fc6522095967c3f608f92 100644
--- a/en/application-dev/reference/apis/js-apis-call.md
+++ b/en/application-dev/reference/apis/js-apis-call.md
@@ -11,11 +11,11 @@
import call from '@ohos.telephony.call';
```
-## call.dial
+## call.dial
dial\(phoneNumber: string, callback: AsyncCallback\): void
-Initiates a call. This function uses an asynchronous callback to return the execution result.
+Initiates a call. This API uses an asynchronous callback to return the execution result.
**Required permission**: ohos.permission.PLACE\_CALL (a system permission)
@@ -23,7 +23,7 @@ Initiates a call. This function uses an asynchronous callback to return the exec
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ---------------------------- | ---- | ------------------------------------------------- |
| phoneNumber | string | Yes | Phone number. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: success
- **false**: failure|
@@ -37,11 +37,11 @@ call.dial("138xxxxxxxx", (err, data) => {
```
-## call.dial
+## call.dial
dial\(phoneNumber: string, options: DialOptions, callback: AsyncCallback\): void
-Initiates a call. You can set call options as needed. This function uses an asynchronous callback to return the execution result.
+Initiates a call. You can set call options as needed. This API uses an asynchronous callback to return the execution result.
**Required permission**: ohos.permission.PLACE\_CALL (a system permission)
@@ -49,10 +49,10 @@ Initiates a call. You can set call options as needed. This function uses an asyn
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ---------------------------- | ---- | ------------------------------------------------- |
| phoneNumber | string | Yes | Phone number. |
-| options | DialOptions | Yes | Call options. For details, see [DialOptions](#DialOptions). |
+| options | DialOptions | Yes | Call options defined in [DialOptions](#dialoptions). |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: success
- **false**: failure|
**Example**
@@ -66,11 +66,11 @@ call.dial("138xxxxxxxx", {
```
-## call.dial
+## call.dial
dial\(phoneNumber: string, options?: DialOptions\): Promise
-Initiates a call. You can set call options as needed. This function uses a promise to return the execution result.
+Initiates a call. You can set call options as needed. This API uses a promise to return the execution result.
**Required permission**: ohos.permission.PLACE\_CALL (a system permission)
@@ -78,10 +78,10 @@ Initiates a call. You can set call options as needed. This function uses a promi
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ----------- | ---- | ------------------------------------------- |
| phoneNumber | string | Yes | Phone number. |
-| options | DialOptions | Yes | Call options. For details, see [DialOptions](#DialOptions).|
+| options | DialOptions | Yes | Call options defined in [DialOptions](#dialoptions).|
**Return Value**
@@ -102,17 +102,19 @@ promise.then(data => {
});
```
-## call.makeCall7+
+## call.makeCall7+
-makeCall(phoneNumber: string, callback: AsyncCallback): void
+makeCall(phoneNumber: string, callback: AsyncCallback\): void
-Launches the call screen and displays the dialed number. This method uses an asynchronous callback to return the result.
+Launches the call screen and displays the dialed number. This API uses an asynchronous callback to return the result.
-**System capability**: SystemCapability.Telephony.CallManager
+This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
+
+**System capability**: SystemCapability.Applications.Contacts
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ------------------------- | ---- | ------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
@@ -126,17 +128,19 @@ call.makeCall("138xxxxxxxx", err => {
```
-## call.makeCall7+
+## call.makeCall7+
-makeCall(phoneNumber: string): Promise
+makeCall(phoneNumber: string): Promise\
-Launches the call screen and displays the dialed number. This method uses a promise to return the result.
+Launches the call screen and displays the dialed number. This API uses a promise to return the result.
-**System capability**: SystemCapability.Telephony.CallManager
+This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
+
+**System capability**: SystemCapability.Applications.Contacts
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ---------- |
| phoneNumber | string | Yes | Phone number.|
@@ -157,17 +161,17 @@ promise.then(() => {
});
```
-## call.hasCall
+## call.hasCall
hasCall\(callback: AsyncCallback\): void
-Checks whether a call is in progress. This function uses an asynchronous callback to return the result.
+Checks whether a call is in progress. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: A call is in progress.
- **false**: No call is in progress.|
@@ -180,11 +184,11 @@ call.hasCall((err, data) => {
```
-## call.hasCall
+## call.hasCall
hasCall\(\): Promise
-Checks whether a call is in progress. This function uses a promise to return the result.
+Checks whether a call is in progress. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CallManager
@@ -206,19 +210,19 @@ promise.then(data => {
```
-## call.getCallState
+## call.getCallState
getCallState\(callback: AsyncCallback\): void
-Obtains the call status. This function uses an asynchronous callback to return the result.
+Obtains the call status. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| -------- | -------------------------------------------- | ---- | ------------------------------------ |
-| callback | AsyncCallback<[CallState](#CallState)> | Yes | Callback used to return the result.|
+| callback | AsyncCallback<[CallState](#callstate)> | Yes | Callback used to return the result.|
**Example**
@@ -229,11 +233,11 @@ call.getCallState((err, data) => {
```
-## call.getCallState
+## call.getCallState
getCallState\(\): Promise
-Obtains the call status. This function uses a promise to return the result.
+Obtains the call status. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CallManager
@@ -241,7 +245,7 @@ Obtains the call status. This function uses a promise to return the result.
| Type | Description |
| -------------------------------------- | ----------------------------------------- |
-| Promise<[CallState](#CallState)> | Promise used to return the result.|
+| Promise<[CallState](#callstate)> | Promise used to return the result.|
**Example**
@@ -254,11 +258,11 @@ promise.then(data => {
});
```
-## call.hasVoiceCapability7+
+## call.hasVoiceCapability7+
hasVoiceCapability(): boolean
-Checks whether a device supports voice calls. This function works in synchronous mode.
+Checks whether a device supports voice calls. This API works in synchronous mode.
**System capability**: SystemCapability.Telephony.CallManager
@@ -273,17 +277,17 @@ let result = call.hasVoiceCapability();
console.log(`hasVoiceCapability: ${JSON.stringify(result)}`);
```
-## call.isEmergencyPhoneNumber7+
+## call.isEmergencyPhoneNumber7+
isEmergencyPhoneNumber\(phoneNumber: string, callback: AsyncCallback\): void
-Checks whether the call number of the SIM card in the specified slot is an emergency number. This function uses an asynchronous callback to return the result.
+Checks whether the call number of the SIM card in the specified slot is an emergency number. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ---------------------------- | ---- | ------------------------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number.|
@@ -297,20 +301,20 @@ call.isEmergencyPhoneNumber("138xxxxxxxx", (err, data) => {
```
-## call.isEmergencyPhoneNumber7+
+## call.isEmergencyPhoneNumber7+
isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback\): void
-Checks whether the call number of the SIM card in the specified slot is an emergency number. This function uses an asynchronous callback to return the result.
+Checks whether the call number of the SIM card in the specified slot is an emergency number. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ---------------------------- | ---- | ------------------------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
-| options | EmergencyNumberOptions | Yes | Emergency number options defined in [EmergencyNumberOptions](#EmergencyNumberOptions).|
+| options | EmergencyNumberOptions | Yes | Emergency number options defined in [EmergencyNumberOptions](#emergencynumberoptions7).|
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: The called number is an emergency number.
- **false**: The called number is not an emergency number.|
**Example**
@@ -322,20 +326,20 @@ call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, value) => {
```
-## call.isEmergencyPhoneNumber7+
+## call.isEmergencyPhoneNumber7+
isEmergencyPhoneNumber\(phoneNumber: string, options?: EmergencyNumberOptions\): Promise
-Checks whether the call number of the SIM card in the specified slot is an emergency number. This function uses a promise to return the result.
+Checks whether the call number of the SIM card in the specified slot is an emergency number. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ---------------------- | ---- | ------------------------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
-| options | EmergencyNumberOptions | Yes | Emergency number options defined in [EmergencyNumberOptions](#EmergencyNumberOptions).|
+| options | EmergencyNumberOptions | Yes | Emergency number options defined in [EmergencyNumberOptions](#emergencynumberoptions7).|
**Return Value**
@@ -354,17 +358,17 @@ promise.then(data => {
});
```
-## call.formatPhoneNumber7+
+## call.formatPhoneNumber7+
formatPhoneNumber\(phoneNumber: string, callback: AsyncCallback\): void
-Formats a phone number based on the specified ISO country code. This function uses an asynchronous callback to return the result.
+Formats a phone number based on the specified ISO country code. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | ------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
| callback | AsyncCallback<string> | Yes | Callback used to return the result.|
@@ -378,20 +382,20 @@ call.formatPhoneNumber("138xxxxxxxx", (err, data) => {
```
-## call.formatPhoneNumber7+
+## call.formatPhoneNumber7+
formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback\): void
-Formats a phone number based on specified formatting options. This function uses an asynchronous callback to return the result.
+Formats a phone number based on specified formatting options. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | ------------------------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
-| options | NumberFormatOptions | Yes | Number formatting options defined in [NumberFormatOptions](#NumberFormatOptions).|
+| options | NumberFormatOptions | Yes | Number formatting options defined in [NumberFormatOptions](#numberformatoptions7).|
| callback | AsyncCallback<string> | Yes | Callback used to return the result. |
**Example**
@@ -405,20 +409,20 @@ call.formatPhoneNumber("138xxxxxxxx",{
```
-## call.formatPhoneNumber7+
+## call.formatPhoneNumber7+
formatPhoneNumber\(phoneNumber: string, options?: NumberFormatOptions\): Promise
-Formats a phone number based on specified formatting options. This function uses a promise to return the result.
+Formats a phone number based on specified formatting options. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CallManager
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ------------------- | ---- | ------------------------------------------------------------ |
| phoneNumber | string | Yes | Phone number. |
-| options | NumberFormatOptions | Yes | Number formatting options defined in [NumberFormatOptions](#NumberFormatOptions).|
+| options | NumberFormatOptions | Yes | Number formatting options defined in [NumberFormatOptions](#numberformatoptions7).|
**Return Value**
@@ -439,11 +443,11 @@ promise.then(data => {
});
```
-## call.formatPhoneNumberToE1647+
+## call.formatPhoneNumberToE1647+
formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: AsyncCallback\): void
-Converts a phone number into the E.164 format. This function uses an asynchronous callback to return the result.
+Converts a phone number into the E.164 format. This API uses an asynchronous callback to return the result.
The phone number must match the specified country code. For example, for a China phone number, the country code must be **CN**. Otherwise, **null** will be returned.
@@ -453,7 +457,7 @@ All country codes are supported.
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | ----------------------------------------------------- |
| phoneNumber | string | Yes | Phone number. |
| countryCode | string | Yes | Country code, for example, **CN** (China). All country codes are supported. |
@@ -470,11 +474,11 @@ call.formatPhoneNumberToE164("138xxxxxxxx",{
```
-## call.formatPhoneNumberToE1647+
+## call.formatPhoneNumberToE1647+
formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise
-Converts a phone number into the E.164 format. This function uses a promise to return the result.
+Converts a phone number into the E.164 format. This API uses a promise to return the result.
The phone number must match the specified country code. For example, for a China phone number, the country code must be **CN**. Otherwise, **null** will be returned.
@@ -484,7 +488,7 @@ All country codes are supported.
**Parameters**
-| Name | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ---------------------------------------- |
| phoneNumber | string | Yes | Phone number. |
| countryCode | string | Yes | Country code, for example, **CN** (China). All country codes are supported.|
@@ -508,43 +512,45 @@ promise.then(data => {
});
```
-## DialOptions
+## DialOptions
Provides an option for determining whether a call is a video call.
**System capability**: SystemCapability.Telephony.CallManager
-| Parameter | Type | Mandatory| Description |
+| Name| Type | Mandatory| Description |
| ------ | ------- | ---- | ------------------------------------------------------------ |
| extras | boolean | No | Indication of a video call.
- **true**: video call
- **false** (default): voice call|
-## CallState
+## CallState
Enumerates call states.
-| Variable | Value | Description |
+**System capability**: SystemCapability.Telephony.CallManager
+
+| Name | Value | Description |
| ------------------ | ---- | ------------------------------------------------------------ |
-| CALL_STATE_UNKNOWN | -1 | The call status fails to be obtained and is unknown.
**System capability**: SystemCapability.Telephony.CallManager|
-| CALL_STATE_IDLE | 0 | No call is in progress.
**System capability**: SystemCapability.Telephony.CallManager|
-| CALL_STATE_RINGING | 1 | The call is in the ringing or waiting state.
**System capability**: SystemCapability.Telephony.CallManager|
-| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting.
**System capability**: SystemCapability.Telephony.CallManager|
+| CALL_STATE_UNKNOWN | -1 | The call status fails to be obtained and is unknown. |
+| CALL_STATE_IDLE | 0 | No call is in progress. |
+| CALL_STATE_RINGING | 1 | The call is in the ringing or waiting state. |
+| CALL_STATE_OFFHOOK | 2 | At least one call is in dialing, active, or on hold, and no new incoming call is ringing or waiting.|
-## EmergencyNumberOptions7+
+## EmergencyNumberOptions7+
Provides an option for determining whether a number is an emergency number for the SIM card in the specified slot.
**System capability**: SystemCapability.Telephony.CallManager
-| Parameter | Type | Mandatory| Description |
+| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------ |
| slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
-## NumberFormatOptions7+
+## NumberFormatOptions7+
Provides an option for number formatting.
**System capability**: SystemCapability.Telephony.CallManager
-| Parameter | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ----------- | ------ | ---- | ---------------------------------------------------------- |
| countryCode | string | No | Country code, for example, **CN** (China). All country codes are supported. The default value is **CN**.|
diff --git a/en/application-dev/reference/apis/js-apis-camera.md b/en/application-dev/reference/apis/js-apis-camera.md
index c076a882942d2145b641555efd8ac2bd5a504fd4..3d41d138f00cfee03c52555c27fe3e18e8dd2dcf 100644
--- a/en/application-dev/reference/apis/js-apis-camera.md
+++ b/en/application-dev/reference/apis/js-apis-camera.md
@@ -1,7 +1,7 @@
# Camera
>  **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.
+> 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
@@ -31,11 +31,6 @@ Gets a **CameraManager** instance. This method uses an asynchronous callback to
| context | Context | Yes | Application context |
| callback | AsyncCallback | Yes | Callback used to return the CameraManager instance |
-
-**Return values**
-
-none
-
**Example**
```
@@ -82,59 +77,62 @@ camera.getCameraManager(context).then((cameraManger) => {
Enumerates camera status types.
+**System Capabilities:**
+
+SystemCapability.Multimedia.Camera.Core
+
| Name | Default Value | Description |
|---------------------------|---------------|--------------------|
-| CAMERA_STATUS_APPEAR | 0 | Camera appear
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_STATUS_DISAPPEAR | 1 | Camera disappear
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_STATUS_AVAILABLE | 2 | Camera available
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_STATUS_UNAVAILABLE | 3 | Camera unavailable
System Capabilities: SystemCapability.Multimedia.Camera.Core|
+| 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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_POSITION_BACK | 1 | Rear camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_POSITION_FRONT | 2 | Front camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| 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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_TYPE_WIDE_ANGLE | 1 | Wide camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_TYPE_ULTRA_WIDE | 2 | Ultra wide camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_TYPE_TELEPHOTO | 3 | Telephoto camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_TYPE_TRUE_DEPTH | 4 | True depth camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| 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.
-| Name | Default value | Description |
-|------------------------------|---------------|----------------------------|
-| CAMERA_CONNECTION_BUILT_IN | 0 | Built-in camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_CONNECTION_REMOTE | 2 | Remote camera
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-
-
-## CameraFormat
-
-Enumerates the camera formats.
+**System Capabilities:**
-| Name | Default value | Description |
-|----------------------------|---------------|---------------------|
-| CAMERA_FORMAT_YCRCb_420_SP | 1003 | Camera YCRCb
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_FORMAT_JPEG | 2000 | Camera format jpeg
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_FORMAT_AVC | 3000 | Camera format avc
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| CAMERA_FORMAT_HEVC | 3001 | Camera format hevc
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+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
@@ -156,10 +154,6 @@ Gets all cameras supported by the device. This method uses an asynchronous callb
|----------|--------------------------------|-----------|---------------------------------------------------------|
| callback | AsyncCallback\> | Yes | Callback used to return the array of supported cameras. |
-**Return values**
-
-none
-
**Example**
```
@@ -182,10 +176,6 @@ SystemCapability.Multimedia.Camera.Core
Gets all cameras supported by the device. This method uses a promise to return the array of supported cameras.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -218,10 +208,6 @@ Creates a **CameraInput** instance with the specified camera ID. This method use
| cameraId | string | Yes | Camera ID used to create the instance |
| callback | AsyncCallback | Yes | Callback used to return the CameraInput instance |
-**Return values**
-
-none
-
**Example**
```
@@ -282,10 +268,6 @@ Creates a **CameraInput** instance with the specified camera position and camera
| cameraType | CameraType | Yes | Camera type |
| callback | AsyncCallback | Yes | Callback used to return the CameraInput instance |
-**Return values**
-
-none
-
**Example**
```
@@ -346,10 +328,6 @@ Listens for camera status changes. This method uses a callback to get camera sta
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the camera status change. |
-**Return value**
-
-None
-
**Example**
```
@@ -361,38 +339,48 @@ cameraManager.on('cameraStatus', (cameraStatusInfo) => {
## Camera
-Camera class.
+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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| cameraPosition | cameraPosition | readonly | Camera position
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| cameraType | cameraType | readonly | Camera type
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| connectionType | connectionType | readonly | Camera connection type
System Capabilities: SystemCapability.Multimedia.Camera.Core|
+| cameraId | string | readonly | Camera ID |
+| cameraPosition | cameraPosition | readonly | Camera position |
+| cameraType | cameraType | readonly | Camera type |
+| connectionType | connectionType | readonly | Camera connection type |
```
-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;
+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
-CameraStatusInfo class.
+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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| status | CameraStatus | Camera status
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| camera | Camera | Camera object |
+| status | CameraStatus | Camera status |
## CameraInput
@@ -415,10 +403,6 @@ Gets the camera ID based on which this **CameraInput** instance is created. This
|----------|------------------------|-----------|---------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the camera ID |
-**Return values**
-
-none
-
```
cameraInput.getCameraId((err, cameraId) => {
if (err) {
@@ -439,10 +423,6 @@ SystemCapability.Multimedia.Camera.Core
Gets the camera ID based on which this **CameraInput** instance is created. This method uses a promise to return the camera ID.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -457,251 +437,6 @@ cameraInput.getCameraId().then((cameraId) => {
})
```
-### getSupportedSizes\(format: CameraFormat, callback: AsyncCallback\>\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported sizes for a given format. This method uses an asynchronous callback to return the supported sizes.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|------------------------------|-----------|---------------------------------------------|
-| format | CameraFormat | Yes | Camera format used to get supported sizes |
-| callback | AsyncCallback\> | Yes | Callback used to return the supported sizes |
-
-
-**Return values**
-
-none
-
-**Example**
-
-```
-cameraInput.getSupportedSizes(format, (err, sizes) => {
- if (err) {
- console.error('Failed to get the supported sizes. ${err.message}');
- return;
- }
- console.log('Callback returned with the supported sizes:' + sizes);
-})
-```
-
-### getSupportedSizes\(format: CameraFormat\): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported sizes for a given format. This method uses a promise to return the supported sizes.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|----------------------------|-----------|-----------------------------------------------|
-| format | CameraFormat | Yes | Camera format used to get the supported sizes |
-
-**Return values**
-
-| Type | Description |
-|------------------------|---------------------------------------------|
-| Promise\> | Promise used to return the supported sizes. |
-
-**Example**
-
-```
-cameraInput.getSupportedSizes(format).then((sizes) => {
- console.log('Promise returned with supported sizes: ' + sizes);
-})
-```
-
-### getSupportedPreviewFormats\(callback: AsyncCallback\>\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for preview. This method uses an asynchronous callback to return the supported formats.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------------|-----------|---------------------------------------------------|
-| callback | AsyncCallback\> | Yes | Callback used to return the supported preview formats. |
-
-
-**Return values**
-
-none
-
-**Example**
-
-```
-cameraInput.getSupportedPreviewFormats((err, previewFormats) => {
- if (err) {
- console.error('Failed to get the supported preview formats. ${err.message}');
- return;
- }
- console.log('Callback returned with supported preview formats: ' + previewFormats.length);
-})
-```
-
-### getSupportedPreviewFormats\(\): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for preview. This method uses a promise to return the supported formats.
-
-**Parameters**
-
-none
-
-**Return values**
-
-| Type | Description |
-|--------------------------------|-------------------------------------------------------|
-| Promise\> | Promise used to return the supported preview formats |
-
-**Example**
-
-```
-cameraInput.getSupportedPreviewFormats().then((previewFormats) => {
- console.log('Promise returned with supported preview formats.' + previewFormats.length);
-})
-```
-
-### getSupportedPhotoFormats\(callback: AsyncCallback\>\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for photographing. This method uses an asynchronous callback to return the supported formats.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------------|-----------|-------------------------------------------------|
-| callback | AsyncCallback\> | Yes | Callback used to return the supported photo formats. |
-
-**Return values**
-
-none
-
-**Example**
-
-```
-cameraInput.getSupportedPhotoFormats((err, photoFormats) => {
- if (err) {
- console.error('Failed to get the supported photo formats. ${err.message}');
- return;
- }
- console.log('Callback returned with supported photo formats');
-})
-```
-
-### getSupportedPhotoFormats\(\): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for photographing. This method uses a promise to return the supported formats.
-
-**Parameters**
-
-none
-
-**Return values**
-
-| Type | Description |
-|--------------------------------|---------------------------------------------------|
-| Promise\> | Promise used to return supported photo formats. |
-
-**Example**
-
-```
-cameraInput.getSupportedPhotoFormats().then((photoFormats) => {
- console.log('Promise returned with supported photo formats.' + photoFormats.length);
-})
-```
-
-### getSupportedVideoFormats\(callback: AsyncCallback\>\): void;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for video recording. This method uses an asynchronous callback to return the supported video formats.
-
-**Parameters**
-
-| Name | Type | Mandatory | Description |
-|----------|--------------------------------------|-----------|-------------------------------------------------|
-| callback | AsyncCallback\> | Yes | Callback used to return the supported video formats. |
-
-**Return values**
-
-none
-
-**Example**
-
-```
-cameraInput.getSupportedVideoFormats((err, videoFormats) => {
- if (err) {
- console.error('Failed to get the supported video formats. ${err.message}');
- return;
- }
- console.log('Callback returned with supported video formats : ' + videoFormats.length);
-})
-```
-
-### getSupportedVideoFormats\(\): Promise\>;
-
-**System Capabilities:**
-
-SystemCapability.Multimedia.Camera.Core
-
-**Description**
-
-Gets supported formats for video recording. This method uses a promise to return the supported video format.
-
-**Parameters**
-
-none
-
-**Return values**
-
-| Type | Description |
-|--------------------------------|---------------------------------------------------|
-| Promise\> | Promise used to return supported video formats. |
-
-**Example**
-
-```
-cameraInput.getSupportedVideoFormats().then((videoFormats) => {
- console.log('Promise returned with supported video formats.' + videoFormats.length);
-})
-```
-
### hasFlash(callback: AsyncCallback): void;
**System Capabilities:**
@@ -718,10 +453,6 @@ Checks whether the device has flash light. This method uses an asynchronous call
|----------|-------------------------|-----------|----------------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the flash light support status |
-**Return values**
-
-none
-
**Example**
```
@@ -744,10 +475,6 @@ SystemCapability.Multimedia.Camera.Core
Checks whether the device has flash light. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -779,10 +506,6 @@ Checks whether a specified flash mode is supported. This method uses an asynchro
| flashMode | FlashMode | Yes | Flash mode |
| callback | AsyncCallback | Yes | Callback used to return the device flash support status |
-**Return values**
-
-none
-
**Example**
```
@@ -844,10 +567,6 @@ Note: Before setting the flash mode, check the support for the flash light (FlashMode | Yes | Flash mode |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -887,7 +606,7 @@ Note: Before setting the flash mode, check the support for the flash light ( {
+cameraInput.setFlashMode(flashMode).then(() => {
console.log('Promise returned with the successful execution of setFlashMode.');
})
```
@@ -908,10 +627,6 @@ Gets current flash mode. This method uses an asynchronous callback to return the
|-----------|---------------------------|-----------|------------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the current flash mode |
-**Return values**
-
-none
-
**Example**
```
@@ -934,10 +649,6 @@ SystemCapability.Multimedia.Camera.Core
Gets current flash mode. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -947,7 +658,7 @@ none
**Example**
```
-cameraInput.getFlashMode().then(flashMode) => {
+cameraInput.getFlashMode().then((flashMode) => {
console.log('Promise returned with current flash mode : ' + flashMode);
})
```
@@ -969,10 +680,6 @@ Checks whether a specified focus mode is supported. This method uses an asynchro
| afMode | FocusMode | Yes | Focus mode |
| callback | AsyncCallback | Yes | Callback used to return the device focus support status |
-**Return values**
-
-none
-
**Example**
```
@@ -1034,10 +741,6 @@ Note: Before setting the focus mode, check focus mode support (FocusMode | Yes | Focus mode |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1077,7 +780,7 @@ Note: Before setting the focus mode, check focus mode support (
Enumerates the focus modes.
+**System Capabilities:**
+
+SystemCapability.Multimedia.Camera.Core
+
| Name | Default value | Description |
|----------------------------|---------------|----------------------------|
-| FOCUS_MODE_MANUAL | 0 | Focus mode manual
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Focus mode continuous auto
System Capabilities: SystemCapability.Multimedia.Camera.Core|
-| FOCUS_MODE_AUTO | 2 | Focus mode auto
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| FOCUS_MODE_LOCKED | 3 | Focus mode locked
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-
+| 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;
@@ -1484,14 +1149,10 @@ Creates a **CaptureSession** instance. This method uses an asynchronous callback
| context | Context | Yes | Application context |
| callback | AsyncCallback | Yes | Callback used to return the CaptureSession instance |
-**Return values**
-
-none
-
**Example**
```
-captureSession.createCaptureSession(context), (err, captureSession) => {
+captureSession.createCaptureSession((context), (err, captureSession) => {
if (err) {
console.error('Failed to create the CaptureSession instance. ${err.message}');
return;
@@ -1550,10 +1211,6 @@ Starts configuration for this CaptureSession instance. This method uses an async
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1576,10 +1233,6 @@ SystemCapability.Multimedia.Camera.Core
Starts configuration for this CaptureSession instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -1611,10 +1264,6 @@ Commits the configuration for this CaptureSession instance. This method uses an
|----------|---------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1637,10 +1286,6 @@ SystemCapability.Multimedia.Camera.Core
Commits the configuration for this CaptureSession instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -1672,10 +1317,6 @@ Add a CameraInput instance to this CaptureSession instance. This method uses an
| cameraInput | CameraInput | Yes | CameraInput instance to add |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1735,10 +1376,6 @@ Add a PreviewOutput instance to this CaptureSession instance. This method uses a
| previewOutput | PreviewOutput | Yes | PreviewOutput instance to add |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1798,10 +1435,6 @@ Add a PhotoOutput instance to this CaptureSession instance. This method uses an
| photoOutput | PhotoOutput | Yes | PhotoOutput instance to add |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1861,10 +1494,6 @@ Add a VideoOutput instance to this CaptureSession instance. This method uses an
| videoOutput | VideoOutput | Yes | VideoOutput instance to add |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -1924,11 +1553,6 @@ Removes a **CameraInput** instance from this **CaptureSession** instance. This m
| cameraInput | CameraInput | Yes | CameraInput instance to remove |
| callback | AsyncCallback | Yes | Callback used to return the result |
-
-**Return values**
-
-none
-
**Example**
```
@@ -1988,10 +1612,6 @@ Removes a **PreviewOutput** instance from this **CaptureSession** instance. This
| previewOutput | PreviewOutput | Yes | PreviewOutput instance to remove |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2053,10 +1673,6 @@ Removes a **PhotoOutput** instance from this **CaptureSession** instance. This m
| photoOutput | PhotoOutput | Yes | PhotoOutput instance to remove |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2118,10 +1734,6 @@ Removes a **VideoOutput** instance from this **CaptureSession** instance. This m
| videoOutput | VideoOutput | Yes | VideoOutput instance to remove |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2182,10 +1794,6 @@ Starts this **CaptureSession** instance. This method uses an asynchronous callba
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2208,10 +1816,6 @@ SystemCapability.Multimedia.Camera.Core
Starts this **CaptureSession** instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -2243,10 +1847,6 @@ Stops this **CaptureSession** instance. This method uses an asynchronous callbac
|----------|----------------------|-----------|------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2269,10 +1869,6 @@ SystemCapability.Multimedia.Camera.Core
Stops this **CaptureSession** instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -2303,10 +1899,6 @@ Releases this **CaptureSession** instance. This method uses an asynchronous call
|----------|----------------------|-----------|------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2329,10 +1921,6 @@ SystemCapability.Multimedia.Camera.Core
Releases this **CaptureSession** instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -2364,10 +1952,6 @@ Listens for **CaptureSession** errors. This method uses a callback to get errors
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the capture session errors. |
-**Return value**
-
-None
-
**Example**
```
@@ -2393,14 +1977,10 @@ Creates a **PreviewOutput** instance. This method uses an asynchronous callback
| surfaceId | string | Yes | Surface ID received from XComponent view |
| callback | AsyncCallback | Yes | Callback used to return the PreviewOutput instance |
-**Return values**
-
-none
-
**Example**
```
-camera.createPreviewOutput(surfaceId), (err, previewOutput) => {
+camera.createPreviewOutput((surfaceId), (err, previewOutput) => {
if (err) {
console.error('Failed to create the PreviewOutput instance. ${err.message}');
return;
@@ -2459,10 +2039,6 @@ Releases this **PreviewOutput** instance. This method uses an asynchronous callb
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2485,9 +2061,6 @@ SystemCapability.Multimedia.Camera.Core
Releases this **PreviewOutput** instance. This method uses a promise to return the result.
-**Parameters**
-none
-
**Return values**
| Type | Description |
@@ -2520,10 +2093,6 @@ Listens for preview frame start events. This method uses a callback to get the e
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to return the result |
-**Return value**
-
-None
-
**Example**
```
@@ -2549,10 +2118,6 @@ Listens for preview frame end event. This method uses a callback to get the even
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to return the result |
-**Return value**
-
-None
-
**Example**
```
@@ -2578,10 +2143,6 @@ Listens for **PreviewOutput** errors. This method uses a callback to get errors.
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the preview output errors. |
-**Return value**
-
-None
-
**Example**
```
@@ -2607,14 +2168,10 @@ Creates a **PhotoOutput** instance. This method uses an asynchronous callback to
| surfaceId | string | Yes | Surface ID received from ImageReceiver |
| callback | AsyncCallback | Yes | Callback used to return the PhotoOutput instance |
-**Return values**
-
-none
-
**Example**
```
-camera.createPhotoOutput(surfaceId), (err, photoOutput) => {
+camera.createPhotoOutput((surfaceId), (err, photoOutput) => {
if (err) {
console.error('Failed to create the PhotoOutput instance. ${err.message}');
return;
@@ -2656,42 +2213,58 @@ camera.createPhotoOutput(surfaceId).then((photoOutput) => {
Enumerates the image rotation angles.
+**System Capabilities:**
+
+SystemCapability.Multimedia.Camera.Core
+
| Name | Default Value | Description |
|--------------|---------------|----------------------------------------|
-| ROTATION_0 | 0 | The capture image rotates 0 degrees
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| ROTATION_90 | 90 | The capture image rotates 90 degrees
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| ROTATION_180 | 180 | The capture image rotates 180 degrees
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| ROTATION_270 | 270 | The capture image rotates 270 degrees
System Capabilities: SystemCapability.Multimedia.Camera.Core|
+| 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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| longitude | number | read / write | Longitude
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| 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
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| QUALITY_LEVEL_MEDIUM | 1 | Medium image quality
System Capabilities: SystemCapability.Multimedia.Camera.Core |
-| QUALITY_LEVEL_LOW | 2 | Low image quality
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| 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
System Capabilities: SystemCapability.Multimedia.Camera.Core|
-| rotation | ImageRotation | Optional | Photo rotation
System Capabilities: SystemCapability.Multimedia.Camera.Core |
+| quality | QualityLevel | Optional | Photo image quality |
+| rotation | ImageRotation | Optional | Photo rotation |
## PhotoOutput
@@ -2714,10 +2287,6 @@ Captures a photo. This method uses an asynchronous callback to return the result
|----------|---------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2747,10 +2316,6 @@ Captures a photo with the specified capture settings. This method uses an asynch
| setting | PhotoCaptureSetting | Yes | Photo capture settings |
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2810,10 +2375,6 @@ Releases this **PhotoOutput** instance. This method uses an asynchronous callbac
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -2836,9 +2397,6 @@ SystemCapability.Multimedia.Camera.Core
Releases this **PhotoOutput** instance. This method uses a promise to return the result.
-**Parameters**
-none
-
**Return values**
| Type | Description |
@@ -2871,10 +2429,6 @@ Listens for photo capture start events. This method uses a callback to get the e
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the capture ID. |
-**Return value**
-
-None
-
**Example**
```
@@ -2900,10 +2454,6 @@ Listens for frame shutter events. This method uses a callback to get the event i
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the frame shutter information.|
-**Return value**
-
-None
-
**Example**
```
@@ -2930,10 +2480,6 @@ Listens for photo capture end events. This method uses a callback to get the eve
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the capture end information |
-**Return value**
-
-None
-
**Example**
```
@@ -2960,10 +2506,6 @@ Listens for **PhotoOutput** errors. This method uses a callback to get errors.
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the photo output errors. |
-**Return value**
-
-None
-
**Example**
```
@@ -2989,14 +2531,10 @@ Creates a **VideoOutput** instance. This method uses an asynchronous callback to
| surfaceId | string | Yes | Surface ID received from VideoRecorder |
| callback | AsyncCallback | Yes | Callback used to return the VideoOutput instance |
-**Return values**
-
-none
-
**Example**
```
-camera.createVideoOutput(surfaceId), (err, videoOutput) => {
+camera.createVideoOutput((surfaceId), (err, videoOutput) => {
if (err) {
console.error('Failed to create the VideoOutput instance. ${err.message}');
return;
@@ -3054,10 +2592,6 @@ Starts the video output. This method uses an asynchronous callback to return the
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -3080,9 +2614,6 @@ SystemCapability.Multimedia.Camera.Core
Starts the video output. This method uses a promise to return the result.
-**Parameters**
-none
-
**Return values**
| Type | Description |
@@ -3114,10 +2645,6 @@ Stops the video output. This method uses an asynchronous callback to return the
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -3140,9 +2667,6 @@ SystemCapability.Multimedia.Camera.Core
Stops the video output. This method uses a promise to return the result.
-**Parameters**
-none
-
**Return values**
| Type | Description |
@@ -3173,10 +2697,6 @@ Releases this VideoOutput instance. This method uses an asynchronous callback to
|----------|----------------------|-----------|----------------------------------------------|
| callback | AsyncCallback | Yes | Callback used to return the result |
-**Return values**
-
-none
-
**Example**
```
@@ -3199,10 +2719,6 @@ SystemCapability.Multimedia.Camera.Core
Releases this VideoOutput instance. This method uses a promise to return the result.
-**Parameters**
-
-none
-
**Return values**
| Type | Description |
@@ -3235,10 +2751,6 @@ Listens for video frame start events. This method uses a callback to get the eve
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to return the result |
-**Return value**
-
-None
-
**Example**
```
@@ -3258,10 +2770,6 @@ Listens for video frame end events. This method uses a callback to get the event
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to return the result |
-**Return value**
-
-None
-
**Example**
```
@@ -3281,10 +2789,6 @@ Listens for **VideoOutput** errors. This method uses a callback to get errors.
| type | string | Yes | Name of the event to listen for. |
| callback | Callback | Yes | Callback used to get the video output errors. |
-**Return value**
-
-None
-
**Example**
```
diff --git a/en/application-dev/reference/apis/js-apis-hitracechain.md b/en/application-dev/reference/apis/js-apis-hitracechain.md
index 2ad97f096f7abedaa6e8dceb06678d564c287802..b5af74e563915592773475c7a2409f1bbe682690 100644
--- a/en/application-dev/reference/apis/js-apis-hitracechain.md
+++ b/en/application-dev/reference/apis/js-apis-hitracechain.md
@@ -9,57 +9,62 @@
import hiTraceChain from '@ohos.hiTraceChain';
```
-## System Capabilities
-
-SystemCapability.HiviewDFX.HiTrace
## HiTraceFlag
Enumerates trace flag types.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
| Name| Default Value| Description|
| -------- | -------- | -------- |
-| DEFAULT | 0 | Default flag|
-| INCLUDE_ASYNC | 1 | Asynchronous call flag|
-| DONOT_CREATE_SPAN | 1 << 1 | No span flag|
-| TP_INFO | 1 << 2 | Trace point flag|
-| NO_BE_INFO | 1 << 3 | No begin/end flag|
-| DISABLE_LOG | 1 << 4 | Log association flag|
-| FAILURE_TRIGGER | 1 << 5 | Failure trigger flag|
-| D2D_TP_INFO | 1 << 6 | Device-to-device trace point flag|
+| DEFAULT | 0 | Default flag. |
+| INCLUDE_ASYNC | 1 | Asynchronous call flag. By default, only synchronous calls are traced. If this flag is set, both synchronous and asynchronous calls will be traced. |
+| DONOT_CREATE_SPAN | 1 << 1 | No span flag. By default, a span is automatically created during tracing of synchronous and asynchronous calls. If this flag is set, no span will be created. |
+| TP_INFO | 1 << 2 | Trace point flag. By default, no trace point is added when tracing is enabled. This flag is used for debugging. If this flag is set, trace points will be automatically added on the TX and RX sides of synchronous and asynchronous calls to output trace point and timestamp information. Trace points are classified into four types: [CS, SR, SS, and CR](#hitracetracepointtype). For a synchronous call, the output trace points are CS, SR, SS, and CR; for an asynchronous call, the output trace points are CS, SR, and SS. |
+| NO_BE_INFO | 1 << 3 | No begin/end flag. By default, information about the start and end of the trace task is printed. If this flag is set, information about the start and end of the trace task will not be printed.|
+| DISABLE_LOG | 1 << 4 | Log association flag. If this flag is set, information about the trace task will not be printed. |
+| FAILURE_TRIGGER | 1 << 5 | Failure trigger flag. This flag is reserved for future use. |
+| D2D_TP_INFO | 1 << 6 | Device-to-device trace point flag. It is a subset of **TP_INFO**. If this flag is set, trace points are added only for call chain tracing between devices.|
## HiTraceTracepointType
Enumerates trace point types.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
| Name| Default Value| Description|
| -------- | -------- | -------- |
-| CS | 0 | Client Send|
-| CR | 1 | Client Receive|
-| SS | 2 | Server Send|
-| SR | 3 | Server Receive|
-| GENERAL | 4 | General|
+| CS | 0 | Client Send (CS) trace point. |
+| CR | 1 | Client Receive (CS) trace point. |
+| SS | 2 | Server Send (SS) trace point. |
+| SR | 3 | Server Receive (SR) trace point. |
+| GENERAL | 4 | General trace points except CS, CR, SS, and SR.|
## HiTraceCommunicationMode
Enumerates communication modes.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
| Name| Default Value| Description|
| -------- | -------- | -------- |
-| DEFAULT | 0 | Default mode|
-| THREAD | 1 | Inter-thread communication|
-| PROCESS | 2 | Inter-process communication|
-| DEVICE | 3 | Inter-device communication|
+| DEFAULT | 0 | Default communication mode. |
+| THREAD | 1 | Inter-thread communication. |
+| PROCESS | 2 | Inter-process communication. |
+| DEVICE | 3 | Inter-device communication. |
## HiTraceId
Defines a **HiTraceId** object.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
-| chainId | bigint | Yes| Call chain ID.|
-| spanId | number | No| Span ID.|
-| parentSpanId | number | No| Parent span ID.|
+| chainId | bigint | Yes| Call chain ID. |
+| spanId | number | No| Span ID. |
+| parentSpanId | number | No| Parent span ID. |
| flags | number | No| Trace flag combination.|
## hiTraceChain.begin
@@ -68,6 +73,8 @@ begin(name: string, flags: number = HiTraceFlag.DEFAULT): HiTraceId
Starts call chain tracing. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -93,6 +100,8 @@ end(id: HiTraceId): void
Stops call chain tracing. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -113,6 +122,8 @@ getId(): HiTraceId
Obtains the trace ID. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Return value**
| Type| Description|
@@ -133,6 +144,8 @@ setId(id: HiTraceId): void
Sets a trace ID. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -153,6 +166,8 @@ clearId(): void
Clears the trace ID. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Example**
```
@@ -167,6 +182,8 @@ createSpan(): HiTraceId
Creates a trace span. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Return value**
| Type| Description|
@@ -187,6 +204,8 @@ tracepoint(mode: HiTraceCommunicationMode, type: HiTraceTracepointType, id: HiTr
Triggers a trace point. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -210,6 +229,8 @@ isValid(id: HiTraceId): boolean
Checks whether a **HiTraceId** instance is valid. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -235,6 +256,8 @@ isFlagEnabled(id: HiTraceId, flag: HiTraceFlag): boolean
Checks whether the specified trace flag in the **HiTraceId** instance is enabled. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
@@ -262,6 +285,8 @@ enableFlag(id: HiTraceId, flag: HiTraceFlag): void
Enables the specified trace flag in the **HiTraceId** instance. This API works in synchronous manner.
+**System capability**: SystemCapability.HiviewDFX.HiTrace
+
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
diff --git a/en/application-dev/reference/apis/js-apis-http.md b/en/application-dev/reference/apis/js-apis-http.md
index 3956505f311775d34c41c3e98b41b8d7ab882243..b3986832237d649e34dff9ed546378504fa9db78 100644
--- a/en/application-dev/reference/apis/js-apis-http.md
+++ b/en/application-dev/reference/apis/js-apis-http.md
@@ -37,8 +37,8 @@ httpRequest.request(
extraData: {
"data": "data to send",
},
- connectTimeout: 60000, // Optional. The default value is **60000**, in ms.
- readTimeout: 60000, // Optional. The default value is **60000**, in ms.
+ connectTimeout: 60000, // Optional. The default value is 60000, in ms.
+ readTimeout: 60000, // Optional. The default value is 60000, in ms.
},(err, data) => {
if (!err) {
// data.result contains the HTTP response. It is up to you whether to parse the content.
@@ -60,7 +60,7 @@ httpRequest.request(
createHttp\(\): HttpRequest
-Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An HttpRequest object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an HttpRequest object for each HTTP request.
+Creates an HTTP request. You can use this API to initiate or destroy an HTTP request, or enable or disable listening for HTTP Response Header events. An HttpRequest object corresponds to an HTTP request. To initiate multiple HTTP requests, you must create an **HttpRequest** object for each HTTP request.
**System capability**: SystemCapability.Communication.NetStack
@@ -68,7 +68,7 @@ Creates an HTTP request. You can use this API to initiate or destroy an HTTP req
| Type | Description |
| :---------- | :----------------------------------------------------------- |
-| HttpRequest | An **HttpRequest **object, which contains the **request**, **destroy**, **on**, or **off** method.|
+| HttpRequest | An **HttpRequest** object, which contains the **request**, **destroy**, **on**, or **off** method.|
**Example**
@@ -137,25 +137,25 @@ Initiates an HTTP request containing specified options to a given URL. This API
```
httpRequest.request("EXAMPLE_URL",
{
- method: 'GET',
- header: {
- 'Content-Type': 'application/json'
- },
- readTimeout: 60000,
- connectTimeout: 60000
-},(err, data) => {
- if (!err) {
- console.info('Result:' + data.result);
- console.info('code:' + data.responseCode);
- console.info('header:' + data.header);
- console.info('cookies:' + data.cookies); // 8+
- console.info('header['Content-Type']:' + data.header['Content-Type']);
- console.info('header['Status-Line']:' + data.header['Status-Line']);
- console.info('header.Date:' + data.header.Date);
- console.info('header.Server:' + data.header.Server);
- } else {
- console.info('error:' + err.data);
- }
+ method: 'GET',
+ header: {
+ 'Content-Type': 'application/json'
+ },
+ readTimeout: 60000,
+ connectTimeout: 60000
+}, (err, data) => {
+ if (!err) {
+ console.info('Result:' + data.result);
+ console.info('code:' + data.responseCode);
+ console.info('header:' + data.header);
+ console.info('cookies:' + data.cookies); // 8+
+ console.info('header.Content-Type:' + data.header['Content-Type']);
+ console.info('header.Status-Line:' + data.header['Status-Line']);
+ console.info('header.Date:' + data.header.Date);
+ console.info('header.Server:' + data.header.Server);
+ } else {
+ console.info('error:' + err.data);
+ }
});
```
@@ -188,24 +188,24 @@ Initiates an HTTP request to a given URL. This API uses a promise to return the
```
let promise = httpRequest.request("EXAMPLE_URL", {
- method: "GET",
- connectTimeout: 60000,
- readTimeout: 60000,
- header: {
- 'Content-Type': 'application/json'
- }
+ method: "GET",
+ connectTimeout: 60000,
+ readTimeout: 60000,
+ header: {
+ 'Content-Type': 'application/json'
+ }
});
promise.then((value) => {
- console.info('Result:' + value.result);
- console.info('code:' + value.responseCode);
- console.info('header:' + value.header);
- console.info('cookies:' + value.cookies); // 8+
- console.info('header['Content-Type']:' + value.header['Content-Type']);
- console.info('header['Status-Line']:' + value.header['Status-Line']);
- console.info('header.Date:' + value.header.Date);
- console.info('header.Server:' + value.header.Server);
+ console.info('Result:' + value.result);
+ console.info('code:' + value.responseCode);
+ console.info('header:' + value.header);
+ console.info('cookies:' + value.cookies); // 8+
+ console.info('header.Content-Type:' + value.header['Content-Type']);
+ console.info('header.Status-Line:' + value.header['Status-Line']);
+ console.info('header.Date:' + value.header.Date);
+ console.info('header.Server:' + value.header.Server);
}).catch((err) => {
- console.error(`errCode:${err.code}, errMessage:${err.data}`);
+ console.error(`errCode:${err.code}, errMessage:${err.data}`);
});
```
@@ -246,9 +246,9 @@ Registers an observer for HTTP Response Header events.
```
httpRequest.on('headerReceive', (err, data) => {
if (!err) {
- console.info('header: ' + data.header);
+ console.info('header: ' + data.header);
} else {
- console.info('error:' + err.data);
+ console.info('error:' + err.data);
}
});
```
@@ -280,9 +280,9 @@ Unregisters the observer for HTTP Response Header events.
```
httpRequest.on('headerReceive', (err, data) => {
if (!err) {
- console.info('header: ' + data.header);
+ console.info('header: ' + data.header);
} else {
- console.info('error:' + err.data);
+ console.info('error:' + err.data);
}
});
httpRequest.off('headerReceive');
diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md
index 918757324c65226f33047966940bcfbf3723779c..71be88dd94b4df3b95365068394e353c3acda12f 100644
--- a/en/application-dev/reference/apis/js-apis-media.md
+++ b/en/application-dev/reference/apis/js-apis-media.md
@@ -10,7 +10,7 @@ This subsystem offers various media services covering audio and video, which pro
- Audio playback ([AudioPlayer](#audioplayer))
- Video playback ([VideoPlayer](#videoplayer8))
- Audio recording ([AudioRecorder](#audiorecorder))
-- Video recording ([VideoRecorder](#VideoRecorder8+))
+- Video recording ([VideoRecorder](#videoRecorder9))
The following capabilities will be provided in later versions: data source audio/video playback, audio/video encoding and decoding, container encapsulation and decapsulation, and media capability query.
@@ -125,9 +125,9 @@ Creates an **AudioRecorder** instance to control audio recording.
let audiorecorder = media.createAudioRecorder();
```
-## media.createVideoRecorder8+
+## media.createVideoRecorder9+
-createVideoRecorder(callback: AsyncCallback\<[VideoRecorder](#videorecorder8)>): void
+createVideoRecorder(callback: AsyncCallback\<[VideoRecorder](#videorecorder9)>): void
Creates a **VideoRecorder** instance in asynchronous mode. This API uses a callback to return the result.
@@ -137,7 +137,7 @@ Creates a **VideoRecorder** instance in asynchronous mode. This API uses a callb
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------- | ---- | ------------------------------ |
-| callback | AsyncCallback<[VideoRecorder](#videorecorder8)> | Yes | Callback used to return the **VideoRecorder** instance created.|
+| callback | AsyncCallback<[VideoRecorder](#videorecorder9)> | Yes | Callback used to return the **VideoRecorder** instance created.|
**Example**
@@ -154,9 +154,9 @@ media.createVideoRecorder((error, video) => {
});
```
-## media.createVideoRecorder8+
+## media.createVideoRecorder9+
-createVideoRecorder(): Promise<[VideoRecorder](#videorecorder8)>
+createVideoRecorder(): Promise<[VideoRecorder](#videorecorder9)>
Creates a **VideoRecorder** instance in asynchronous mode. This API uses a promise to return the result.
@@ -166,7 +166,7 @@ Creates a **VideoRecorder** instance in asynchronous mode. This API uses a promi
| Type | Description |
| ----------------------------------------- | ----------------------------------- |
-| Promise<[VideoRecorder](#videorecorder8)> | Promise used to return the **VideoRecorder** instance created.|
+| Promise<[VideoRecorder](#videorecorder9)> | Promise used to return the **VideoRecorder** instance created.|
**Example**
@@ -228,16 +228,16 @@ Enumerates the codec MIME types.
**System capability**: SystemCapability.Multimedia.Media.Core
-| Name | Value | Description |
-| ------------ | --------------------- | ------------------------------------------------------------ |
-| VIDEO_H263 | 'video/h263' | Video in H.263 format.|
-| VIDEO_AVC | 'video/avc' | Video in AVC format.|
-| VIDEO_MPEG2 | 'video/mpeg2' | Video in MPEG-2 format.|
-| VIDEO_MPEG4 | 'video/mp4v-es' | Video in MPEG-4 format.|
-| VIDEO_VP8 | 'video/x-vnd.on2.vp8' | Video in VP8 format.|
+| Name | Value | Description |
+| ------------ | --------------------- | ------------------------ |
+| VIDEO_H263 | 'video/h263' | Video in H.263 format. |
+| VIDEO_AVC | 'video/avc' | Video in AVC format. |
+| VIDEO_MPEG2 | 'video/mpeg2' | Video in MPEG-2 format. |
+| VIDEO_MPEG4 | 'video/mp4v-es' | Video in MPEG-4 format. |
+| VIDEO_VP8 | 'video/x-vnd.on2.vp8' | Video in VP8 format. |
| AUDIO_AAC | "audio/mp4a-latm" | Audio in MP4A-LATM format.|
-| AUDIO_VORBIS | 'audio/vorbis' | Audio in Vorbis format.|
-| AUDIO_FLAC | 'audio/flac' | Audio in FLAC format.|
+| AUDIO_VORBIS | 'audio/vorbis' | Audio in Vorbis format. |
+| AUDIO_FLAC | 'audio/flac' | Audio in FLAC format. |
## MediaDescriptionKey8+
@@ -273,7 +273,7 @@ Enumerates the buffering event types.
## AudioPlayer
-Provides methods to manage and play audio. Before calling a method of **AudioPlayer**, you must use [createAudioPlayer()](#mediacreateaudioplayer) to create an **AudioPlayer** instance.
+Provides APIs to manage and play audio. Before calling an API of **AudioPlayer**, you must use [createAudioPlayer()](#mediacreateaudioplayer) to create an **AudioPlayer** instance.
For details about the audio playback demo, see [Audio Playback Development](../../media/audio-playback.md).
@@ -283,7 +283,7 @@ For details about the audio playback demo, see [Audio Playback Development](../.
| Name | Type | Readable| Writable| Description |
| ----------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
-| src | string | Yes | Yes | Audio media URI. The mainstream audio formats (MPEG-4, AAC, MPEG-3, OGG, and WAV) are supported.
**Example of supported URIs**:
1. FD playback: fd://xx

2. HTTP network playback: http://xx
3. HLS network playback path (under development)
**Note**:
To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
+| src | string | Yes | Yes | Audio media URI. The mainstream audio formats (MPEG-4, AAC, MPEG-3, OGG, and WAV) are supported.
**Example of supported URIs**:
1. FD playback: fd://xx

2. HTTP network playback: http://xx
3. HLS network playback path (under development)
**Note**:
To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
| loop | boolean | Yes | Yes | Whether to loop audio playback. The value **true** means to loop audio playback, and **false** means the opposite. |
| currentTime | number | Yes | No | Current audio playback position. |
| duration | number | Yes | No | Audio duration. |
@@ -293,7 +293,7 @@ For details about the audio playback demo, see [Audio Playback Development](../.
play(): void
-Starts to play audio resources. This method can be called only after the [dataLoad](#on('play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange')) event is triggered.
+Starts to play audio resources. This API can be called only after the [dataLoad](#audioplayer_on) event is triggered.
**System capability**: SystemCapability.Multimedia.Media.AudioPlayer
@@ -424,7 +424,7 @@ audioPlayer = undefined;
### getTrackDescription8+
-getTrackDescription(callback: AsyncCallback>): void
+getTrackDescription(callback: AsyncCallback>): void
Obtains the audio track information. This API uses a callback to return the result.
@@ -460,7 +460,7 @@ audioPlayer.getTrackDescription((error, arrlist) => {
### getTrackDescription8+
-getTrackDescription(): Promise>
+getTrackDescription(): Promise>
Obtains the audio track information. This API uses a promise to return the result.
@@ -511,10 +511,10 @@ Subscribes to the audio buffering update event.
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'bufferingUpdate' in this example. |
-| callback | (infoType: [BufferingInfoType](#bufferinginfotype8), value: number) => void | Yes | Callback invoked when the event is triggered.
When [BufferingInfoType](#bufferinginfotype8) is set to **BUFFERING_PERCENT** or **CACHED_DURATION**, **value** is valid. Otherwise, **value** is fixed at **0**.|
+| Name | Type | Mandatory| Description |
+| -------- | -------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of the event to subscribe to, which is 'bufferingUpdate' in this example. |
+| callback | function | Yes | Callback invoked when the event is triggered.
When [BufferingInfoType](#bufferinginfotype8) is set to **BUFFERING_PERCENT** or **CACHED_DURATION**, **value** is valid. Otherwise, **value** is fixed at **0**.|
**Example**
@@ -525,7 +525,7 @@ audioPlayer.on('bufferingUpdate', (infoType, value) => {
});
```
- ### on('play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange')
+ ### on('play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange')
on(type: 'play' | 'pause' | 'stop' | 'reset' | 'dataLoad' | 'finish' | 'volumeChange', callback: () => void): void
@@ -537,7 +537,7 @@ Subscribes to the audio playback events.
| Name | Type | Mandatory| Description |
| -------- | ---------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to. The following events are supported: 'play' \| 'pause' \| 'stop' \| 'reset' \| 'dataLoad' \| 'finish' \| 'volumeChange'
- The 'play' event is triggered when the [play()](#play) method is called and audio playback starts.
- The 'pause' event is triggered when the [pause()](#pause) method is called and audio playback is paused.
- The 'stop' event is triggered when the [stop()](#stop) method is called and audio playback stops.
- The 'reset' event is triggered when the [reset()](#reset7) method is called and audio playback is reset.
- The 'dataLoad' event is triggered when the audio data is loaded, that is, when the **src** attribute is configured.
- The 'finish' event is triggered when the audio playback is finished.
- The 'volumeChange' event is triggered when the [setVolume()](#setvolume) method is called and the playback volume is changed.|
+| type | string | Yes | Type of the event to subscribe to. The following events are supported: 'play' \| 'pause' \| 'stop' \| 'reset' \| 'dataLoad' \| 'finish' \| 'volumeChange'
- The 'play' event is triggered when the [play()](#audioplayer_play) API is called and audio playback starts.
- The 'pause' event is triggered when the [pause()](#audioplayer_pause) API is called and audio playback is paused.
- The 'stop' event is triggered when the [stop()](#audioplayer_stop) API is called and audio playback stops.
- The 'reset' event is triggered when the [reset()](#audioplayer_reset) API is called and audio playback is reset.
- The 'dataLoad' event is triggered when the audio data is loaded, that is, when the **src** attribute is configured.
- The 'finish' event is triggered when the audio playback is finished.
- The 'volumeChange' event is triggered when the [setVolume()](#audioplayer_setvolume) API is called and the playback volume is changed.|
| callback | () => void | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -550,7 +550,7 @@ audioPlayer.on('dataLoad', () => { // Set the 'dataLoad' event callba
});
audioPlayer.on('play', () => { // Set the 'play' event callback.
console.info('audio play success');
- audioPlayer.seek(30000); // Call the seek() method and trigger the 'timeUpdate' event callback.
+ audioPlayer.seek(30000); // Call the seek() API and trigger the 'timeUpdate' event callback.
});
audioPlayer.on('pause', () => { // Set the 'pause' event callback.
console.info('audio pause success');
@@ -609,7 +609,7 @@ Subscribes to the 'timeUpdate' event.
| Name | Type | Mandatory| Description |
| -------- | ----------------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'timeUpdate' in this method.
The 'timeUpdate' event is triggered when the [seek()](#seek) method is called.|
+| type | string | Yes | Type of the event to subscribe to, which is 'timeUpdate' in this API.
The 'timeUpdate' event is triggered when the [seek()](#audioplayer_seek) API is called.|
| callback | Callback\ | Yes | Callback invoked when the event is triggered. The input parameter of the callback is the time when the seek operation is successful. |
**Example**
@@ -637,7 +637,7 @@ Subscribes to the audio playback error event.
| Name | Type | Mandatory| Description |
| -------- | ------------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'error' in this method.
The 'error' event is triggered when an error occurs during audio playback.|
+| 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 audio playback.|
| callback | ErrorCallback | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -667,7 +667,7 @@ Enumerates the audio playback states. You can obtain the state through the **sta
## VideoPlayer8+
-Provides methods to manage and play video. Before calling a method of the **VideoPlayer** class, you must call [createVideoPlayer()](#media.createvideoplayer8) to create a [VideoPlayer](#videoplayer8) instance.
+Provides APIs to manage and play video. Before calling an API of the **VideoPlayer** class, you must call [createVideoPlayer()](#mediacreatevideoplayer8) to create a [VideoPlayer](#videoplayer8) instance.
For details about the video playback demo, see [Video Playback Development](../../media/video-playback.md).
@@ -677,7 +677,7 @@ For details about the video playback demo, see [Video Playback Development](../.
| Name | Type | Readable| Writable| Description |
| ------------------------ | ---------------------------------- | ---- | ---- | ------------------------------------------------------------ |
-| url8+ | string | Yes | Yes | Video media URL. The mainstream video formats (MPEG-4, MPEG-TS, WebM, and MKV) are supported.
**Example of supported URIs**:
1. FD playback: fd://xx

2. HTTP network playback: http://xx
3. HLS network playback path (under development)
**Note**:
To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
+| url8+ | string | Yes | Yes | Video media URL. The mainstream video formats (MPEG-4, MPEG-TS, WebM, and MKV) are supported.
**Example of supported URIs**:
1. FD playback: fd://xx

2. HTTP network playback: http://xx
3. HLS network playback path (under development)
**Note**:
To use media materials, you must declare the read permission. Otherwise, the media materials cannot be played properly.|
| loop8+ | boolean | Yes | Yes | Whether to loop video playback. The value **true** means to loop video playback, and **false** means the opposite. |
| currentTime8+ | number | Yes | No | Current video playback position. |
| duration8+ | number | Yes | No | Video duration. The value **-1** indicates the live streaming mode. |
@@ -1053,11 +1053,11 @@ Seeks to the specified playback position. This API uses a callback to return the
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | ---------------------------------------- |
-| timeMs | number | Yes | Position to seek to, in milliseconds. |
-| mode | SeekMode | Yes | Seek mode. For details, see [SeekMode](#seekmode8).|
-| callback | function | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------- | ---- | ------------------------------ |
+| timeMs | number | Yes | Position to seek to, in milliseconds.|
+| mode | [SeekMode](#seekmode8) | Yes | Seek mode. |
+| callback | function | Yes | Callback used to return the result.|
**Example**
@@ -1081,10 +1081,10 @@ Seeks to the specified playback position. If **mode** is not specified, the next
**Parameters**
-| Name| Type | Mandatory| Description |
-| ------ | -------- | ---- | -------------------------------------- |
-| timeMs | number | Yes | Position to seek to, in milliseconds. |
-| mode | SeekMode | No | Seek mode. For details, see [SeekMode](#seekmode8).|
+| Name| Type | Mandatory| Description |
+| ------ | ---------------------- | ---- | ------------------------------ |
+| timeMs | number | Yes | Position to seek to, in milliseconds.|
+| mode | [SeekMode](#seekmode8) | No | Seek mode. |
**Return value**
@@ -1227,7 +1227,7 @@ await videoPlayer.release().then() => {
### getTrackDescription8+
-getTrackDescription(callback: AsyncCallback>): void
+getTrackDescription(callback: AsyncCallback>): void
Obtains the video track information. This API uses a callback to return the result.
@@ -1235,9 +1235,9 @@ Obtains the video track information. This API uses a callback to return the resu
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | -------------------------- |
-| callback | function | Yes | Callback used to return the video track information obtained.|
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | -------------------------- |
+| callback | AsyncCallback> | Yes | Callback used to return the video track information obtained.|
**Example**
@@ -1263,7 +1263,7 @@ videoPlayer.getTrackDescription((error, arrlist) => {
### getTrackDescription8+
-getTrackDescription(): Promise>
+getTrackDescription(): Promise>
Obtains the video track information. This API uses a promise to return the result.
@@ -1346,6 +1346,12 @@ Sets the video playback speed. This API uses a promise to return the result.
| ------ | ------ | ---- | ---------------------------------------------------------- |
| speed | number | Yes | Video playback speed. For details, see [PlaybackSpeed](#playbackspeed8).|
+**Return value**
+
+| Type | Description |
+| ---------------- | ------------------------- |
+| Promise\ | Promise used to return the result.|
+
**Example**
```js
@@ -1417,10 +1423,10 @@ Subscribes to the frame rendering start event.
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'startRenderFrame' in this example.|
-| callback | function | Yes | Callback invoked when the event is triggered. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of the event to subscribe to, which is 'startRenderFrame' in this example.|
+| callback | Callback\ | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -1464,10 +1470,10 @@ Subscribes to the video playback error event.
**Parameters**
-| Name | Type | Mandatory| Description |
-| -------- | -------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'error' in this method.
The 'error' event is triggered when an error occurs during video playback.|
-| callback | function | Yes | Callback invoked when the event is triggered. |
+| 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 playback.|
+| callback | ErrorCallback | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -1497,7 +1503,7 @@ Enumerates the video playback states. You can obtain the state through the **sta
## SeekMode8+
-Enumerates the video playback seek modes, which can be passed in the **seek** method.
+Enumerates the video playback seek modes, which can be passed in the **seek** API.
**System capability**: SystemCapability.Multimedia.Media.Core
@@ -1508,7 +1514,7 @@ Enumerates the video playback seek modes, which can be passed in the **seek** me
## PlaybackSpeed8+
-Enumerates the video playback speeds, which can be passed in the **setSpeed** method.
+Enumerates the video playback speeds, which can be passed in the **setSpeed** API.
**System capability**: SystemCapability.Multimedia.Media.VideoPlayer
@@ -1555,7 +1561,7 @@ audioPlayer.getTrackDescription((error, arrlist) => {
## AudioRecorder
-Implements audio recording. Before calling a method of the **AudioRecorder** class, you must call [createAudioRecorder()](#media.createaudiorecorder) to create an [AudioRecorder](#audiorecorder) instance.
+Implements audio recording. Before calling an API of the **AudioRecorder** class, you must call [createAudioRecorder()](#mediacreateaudiorecorder) to create an [AudioRecorder](#audiorecorder) instance.
For details about the audio recording demo, see [Audio Recording Development](../../media/audio-recorder.md).
@@ -1598,7 +1604,7 @@ audioRecorder.prepare(audioRecorderConfig);
start(): void
-Starts audio recording. This method can be called only after the [prepare](#audiorecorder_on) event is triggered.
+Starts audio recording. This API can be called only after the [prepare](#audiorecorder_on) event is triggered.
**System capability**: SystemCapability.Multimedia.Media.AudioRecorder
@@ -1615,7 +1621,7 @@ audioRecorder.start();
pause():void
-Pauses audio recording. This method can be called only after the [start](#audiorecorder_on) event is triggered.
+Pauses audio recording. This API can be called only after the [start](#audiorecorder_on) event is triggered.
**System capability**: SystemCapability.Multimedia.Media.AudioRecorder
@@ -1632,7 +1638,7 @@ audioRecorder.pause();
resume():void
-Resumes audio recording. This method can be called only after the [pause](#audiorecorder_on) event is triggered.
+Resumes audio recording. This API can be called only after the [pause](#audiorecorder_on) event is triggered.
**System capability**: SystemCapability.Multimedia.Media.AudioRecorder
@@ -1711,7 +1717,7 @@ Subscribes to the audio recording events.
| Name | Type | Mandatory| Description |
| -------- | -------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to. The following events are supported: 'prepare'\|'start'\| 'pause' \| 'resume' \|'stop'\|'release'\|'reset'
- The 'prepare' event is triggered when the [prepare](#audiorecorder_prepare) method is called and the audio recording parameters are set.
- The 'start' event is triggered when the [start](#audiorecorder_start) method is called and audio recording starts.
- The 'pause' event is triggered when the [pause](#audiorecorder_pause) method is called and audio recording is paused.
- The 'resume' event is triggered when the [resume](#audiorecorder_resume) method is called and audio recording is resumed.
- The 'stop' event is triggered when the [stop](#audiorecorder_stop) method is called and audio recording stops.
- The 'release' event is triggered when the [release](#audiorecorder_release) method is called and the recording resource is released.
- The 'reset' event is triggered when the [reset](#audiorecorder_reset) method is called and audio recording is reset.|
+| type | string | Yes | Type of the event to subscribe to. The following events are supported: 'prepare'\|'start'\| 'pause' \| 'resume' \|'stop'\|'release'\|'reset'
- The 'prepare' event is triggered when the [prepare](#audiorecorder_prepare) API is called and the audio recording parameters are set.
- The 'start' event is triggered when the [start](#audiorecorder_start) API is called and audio recording starts.
- The 'pause' event is triggered when the [pause](#audiorecorder_pause) API is called and audio recording is paused.
- The 'resume' event is triggered when the [resume](#audiorecorder_resume) API is called and audio recording is resumed.
- The 'stop' event is triggered when the [stop](#audiorecorder_stop) API is called and audio recording stops.
- The 'release' event is triggered when the [release](#audiorecorder_release) API is called and the recording resource is released.
- The 'reset' event is triggered when the [reset](#audiorecorder_reset) API is called and audio recording is reset.|
| callback | ()=>void | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -1769,7 +1775,7 @@ Subscribes to the audio recording error event.
| Name | Type | Mandatory| Description |
| -------- | ------------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'error' in this method.
The 'error' event is triggered when an error occurs during audio recording.|
+| 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 audio recording.|
| callback | ErrorCallback | Yes | Callback invoked when the event is triggered. |
**Example**
@@ -1796,9 +1802,9 @@ Describes audio recording configurations.
| audioSampleRate | number | No | Audio sampling rate. The default value is **48000**. |
| numberOfChannels | number | No | Number of audio channels. The default value is **2**. |
| format | [AudioOutputFormat](#audiooutputformat) | No | Audio output format. The default value is **MPEG_4**. |
-| location8+ | [Location](#location8) | No | Geographical location of the recorded audio. |
+| location | [Location](#location) | No | Geographical location of the recorded audio. |
| uri | string | Yes | Audio output URI. Supported: fd://xx (fd number)

The file must be created by the caller and granted with proper permissions.|
-| audioEncoderMime | [CodecMimeType](#CodecMimeType8) | No | Audio encoding format.|
+| audioEncoderMime | [CodecMimeType](#codecmimetype8) | No | Audio encoding format. |
## AudioEncoder
@@ -1830,25 +1836,27 @@ 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.|
-## VideoRecorder8+
+## VideoRecorder9+
-Implements video recording. Before calling a method of the **VideoRecorder** class, you must call [createVideoRecorder()](#media.createvideorecorder8) to create a [VideoRecorder](#videorecorder8) instance.
+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
-| Name | Type | Readable| Writable| Description |
-| ------------------ | ------------------------------------- | ---- | ---- | ---------------- |
-| state8+ | [VideoRecordState](#videorecordstate) | Yes | No | Video recording state.|
+**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
+
+| Name | Type | Readable| Writable| Description |
+| ------------------ | -------------------------------------- | ---- | ---- | ---------------- |
+| state8+ | [VideoRecordState](#videorecordstate9) | Yes | No | Video recording state.|
-### prepare8+
+### 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 ohos.permission.CAMERA
+**Required permissions:** ohos.permission.MICROPHONE and ohos.permission.CAMERA
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
@@ -1856,7 +1864,7 @@ Sets video recording parameters in asynchronous mode. This API uses a callback t
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------------- | ---- | ----------------------------------- |
-| config | [VideoRecorderConfig](#videorecorderconfig8) | Yes | Video recording parameters to set. |
+| config | [VideoRecorderConfig](#videorecorderconfig9) | Yes | Video recording parameters to set. |
| callback | AsyncCallback\ | Yes | Callback used to return the result.|
**Example**
@@ -1910,13 +1918,13 @@ media.createVideoRecorder((err, recorder) => {
});
```
-### prepare8+
+### 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 ohos.permission.CAMERA
+**Required permissions:** ohos.permission.MICROPHONE and ohos.permission.CAMERA
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
@@ -1924,7 +1932,7 @@ Sets video recording parameters in asynchronous mode. This API uses a promise to
| Name| Type | Mandatory| Description |
| ------ | -------------------------------------------- | ---- | ------------------------ |
-| config | [VideoRecorderConfig](#videorecorderconfig8) | Yes | Video recording parameters to set.|
+| config | [VideoRecorderConfig](#videorecorderconfig9) | Yes | Video recording parameters to set.|
**Return value**
@@ -1981,7 +1989,7 @@ await videoRecorder.prepare(videoConfig).then(() => {
});
```
-### getInputSurface8+
+### getInputSurface9+
getInputSurface(callback: AsyncCallback\): void;
@@ -1989,7 +1997,7 @@ Obtains the surface required for recording in asynchronous mode. This surface is
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 method can be called only after [prepare()](#videorecorder_prepare1) is called.
+This API can be called only after [prepare()](#videorecorder_prepare1) is called.
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
@@ -2014,7 +2022,7 @@ videoRecorder.getInputSurface((err, surfaceId) => {
});
```
-### getInputSurface8+
+### getInputSurface9+
getInputSurface(): Promise\;
@@ -2022,7 +2030,7 @@ getInputSurface(): Promise\;
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 method can be called only after [prepare()](#videorecorder_prepare1) is called.
+This API can be called only after [prepare()](#videorecorder_prepare1) is called.
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
@@ -2047,13 +2055,13 @@ await videoRecorder.getInputSurface().then((surfaceId) => {
});
```
-### start8+
+### start9+
start(callback: AsyncCallback\): void;
Starts video recording in asynchronous mode. This API uses a callback to return the result.
-This method can be called only after [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) are called, because the data source must pass data to the surface first.
+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
@@ -2076,13 +2084,13 @@ videoRecorder.start((err) => {
});
```
-### start8+
+### start9+
start(): Promise\;
Starts video recording in asynchronous mode. This API uses a promise to return the result.
-This method can be called only after [prepare()](#videorecorder_prepare1) and [getInputSurface()](#getinputsurface8) are called, because the data source must pass data to the surface first.
+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
@@ -2105,13 +2113,13 @@ await videoRecorder.start().then(() => {
});
```
-### pause8+
+### pause9+
pause(callback: AsyncCallback\): void;
Pauses video recording in asynchronous mode. This API uses a callback to return the result.
-This method can be called only after [start()](#videorecorder_start1) is called. You can resume recording by calling [resume()](#videorecorder_resume1).
+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
@@ -2134,13 +2142,13 @@ videoRecorder.pause((err) => {
});
```
-### pause8+
+### pause9+
pause(): Promise\;
Pauses video recording in asynchronous mode. This API uses a promise to return the result.
-This method can be called only after [start()](#videorecorder_start1) is called. You can resume recording by calling [resume()](#videorecorder_resume1).
+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
@@ -2163,7 +2171,7 @@ await videoRecorder.pause().then(() => {
});
```
-### resume8+
+### resume9+
resume(callback: AsyncCallback\): void;
@@ -2190,7 +2198,7 @@ videoRecorder.resume((err) => {
});
```
-### resume8+
+### resume9+
resume(): Promise\;
@@ -2217,7 +2225,7 @@ await videoRecorder.resume().then(() => {
});
```
-### stop8+
+### stop9+
stop(callback: AsyncCallback\): void;
@@ -2246,7 +2254,7 @@ videoRecorder.stop((err) => {
});
```
-### stop8+
+### stop9+
stop(): Promise\;
@@ -2275,7 +2283,7 @@ await videoRecorder.stop().then(() => {
});
```
-### release8+
+### release9+
release(callback: AsyncCallback\): void;
@@ -2302,7 +2310,7 @@ videoRecorder.release((err) => {
});
```
-### release8+
+### release9+
release(): Promise\;
@@ -2329,7 +2337,7 @@ await videoRecorder.release().then(() => {
});
```
-### reset8+
+### reset9+
reset(callback: AsyncCallback\): void;
@@ -2358,7 +2366,7 @@ videoRecorder.reset((err) => {
});
```
-### reset8+
+### reset9+
reset(): Promise\;
@@ -2387,7 +2395,7 @@ await videoRecorder.reset().then(() => {
});
```
-### on('error')8+
+### on('error')9+
on(type: 'error', callback: ErrorCallback): void
@@ -2399,7 +2407,7 @@ Subscribes to the video recording error event.
| Name | Type | Mandatory| Description |
| -------- | ------------- | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Type of the event to subscribe to, which is 'error' in this method.
The 'error' event is triggered when an error occurs during video recording.|
+| 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**
@@ -2413,7 +2421,7 @@ videoRecorder.on('error', (error) => { // Set the 'error' event call
// This event is reported when an error occurs during the retrieval of videoRecordState.
```
-## VideoRecordState8+
+## VideoRecordState9+
Enumerates the video recording states. You can obtain the state through the **state** attribute.
@@ -2426,24 +2434,24 @@ Enumerates the video recording states. You can obtain the state through the **st
| playing | string | Video recording is in progress. |
| paused | string | Video recording is paused. |
| stopped | string | Video recording is stopped. |
-| error | string | Video recording is in the error state. |
+| error | string | Audio playback is in the error state. |
-## VideoRecorderConfig8+
+## VideoRecorderConfig9+
Describes the video recording parameters.
**System capability**: SystemCapability.Multimedia.Media.VideoRecorder
-| Name | Type | Mandatory| Description |
-| --------------- | ---------------------------------------------------------- | ---- | ------------------------------------------------------------ |
-| audioSourceType | [AudioSourceType](#audiosourcetype8+) | Yes | Type of the audio source for video recording. |
-| videoSourceType | [VideoSourceType](#videosourcetype8+) | Yes | Type of the video source for video recording. |
-| profile | [VideoRecorderProfile](#videorecorderprofile8) | Yes | Video recording profile. |
-| rotation | number | No | Rotation angle of the recorded video. |
-| location | [Location](#location8) | 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.|
+| 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.|
-## AudioSourceType8+
+## AudioSourceType9+
Enumerates the audio source types for video recording.
@@ -2454,7 +2462,7 @@ Enumerates the audio source types for video recording.
| AUDIO_SOURCE_TYPE_DEFAULT | 0 | Default audio input source.|
| AUDIO_SOURCE_TYPE_MIC | 1 | Mic audio input source. |
-## VideoSourceType8+
+## VideoSourceType9+
Enumerates the video source types for video recording.
@@ -2465,7 +2473,7 @@ Enumerates the video source types for video recording.
| VIDEO_SOURCE_TYPE_SURFACE_YUV | 0 | The input surface carries raw data.|
| VIDEO_SOURCE_TYPE_SURFACE_ES | 1 | The input surface carries ES data. |
-## VideoRecorderProfile8+
+## VideoRecorderProfile9+
Describes the video recording profile.
@@ -2475,12 +2483,14 @@ Describes the video recording profile.
| ---------------- | -------------------------------------------- | ---- | ---------------- |
| audioBitrate | number | Yes | Audio encoding bit rate.|
| audioChannels | number | Yes | Number of audio channels.|
-| audioCodec | [CodecMimeType](#CodecMimeType8) | Yes | Audio encoding format. |
+| 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+
@@ -2493,7 +2503,7 @@ Enumerates the container format types (CFTs).
| CFT_MPEG_4 | "mp4" | Video container format MP4.|
| CFT_MPEG_4A | "m4a" | Audio container format M4A.|
-## Location8+
+## Location
Describes the geographical location of the recorded video.
diff --git a/en/application-dev/reference/apis/js-apis-net-connection.md b/en/application-dev/reference/apis/js-apis-net-connection.md
index 7e14306d2f67145b4e0d28d6fc532cb925729175..c0d9c297f77b71cff69ee91d920e0721ea93725d 100644
--- a/en/application-dev/reference/apis/js-apis-net-connection.md
+++ b/en/application-dev/reference/apis/js-apis-net-connection.md
@@ -1,7 +1,7 @@
# Network Connection Management
-> **NOTE**
+> **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.
@@ -17,7 +17,7 @@ getDefaultNet(callback: AsyncCallback\): void
Obtains the default active data network. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -42,11 +42,11 @@ getDefaultNet(): Promise\
Obtains the default active data network. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
-**Return value**
+**Return Value**
| Type | Description |
| --------------------------------- | ------------------------------------- |
@@ -91,7 +91,7 @@ Checks whether the default data network is activated. This API uses a promise to
**System capability**: SystemCapability.Communication.NetManager.Core
-**Return value**
+**Return Value**
| Type | Description |
| ----------------- | ----------------------------------------------- |
@@ -111,7 +111,7 @@ getAllNets(callback: AsyncCallback<Array<NetHandle>>): void
Obtains the list of all active data networks. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -136,11 +136,11 @@ getAllNets(): Promise<Array<NetHandle>>
Obtains the list of all active data networks. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
-**Return value**
+**Return Value**
| Type| Description|
| -------- | -------- |
| Promise<Array<[NetHandle](#nethandle)>> | Promise used to return the result.|
@@ -157,9 +157,9 @@ connection.getAllNets().then(function (nets) {
getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback\): void
-Obtains connection properties of the network corresponding to the **netHandle**. This API uses an asynchronous callback to return the result.
+Obtains connection properties of the network corresponding to given network handle. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -185,9 +185,9 @@ connection.getDefaultNet().then(function (netHandle) {
getConnectionProperties(netHandle: NetHandle): Promise\
-Obtains connection properties of the network corresponding to the **netHandle**. This API uses a promise to return the result.
+Obtains connection properties of the network corresponding to **netHandle**. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -197,7 +197,7 @@ Obtains connection properties of the network corresponding to the **netHandle**.
| --------- | ----------------------- | ---- | ---------------- |
| netHandle | [NetHandle](#nethandle) | Yes | Network handle.|
-**Return value**
+**Return Value**
| Type | Description |
| ------------------------------------------------------- | --------------------------------- |
@@ -217,9 +217,9 @@ connection.getDefaultNet().then(function (netHandle) {
getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback\): void
-Obtains capability information of the network corresponding to the **netHandle**. This API uses an asynchronous callback to return the result.
+Obtains capability information of the network corresponding to **netHandle**. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -245,9 +245,9 @@ connection.getDefaultNet().then(function (netHandle) {
getNetCapabilities(netHandle: NetHandle): Promise\
-Obtains capability information of the network corresponding to the **netHandle**. This API uses a promise to return the result.
+Obtains capability information of the network corresponding to **netHandle**. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -257,7 +257,7 @@ Obtains capability information of the network corresponding to the **netHandle**
| --------- | ----------------------- | ---- | ---------------- |
| netHandle | [NetHandle](#nethandle) | Yes | Network handle.|
-**Return value**
+**Return Value**
| Type | Description |
| --------------------------------------------- | --------------------------------- |
@@ -279,7 +279,7 @@ reportNetConnected(netHandle: NetHandle, callback: AsyncCallback<void>): v
Reports connection of the data network. This API uses an asynchronous callback to return the result.
-**Required permissions** : ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+**Permission required**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -306,7 +306,7 @@ reportNetConnected(netHandle: NetHandle): Promise<void>
Reports connection of the data network. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+**Permission required**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -315,7 +315,7 @@ Reports connection of the data network. This API uses a promise to return the re
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
-**Return value**
+**Return Value**
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result.|
@@ -337,7 +337,7 @@ reportNetDisconnected(netHandle: NetHandle, callback: AsyncCallback<void>)
Reports disconnection of the data network. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+**Permission required**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -364,7 +364,7 @@ reportNetDisconnected(netHandle: NetHandle): Promise<void>
Reports disconnection of the data network. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+**Permission required**: ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -373,7 +373,7 @@ Reports disconnection of the data network. This API uses a promise to return the
| -------- | -------- | -------- | -------- |
| netHandle | [NetHandle](#nethandle) | Yes| Handle of the data network. For details, see [NetHandle](#nethandle).|
-**Return value**
+**Return Value**
| Type| Description|
| -------- | -------- |
| Promise<void> | Promise used to return the result.|
@@ -394,7 +394,7 @@ getAddressesByName(host: string, callback: AsyncCallback\>):
Resolves the host name by using the default network to obtain all IP addresses. This API uses an asynchronous callback to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -402,7 +402,7 @@ Resolves the host name by using the default network to obtain all IP addresses.
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
| callback | AsyncCallback\> | Yes | Callback used to return the result. |
**Example**
@@ -421,7 +421,7 @@ getAddressesByName(host: string): Promise\>
Resolves the host name by using the default network to obtain all IP addresses. This API uses a promise to return the result.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -429,13 +429,13 @@ Resolves the host name by using the default network to obtain all IP addresses.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
-**Return value**
+**Return Value**
| Type | Description |
| ------------------------------------------- | ----------------------------- |
-| Promise\> | Promise used to return the IP addresses obtained.|
+| Promise\> | Promise used to return the result.|
**Example**
@@ -461,7 +461,7 @@ Obtains the handle of the network specified by **netSpecifier**.
| netSpecifier | [NetSpecifier](#netspecifier) | No | Network specifier. If this parameter is not set, the default network is used. |
| timeout | number | No | Timeout interval for obtaining the network specified by **netSpecifier**. This parameter is valid only when **netSpecifier** is set.|
-**Return value**
+**Return Value**
| Type | Description |
| ------------------------------- | -------------------- |
@@ -520,7 +520,7 @@ Registers a listener for **netCapabilitiesChange** events.
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
-| type | string | Yes | Event type. The value is fixed to **netCapabilitiesChange**.
**netCapabilitiesChange**: event indicating that the network capabilities have changed.|
+| type | string | Yes | Event type. The value is fixed to **netCapabilitiesChange**.
**netCapabilitiesChange**: event indicating that he network capabilities have changed.|
| callback | Callback<{ netHandle: [NetHandle](#nethandle), netCap: [NetCapabilities](#netcapabilities) }> | Yes | Callback used to return the result. |
**Example**
@@ -630,7 +630,7 @@ register(callback: AsyncCallback\): void
Registers a listener for network status changes.
-**Required permissions**: ohos.permission.GET_NETWORK_INFO
+**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -674,15 +674,15 @@ netConnection.unregister(function (error) {
Defines the handle of the data network.
-Before invoking **NetHandle** APIs, call **getNetHandle** to obtain a **NetHandle** object.
+Before invoking NetHandle APIs, call **getNetHandle** to obtain a **NetHandle** object.
**System capability**: SystemCapability.Communication.NetManager.Core
-### Attributes
+### Parameters
| Name| Type | Description |
| ------ | ------ | ------------------------- |
-| netId | number | Network ID. The value must be greater than or equal to **100**.|
+| netId | number | Network ID. The value must be greater than or equal to 100.|
### bindSocket
@@ -731,7 +731,7 @@ Binds a **TCPSocket** or **UDPSocket** object to the data network. This API uses
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| socketParam | TCPSocket \| UDPSocket | Yes | **TCPSocket** or **UDPSocket** object.|
-**Return value**
+**Return Value**
| Type | Description |
| ------------------- | --------------------------- |
| Promise<void> | Promise used to return the result.|
@@ -767,7 +767,7 @@ Resolves the host name by using the corresponding network to obtain all IP addre
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
| callback | AsyncCallback\> | Yes | Callback used to return the result. |
**Example**
@@ -794,9 +794,9 @@ Resolves the host name by using the corresponding network to obtain all IP addre
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
-**Return value**
+**Return Value**
| Type | Description |
| ------------------------------------------- | ----------------------------- |
@@ -825,7 +825,7 @@ Resolves the host name by using the corresponding network to obtain the first IP
| Name | Type | Mandatory| Description |
| -------- | ----------------------------------------- | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
| callback | AsyncCallback\<[NetAddress](#netaddress)> | Yes | Callback used to return the result. |
**Example**
@@ -852,9 +852,9 @@ Resolves the host name by using the corresponding network to obtain the first IP
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------ |
-| host | string | Yes | Host name to resolve.|
+| host | string | Yes | Host name to be resolved.|
-**Return value**
+**Return Value**
| Type | Description |
| ----------------------------------- | ------------------------------- |
@@ -901,7 +901,7 @@ Defines the network capability.
**System capability**: SystemCapability.Communication.NetManager.Core
-| Name | Value α | Description |
+| Name | Value | Description |
| ------------------------ | ---- | ---------------------- |
| NET_CAPABILITY_MMS | 0 | The network can connect to the carrier's Multimedia Messaging Service Center (MMSC) to send and receive multimedia messages.|
| NET_CAPABILITY_NOT_METERED | 11 | The network traffic is not metered.|
@@ -915,7 +915,7 @@ Defines the network type.
**System capability**: SystemCapability.Communication.NetManager.Core
-| Name | Value α | Description |
+| Name | Value | Description |
| --------------- | ---- | ----------- |
| BEARER_CELLULAR | 0 | Cellular network |
| BEARER_WIFI | 1 | Wi-Fi network|
@@ -938,7 +938,7 @@ Defines the network connection properties.
## LinkAddress
-Defines network link information.
+Network link information.
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -949,7 +949,7 @@ Defines network link information.
## RouteInfo
-Defines network route information.
+Network route information.
**System capability**: SystemCapability.Communication.NetManager.Core
@@ -971,4 +971,4 @@ Defines the network address.
| ------- | ------ | ------------------------------ |
| address | string | Network address. |
| family | number | Address family identifier. The value is **1** for IPv4 and **2** for IPv6. The default value is **1**.|
-| port | number | Port number. The value range is 0 to 65535. |
+| port | number | Port number. The value ranges from **0** to **65535**. |
diff --git a/en/application-dev/reference/apis/js-apis-radio.md b/en/application-dev/reference/apis/js-apis-radio.md
index f8f768ecc656722305f32f6f5c1e568e8cc37777..86090ef47d9add9dba3d2c0836e76b8d7f6ab989 100644
--- a/en/application-dev/reference/apis/js-apis-radio.md
+++ b/en/application-dev/reference/apis/js-apis-radio.md
@@ -600,13 +600,13 @@ Defines the network type.
| Name | Value | Description |
| -------------------- | ---- | ------------------------------------------------------------ |
-| NETWORK_TYPE_UNKNOWN | 0 | Unknown network |
-| NETWORK_TYPE_GSM | 1 | GSM network |
-| NETWORK_TYPE_CDMA | 2 | CDMA network |
-| NETWORK_TYPE_WCDMA | 3 | WCDMA network |
-| NETWORK_TYPE_TDSCDMA | 4 | TD-SCDMA network|
-| NETWORK_TYPE_LTE | 5 | LTE network |
-| NETWORK_TYPE_NR | 6 | 5G NR network |
+| NETWORK_TYPE_UNKNOWN | 0 | Unknown network. |
+| NETWORK_TYPE_GSM | 1 | GSM network. |
+| NETWORK_TYPE_CDMA | 2 | CDMA network. |
+| NETWORK_TYPE_WCDMA | 3 | WCDMA network. |
+| NETWORK_TYPE_TDSCDMA | 4 | TD-SCDMA network.|
+| NETWORK_TYPE_LTE | 5 | LTE network. |
+| NETWORK_TYPE_NR | 6 | 5G NR network. |
## NetworkState
diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md
index 3421e50e7d1df9cd8dca76edf6edd5b3334daaef..b5e188671584289f3a36396e98b0a0f99ed790c2 100644
--- a/en/application-dev/reference/apis/js-apis-sim.md
+++ b/en/application-dev/reference/apis/js-apis-sim.md
@@ -15,7 +15,7 @@ import sim from '@ohos.telephony.sim';
isSimActive\(slotId: number, callback: AsyncCallback\): void
-Checks whether the SIM card in the specified slot is activated. This function uses an asynchronous callback to return the result.
+Checks whether the SIM card in the specified slot is activated. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -23,7 +23,7 @@ Checks whether the SIM card in the specified slot is activated. This function us
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. |
**Example**
@@ -39,7 +39,7 @@ sim.isSimActive(0, (err, data) => {
isSimActive\(slotId: number\): Promise
-Checks whether the SIM card in the specified slot is activated. This function uses a promise to return the result.
+Checks whether the SIM card in the specified slot is activated. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -47,9 +47,9 @@ Checks whether the SIM card in the specified slot is activated. This function us
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| --------------------- | ---------------------------------- |
@@ -71,7 +71,7 @@ promise.then(data => {
getDefaultVoiceSlotId\(callback: AsyncCallback\): void
-Obtains the default slot ID of the SIM card that provides voice services. This function uses an asynchronous callback to return the result.
+Obtains the default slot ID of the SIM card that provides voice services. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -94,11 +94,11 @@ sim.getDefaultVoiceSlotId((err, data) => {
getDefaultVoiceSlotId\(\): Promise
-Obtains the default slot ID of the SIM card that provides voice services. This function uses a promise to return the result.
+Obtains the default slot ID of the SIM card that provides voice services. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | --------------------------------------- |
@@ -119,7 +119,7 @@ promise.then(data => {
hasOperatorPrivileges(slotId: number, callback: AsyncCallback\): void
-Checks whether the application (caller) has been granted the operator permission. This function uses an asynchronous callback to return the result.
+Checks whether the application (caller) has been granted the operator permission. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -127,7 +127,7 @@ Checks whether the application (caller) has been granted the operator permission
| Name | Type | Mandatory| Description |
| -------- | ------------------------ | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Example**
@@ -140,9 +140,9 @@ sim.hasOperatorPrivileges(0, (err, data) => {
## sim.hasOperatorPrivileges7+
-hasOperatorPrivileges(slotId: number): Promise
+hasOperatorPrivileges(slotId: number): Promise
-Checks whether the application (caller) has been granted the operator permission. This function uses a promise to return the result.
+Checks whether the application (caller) has been granted the operator permission. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -150,9 +150,9 @@ Checks whether the application (caller) has been granted the operator permission
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| :----------------- | :---------------------------------------------------------- |
@@ -173,7 +173,7 @@ promise.then(data => {
getISOCountryCodeForSim\(slotId: number, callback: AsyncCallback\): void
-Obtains the ISO country code of the SIM card in the specified slot. This function uses an asynchronous callback to return the result.
+Obtains the ISO country code of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -181,7 +181,7 @@ Obtains the ISO country code of the SIM card in the specified slot. This functio
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ---------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 |
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2 |
| callback | AsyncCallback\ | Yes | Callback used to return the result, which is a country code, for example, **CN** (China).|
**Example**
@@ -197,7 +197,7 @@ sim.getISOCountryCodeForSim(0, (err, data) => {
getISOCountryCodeForSim\(slotId: number\): Promise
-Obtains the ISO country code of the SIM card in the specified slot. This function uses a promise to return the result.
+Obtains the ISO country code of the SIM card in the specified slot. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -205,9 +205,9 @@ Obtains the ISO country code of the SIM card in the specified slot. This functio
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | ------------------------------------------------------------ |
@@ -229,7 +229,7 @@ promise.then(data => {
getSimOperatorNumeric\(slotId: number, callback: AsyncCallback\): void
-Obtains the public land mobile network (PLMN) ID of the SIM card in the specified slot. This function uses an asynchronous callback to return the result.
+Obtains the public land mobile network (PLMN) ID of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -237,7 +237,7 @@ Obtains the public land mobile network (PLMN) ID of the SIM card in the specifie
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Example**
@@ -253,7 +253,7 @@ sim.getSimOperatorNumeric(0, (err, data) => {
getSimOperatorNumeric\(slotId: number\): Promise
-Obtains the PLMN ID of the SIM card in the specified slot. This function uses a promise to return the result.
+Obtains the PLMN ID of the SIM card in the specified slot. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -261,9 +261,9 @@ Obtains the PLMN ID of the SIM card in the specified slot. This function uses a
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | ------------------------------------------------ |
@@ -285,7 +285,7 @@ promise.then(data => {
getSimSpn\(slotId: number, callback: AsyncCallback\): void
-Obtains the service provider name (SPN) of the SIM card in the specified slot. This function uses an asynchronous callback to return the result.
+Obtains the service provider name (SPN) of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -293,7 +293,7 @@ Obtains the service provider name (SPN) of the SIM card in the specified slot. T
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback\ | Yes | Callback used to return the result. |
**Example**
@@ -309,7 +309,7 @@ sim.getSimSpn(0, (err, data) => {
getSimSpn\(slotId: number\): Promise
-Obtains the SPN of the SIM card in the specified slot. This function uses a promise to return the result.
+Obtains the SPN of the SIM card in the specified slot. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -317,9 +317,9 @@ Obtains the SPN of the SIM card in the specified slot. This function uses a prom
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | ----------------------------------------- |
@@ -341,7 +341,7 @@ promise.then(data => {
getSimState\(slotId: number, callback: AsyncCallback\): void
-Obtains the status of the SIM card in the specified slot. This function uses an asynchronous callback to return the result.
+Obtains the status of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -349,7 +349,7 @@ Obtains the status of the SIM card in the specified slot. This function uses an
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback\<[SimState](#simState)\> | Yes | Callback used to return the result. For details, see [SimState](#simState). |
**Example**
@@ -365,7 +365,7 @@ sim.getSimState(0, (err, data) => {
getSimState\(slotId: number\): Promise
-Obtains the status of the SIM card in the specified slot. This function uses a promise to return the result.
+Obtains the status of the SIM card in the specified slot. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -373,9 +373,9 @@ Obtains the status of the SIM card in the specified slot. This function uses a p
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| -------------------------------- | ------------------------------------------ |
@@ -396,7 +396,7 @@ promise.then(data => {
getCardType\(slotId: number, callback: AsyncCallback\): void
-Obtains the type of the SIM card in the specified slot. This function uses an asynchronous callback to return the result.
+Obtains the type of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -404,7 +404,7 @@ Obtains the type of the SIM card in the specified slot. This function uses an as
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback\<[CardType](#cardtype7)\> | Yes | Callback used to return the result. |
**Example**
@@ -420,7 +420,7 @@ sim.getCardType(0, (err, data) => {
getCardType\(slotId: number\): Promise
-Obtains the type of the SIM card in the specified slot. This function uses a promise to return the result.
+Obtains the type of the SIM card in the specified slot. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -428,9 +428,9 @@ Obtains the type of the SIM card in the specified slot. This function uses a pro
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | ------------------------------------------------------------ |
@@ -452,7 +452,7 @@ promise.then(data => {
hasSimCard\(slotId: number, callback: AsyncCallback\): void
-Checks whether the SIM card in the specified slot is installed. This function uses an asynchronous callback to return the result.
+Checks whether the SIM card in the specified slot is installed. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -460,7 +460,7 @@ Checks whether the SIM card in the specified slot is installed. This function us
| Name | Type | Mandatory| Description |
| -------- | --------------------------- | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. |
**Example**
@@ -476,7 +476,7 @@ sim.hasSimCard(0, (err, data) => {
hasSimCard\(slotId: number\): Promise
-Checks whether the SIM card in the specified slot is installed. This function uses a promise to return the result.
+Checks whether the SIM card in the specified slot is installed. This API uses a promise to return the result.
**System capability**: SystemCapability.Communication.CoreService
@@ -484,9 +484,9 @@ Checks whether the SIM card in the specified slot is installed. This function us
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------------------------- |
-| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2|
+| slotId | number | Yes | Card slot ID. The options are as follows:
- **0**: card slot 1
- **1**: card slot 2|
-**Return Value**
+**Return value**
| Type | Description |
| --------------------- | ---------------------------------- |
@@ -512,7 +512,7 @@ Obtains the number of card slots.
**System capability**: SystemCapability.Communication.CoreService
-**Return Value**
+**Return value**
| Type | Description |
| ----------------- | ------------------------------------------------------------ |
@@ -557,4 +557,4 @@ Enumerates card types.
|CU_DUAL_MODE_CARD | 42 | China Unicom dual-mode card|
|DUAL_MODE_TELECOM_LTE_CARD | 43 | China Telecom dual-mode LTE card|
|DUAL_MODE_UG_CARD | 50 | Dual-mode card (UMTS+GSM)|
-|SINGLE_MODE_ISIM_CARD | 60 | Single-card (ISIM)|
+|SINGLE_MODE_ISIM_CARD8+ | 60 | Single-card (ISIM)|
diff --git a/en/application-dev/reference/apis/js-apis-sms.md b/en/application-dev/reference/apis/js-apis-sms.md
index 22ed6555ba33c13893bcbaa2c318b358e0ae98d3..e874588b5e209f5386a34c4fc8e10f2b5fc6aef0 100644
--- a/en/application-dev/reference/apis/js-apis-sms.md
+++ b/en/application-dev/reference/apis/js-apis-sms.md
@@ -10,11 +10,11 @@
import sms from '@ohos.telephony.sms';
```
-## sms.createMessage
+## sms.createMessage
createMessage\(pdu: Array, specification: string, callback: AsyncCallback\): void
-Creates an SMS message instance based on the protocol data unit (PDU) and the specified SMS protocol. This function uses an asynchronous callback to return the result.
+Creates an SMS message instance based on the protocol data unit (PDU) and the specified SMS protocol. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.SmsMms
@@ -24,7 +24,7 @@ Creates an SMS message instance based on the protocol data unit (PDU) and the sp
| ------------- | -------------------------------------------------- | ---- | ------------------------------------------------------------ |
| pdu | Array<number> | Yes | PDU, which is obtained from the received SMS message. |
| specification | string | Yes | SMS protocol type.
- **3gpp**: GSM/UMTS/LTE SMS
- **3gpp2**: CDMA SMS|
-| callback | AsyncCallback<[ShortMessage](#ShortMessage)> | Yes | Callback used to return the result. |
+| callback | AsyncCallback<[ShortMessage](#shortmessage)> | Yes | Callback used to return the result. |
**Example**
@@ -38,11 +38,11 @@ sms.createMessage(pdu, specification, (err, data) => {
```
-## sms.createMessage
+## sms.createMessage
createMessage\(pdu: Array, specification: string\): Promise
-Creates an SMS message instance based on the PDU and the specified SMS protocol. This function uses a promise to return the result.
+Creates an SMS message instance based on the PDU and the specified SMS protocol. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.SmsMms
@@ -57,7 +57,7 @@ Creates an SMS message instance based on the PDU and the specified SMS protocol.
| Type | Description |
| -------------------------------------------- | --------------------------------- |
-| Promise<[ShortMessage](#ShortMessage)> | Promise used to return the result.|
+| Promise<[ShortMessage](#shortmessage)> | Promise used to return the result.|
**Example**
@@ -87,7 +87,7 @@ Sends an SMS message.
| Name | Type | Mandatory| Description |
| ------- | ----------------------------------------- | ---- | ------------------------------------------------------------ |
-| options | [SendMessageOptions](#SendMessageOptions) | Yes | Options (including the callback) for sending an SMS message. For details, see [SendMessageOptions](#SendMessageOptions).|
+| options | [SendMessageOptions](#sendmessageoptions) | Yes | Options (including the callback) for sending an SMS message. For details, see [SendMessageOptions](#sendmessageoptions).|
**Example**
@@ -108,11 +108,11 @@ sms.sendMessage(options);
```
-## sms.getDefaultSmsSlotId7+
+## sms.getDefaultSmsSlotId7+
getDefaultSmsSlotId\(callback: AsyncCallback\): void
-Obtains the default slot of the SIM card used to send SMS messages. This function uses an asynchronous callback to return the result.
+Obtains the default slot of the SIM card used to send SMS messages. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.SmsMms
@@ -131,11 +131,11 @@ sms.getDefaultSmsSlotId((err, data) => {
```
-## sms.getDefaultSmsSlotId7+
+## sms.getDefaultSmsSlotId7+
getDefaultSmsSlotId\(\): Promise
-Obtains the default slot of the SIM card used to send SMS messages. This function uses a promise to return the result.
+Obtains the default slot of the SIM card used to send SMS messages. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.SmsMms
@@ -157,16 +157,18 @@ promise.then(data => {
```
-## sms.setSmscAddr7+
+## sms.setSmscAddr7+
setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback\): void
-Sets the short message service center (SMSC) address. This function uses an asynchronous callback to return the result.
+Sets the short message service center (SMSC) address. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE (a system permission)
**System capability**: SystemCapability.Telephony.SmsMms
+This is a system API and cannot be called by third-party applications.
+
**Parameters**
| Name | Type | Mandatory| Description |
@@ -186,16 +188,18 @@ sms.setSmscAddr(slotId, smscAddr, (err,data) => {
```
-## sms.setSmscAddr7+
+## sms.setSmscAddr7+
setSmscAddr\(slotId: number, smscAddr: string\): Promise
-Sets the SMSC address. This function uses a promise to return the result.
+Sets the SMSC address. This API uses a promise to return the result.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE (a system permission)
**System capability**: SystemCapability.Telephony.SmsMms
+This is a system API and cannot be called by third-party applications.
+
**Parameters**
| Name | Type | Mandatory| Description |
@@ -223,17 +227,17 @@ promise.then(data => {
```
-## sms.getSmscAddr7+
+## sms.getSmscAddr7+
getSmscAddr\(slotId: number, callback: AsyncCallback\): void
-Obtains the SMSC address. This function uses an asynchronous callback to return the result.
+Obtains the SMSC address. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE (a system permission)
**System capability**: SystemCapability.Telephony.SmsMms
-**Note:** This is a system API and it is used only for system applications.
+This is a system API and cannot be called by third-party applications.
**Parameters**
@@ -252,17 +256,17 @@ sms.getSmscAddr(slotId, (err, data) => {
```
-## sms.getSmscAddr7+
+## sms.getSmscAddr7+
getSmscAddr\(slotId: number\): Promise
-Obtains the SMSC address. This function uses a promise to return the result.
+Obtains the SMSC address. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE (a system permission)
**System capability**: SystemCapability.Telephony.SmsMms
-**Note:** This is a system API and it is used only for system applications.
+This is a system API and cannot be called by third-party applications.
**Parameters**
@@ -288,11 +292,11 @@ promise.then(data => {
});
```
-## sms.hasSmsCapability7+
+## sms.hasSmsCapability7+
hasSmsCapability(): boolean
-Checks whether the current device can send and receive SMS messages. This function works in synchronous mode.
+Checks whether the current device can send and receive SMS messages. This API works in synchronous mode.
**System capability**: SystemCapability.Telephony.SmsMms
@@ -307,18 +311,18 @@ let result = sms.hasSmsCapability();
console.log(`hasSmsCapability: ${JSON.stringify(result)}`);
```
-## ShortMessage
+## ShortMessage
Defines an SMS message instance.
**System capability**: SystemCapability.Telephony.SmsMms
-| Variable | Type | Description |
+| Name | Type | Description |
| ------------------------ | --------------------------------------- | ------------------------------------------------------------ |
| hasReplyPath | boolean | Whether the received SMS contains **TP-Reply-Path**. The default value is **false**.
**TP-Reply-Path**: the path in which the mobile phone can reply to the SMS message through the originating SMSC.|
| isReplaceMessage | boolean | Whether the received SMS message is a **replace short message**. The default value is **false**.
For details, see section 9.2.3.9 in **3GPP TS 23.040**.|
| isSmsStatusReportMessage | boolean | Whether the received SMS message is an SMS delivery status report. The default value is **false**.
**SMS-Status-Report**: a message sent from the SMSC to the mobile station to show the SMS message delivery status.|
-| messageClass | [ShortMessageClass](#ShortMessageClass) | SMS message type. |
+| messageClass | [ShortMessageClass](#shortmessageclass) | SMS message type. |
| pdu | Array<number> | PDU in the SMS message. |
| protocolId | number | ID of the protocol used for sending SMS messages. |
| scAddress | string | Address of the short message service center (SMSC). |
@@ -328,69 +332,69 @@ Defines an SMS message instance.
| visibleRawAddress | string | Sender address. |
-## ShortMessageClass
+## ShortMessageClass
-Enumerates SMS message types.
+SMS message type.
-| Variable | Value | Description |
-| ---------------- | ---- | ------------------------------------------------------------ |
-| UNKNOWN | 0 | Unknown type.
**System capability**: SystemCapability.Telephony.SmsMms|
-| INSTANT_MESSAGE | 1 | Instant message, which is displayed immediately after being received.
**System capability**: SystemCapability.Telephony.SmsMms|
-| OPTIONAL_MESSAGE | 2 | Message stored in the device or SIM card.
**System capability**: SystemCapability.Telephony.SmsMms|
-| SIM_MESSAGE | 3 | Message containing SIM card information, which is to be stored in the SIM card.
**System capability**: SystemCapability.Telephony.SmsMms|
-| FORWARD_MESSAGE | 4 | Message to be forwarded to another device.
**System capability**: SystemCapability.Telephony.SmsMms|
+**System capability**: SystemCapability.Telephony.SmsMms
+| Name | Value | Description |
+| ---------------- | ---- | ---------------------------------------- |
+| UNKNOWN | 0 | Unknown type. |
+| INSTANT_MESSAGE | 1 | Instant message, which is displayed immediately after being received. |
+| OPTIONAL_MESSAGE | 2 | Message stored in the device or SIM card. |
+| SIM_MESSAGE | 3 | Message containing SIM card information, which is to be stored in the SIM card.|
+| FORWARD_MESSAGE | 4 | Message to be forwarded to another device. |
-## SendMessageOptions
-Provides the options (including callbacks) for sending an SMS message.
+## SendMessageOptions
-For example, you can specify the SMS message type by the optional parameter **content**.
+Provides the options (including callbacks) for sending an SMS message. For example, you can specify the SMS message type by the optional parameter **content**.
**System capability**: SystemCapability.Telephony.SmsMms
-| Parameter | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ---------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| slotId | number | Yes | Slot ID of the SIM card used for sending SMS messages.
- **0**: card slot 1
- **1**: card slot 2 |
| destinationHost | string | Yes | Destination address of the SMS message. |
| content | string \| Array<number> | Yes | SMS message type. If the content is composed of character strings, the SMS message is a text message. If the content is composed of byte arrays, the SMS message is a data message.|
| serviceCenter | string | No | SMSC address. By default, the SMSC address in the SIM card is used. |
| destinationPort | number | No | Destination port of the SMS message. This field is mandatory only for a data message. Otherwise, it is optional. |
-| sendCallback | AsyncCallback<[ISendShortMessageCallback](#ISendShortMessageCallback)> | No | Callback used to return the SMS message sending result. For details, see [ISendShortMessageCallback](#ISendShortMessageCallback).|
-| deliveryCallback | AsyncCallback<[IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback)> | No | Callback used to return the SMS message delivery report. For details, see [IDeliveryShortMessageCallback](#IDeliveryShortMessageCallback).|
+| sendCallback | AsyncCallback<[ISendShortMessageCallback](#isendshortmessagecallback)> | No | Callback used to return the SMS message sending result. For details, see [ISendShortMessageCallback](#isendshortmessagecallback).|
+| deliveryCallback | AsyncCallback<[IDeliveryShortMessageCallback](#ideliveryshortmessagecallback)> | No | Callback used to return the SMS message delivery report. For details, see [IDeliveryShortMessageCallback](#ideliveryshortmessagecallback).|
-## ISendShortMessageCallback
+## ISendShortMessageCallback
Provides the callback for the SMS message sending result. It consists of three parts: SMS message sending result, URI for storing the sent SMS message, and whether the SMS message is the last part of a long SMS message.
**System capability**: SystemCapability.Telephony.SmsMms
-| Parameter | Type | Mandatory| Description |
+| Name | Type | Mandatory| Description |
| ---------- | ------------------------------- | ---- | ------------------------------------------------------------ |
| isLastPart | boolean | No | Whether this SMS message is the last part of a long SMS message. The value **true** indicates that this SMS message is the last part of a long SMS message, and value **false** indicates the opposite. The default value is **false**.|
-| result | [SendSmsResult](#SendSmsResult) | Yes | SMS message sending result. |
+| result | [SendSmsResult](#sendsmsresult) | Yes | SMS message sending result. |
| url | string | Yes | URI for storing sent SMS messages. |
-## IDeliveryShortMessageCallback
+## IDeliveryShortMessageCallback
Provides the callback for the SMS message sending result. Return the SMS delivery report.
**System capability**: SystemCapability.Telephony.SmsMms
-| Parameter| Type | Mandatory| Description |
+| Name| Type | Mandatory| Description |
| ------ | ------------------- | ---- | -------------- |
| pdu | Array<number> | Yes | SMS message delivery report.|
-## SendSmsResult
+## SendSmsResult
-Enumerates SMS message sending results.
+SMS message sending result.
**System capability**: SystemCapability.Telephony.SmsMms
-| Parameter | Value | Description |
+| Name | Value | Description |
| ------------------------------------ | ---- | ------------------------------------------------------ |
| SEND_SMS_SUCCESS | 0 | SMS message sent successfully. |
| SEND_SMS_FAILURE_UNKNOWN | 1 | Failed to send the SMS message due to unknown reasons. |
diff --git a/en/application-dev/reference/apis/js-apis-socket.md b/en/application-dev/reference/apis/js-apis-socket.md
index 1cf0e0c7d4fb1fd4e1c90ab0b55c561f437a3d47..34116c7c04b96f45167a8896710017851779d349 100644
--- a/en/application-dev/reference/apis/js-apis-socket.md
+++ b/en/application-dev/reference/apis/js-apis-socket.md
@@ -1,4 +1,4 @@
-# Socket
+# Socket Connection
> **NOTE:**
>
diff --git a/en/application-dev/reference/apis/js-apis-telephony-data.md b/en/application-dev/reference/apis/js-apis-telephony-data.md
index 8cb2951bda1838891021ab653db926958859786c..b6bdef1d34b9f544e1380d3d4a9a7cd7d1d293b7 100644
--- a/en/application-dev/reference/apis/js-apis-telephony-data.md
+++ b/en/application-dev/reference/apis/js-apis-telephony-data.md
@@ -10,11 +10,11 @@
import data from '@ohos.telephony.data';
```
-## data.getDefaultCellularDataSlotId
+## data.getDefaultCellularDataSlotId
getDefaultCellularDataSlotId(callback: AsyncCallback\): void
-Obtains the default SIM card used for mobile data. This function uses an asynchronous callback to return the result.
+Obtains the default SIM card used for mobile data. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
@@ -22,9 +22,9 @@ Obtains the default SIM card used for mobile data. This function uses an asynchr
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------------------ |
-| callback | AsyncCallback\ | Yes| Callback used to return the result.
**0**: slot 1
**1**: slot 2|
+| callback | AsyncCallback\ | Yes | Callback used to return the result.
**0**: card slot 1
**1**: card slot 2|
**Example**
@@ -34,21 +34,21 @@ data.getDefaultCellularDataSlotId((err, data) => {
});
```
-## data.getDefaultCellularDataSlotId
+## data.getDefaultCellularDataSlotId
getDefaultCellularDataSlotId(): Promise\
-Obtains the default SIM card used for mobile data. This function uses a promise to return the result.
+Obtains the default SIM card used for mobile data. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Telephony.CellularData
-**Return value**
+**Return Value**
-| Type| Description|
+| Type | Description |
| ----------------- | ------------------------------------------------------------ |
-| Promise\ | Promise used to return the result, wherein:
**0**: slot 1
**1**: slot 2|
+| Promise\ | Promise used to return the result.
**0**: card slot 1
**1**: card slot 2|
**Example**
@@ -61,19 +61,19 @@ promise.then((data) => {
});
```
-## data.getCellularDataFlowType
+## data.getCellularDataFlowType
getCellularDataFlowType(callback: AsyncCallback\): void
-Obtains the cellular data flow type, which can be uplink or downlink. This function uses an asynchronous callback to return the result.
+Obtains the cellular data flow type, which can be uplink or downlink. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CellularData
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------- | ---- | ---------- |
-| callback | AsyncCallback\<[DataFlowType](#DataFlowType)\> | Yes| Callback used to return the result.|
+| callback | AsyncCallback\<[DataFlowType](#dataflowtype)\> | Yes | Callback used to return the result.|
**Example**
@@ -83,19 +83,19 @@ data.getCellularDataFlowType((err, data) => {
});
```
-## data.getCellularDataFlowType
+## data.getCellularDataFlowType
getCellularDataFlowType(): Promise\
-Obtains the cellular data flow type, which can be uplink or downlink. This function uses a promise to return the result.
+Obtains the cellular data flow type, which can be uplink or downlink. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CellularData
-**Return value**
+**Return Value**
-| Type| Description|
+| Type | Description |
| ---------------------------------------- | ----------------------------------------------- |
-| Promise\<[DataFlowType](#DataFlowType)\> | Promise used to return the result. |
+| Promise\<[DataFlowType](#dataflowtype)\> | Promise used to return the result. |
**Example**
@@ -108,19 +108,19 @@ promise.then((data) => {
});
```
-## data.getCellularDataState
+## data.getCellularDataState
getCellularDataState(callback: AsyncCallback\): void
-Obtains the connection status of the packet switched (PS) domain. This function uses an asynchronous callback to return the result.
+Obtains the connection status of the packet switched (PS) domain. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Telephony.CellularData
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------ | ---- | ---------- |
-| callback | AsyncCallback\<[DataConnectState](#DataConnectState)\> | Yes| Callback used to return the result.|
+| callback | AsyncCallback\<[DataConnectState](#dataconnectstate)\> | Yes | Callback used to return the result.|
**Example**
@@ -130,19 +130,19 @@ data.getCellularDataState((err, data) => {
});
```
-## data.getCellularDataState
+## data.getCellularDataState
getCellularDataState(): Promise\
-Obtains the connection status of the PS domain. This function uses a promise to return the result.
+Obtains the connection status of the PS domain. This API uses a promise to return the result.
**System capability**: SystemCapability.Telephony.CellularData
-**Return value**
+**Return Value**
-| Type| Description|
+| Type | Description |
| ------------------------------------------------ | ------------------------------------- |
-| Promise\<[DataConnectState](#DataConnectState)\> | Promise used to return the result.|
+| Promise\<[DataConnectState](#dataconnectstate)\> | Promise used to return the result.|
**Example**
@@ -155,11 +155,11 @@ promise.then((data) => {
});
```
-## data.isCellularDataEnabled
+## data.isCellularDataEnabled
isCellularDataEnabled(callback: AsyncCallback\): void
-Checks whether the cellular data service is enabled. This function uses an asynchronous callback to return the result.
+Checks whether the cellular data service is enabled. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
@@ -167,9 +167,9 @@ Checks whether the cellular data service is enabled. This function uses an async
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name | Type | Mandatory| Description |
| -------- | ------------------------ | ---- | ------------------------------------------------------------ |
-| callback | AsyncCallback\ | Yes| Callback used to return the result.
**true**: The cellular data service is enabled.
**false**: The cellular data service is disabled.|
+| callback | AsyncCallback\ | Yes | Callback used to return the result.
**true**: The cellular data service is enabled.
**false**: The cellular data service is disabled.|
**Example**
@@ -179,21 +179,21 @@ data.isCellularDataEnabled((err, data) => {
});
```
-## data.isCellularDataEnabled
+## data.isCellularDataEnabled
isCellularDataEnabled(): Promise\
-Checks whether the cellular data service is enabled. This function uses a promise to return the result.
+Checks whether the cellular data service is enabled. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
**System capability**: SystemCapability.Telephony.CellularData
-**Return value**
+**Return Value**
-| Type| Description|
+| Type | Description |
| ------------------ | ------------------------------------------------------------ |
-| Promise\ | Promise used to return the result, wherein:
**true**: The cellular data service is enabled.
**false**: The cellular data service is disabled.|
+| Promise\ | Promise used to return the result.
**true**: The cellular data service is enabled.
**false**: The cellular data service is disabled.|
**Example**
@@ -206,11 +206,11 @@ promise.then((data) => {
});
```
-## data.isCellularDataRoamingEnabled
+## data.isCellularDataRoamingEnabled
isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback\): void
-Checks whether roaming is enabled for the cellular data service. This function uses an asynchronous callback to return the result.
+Checks whether roaming is enabled for the cellular data service. This API uses an asynchronous callback to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
@@ -218,10 +218,10 @@ Checks whether roaming is enabled for the cellular data service. This function u
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name | Type | Mandatory| Description |
| -------- | ------------------------ | ---- | ------------------------------------------------------------ |
-| slotId | number | Yes| Card slot ID. The options are as follows:
**0**: slot 1
**1**: slot 2|
-| callback | AsyncCallback\ | Yes| Callback used to return the result.
**true**: Roaming is enabled for the cellular data service.
**false**: Roaming is disabled for the cellular data service.|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2 |
+| callback | AsyncCallback\ | Yes | Callback used to return the result.
**true**: Roaming is enabled for the cellular data service.
**false**: Roaming is disabled for the cellular data service.|
**Example**
@@ -231,11 +231,11 @@ data.isCellularDataRoamingEnabled(0,(err, data) => {
});
```
-## data.isCellularDataRoamingEnabled
+## data.isCellularDataRoamingEnabled
isCellularDataRoamingEnabled(slotId: number): Promise\
-Checks whether roaming is enabled for the cellular data service. This method uses a promise to return the result.
+Checks whether roaming is enabled for the cellular data service. This API uses a promise to return the result.
**Required permission**: ohos.permission.GET_NETWORK_INFO
@@ -243,15 +243,15 @@ Checks whether roaming is enabled for the cellular data service. This method use
**Parameters**
-| Name| Type| Mandatory| Description|
+| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------------- |
-| slotId | number | Yes| Card slot ID. The options are as follows:
**0**: slot 1
**1**: slot 2|
+| slotId | number | Yes | Card slot ID.
**0**: card slot 1
**1**: card slot 2|
-**Return value**
+**Return Value**
-| Type| Description|
+| Type | Description |
| ------------------ | ------------------------------------------------------------ |
-| Promise\ | Promise used to return the result, wherein:
**true**: Roaming is enabled for the cellular data service.
**false**: Roaming is disabled for the cellular data service.|
+| Promise\ | Promise used to return the result.
**true**: Roaming is enabled for the cellular data service.
**false**: Roaming is disabled for the cellular data service.|
**Example**
@@ -264,26 +264,30 @@ promise.then((data) => {
});
```
-## DataFlowType
+## DataFlowType
- Defines the cellular data flow type.
+Defines the cellular data flow type.
-| Name| Value| Description|
-| ------ | ---------------------- | ------------------------------------------------------------ |
-| 0 | DATA_FLOW_TYPE_NONE | No uplink or downlink data is available.
**System capability**: SystemCapability.Telephony.CellularData|
-| 1 | DATA_FLOW_TYPE_DOWN | Only the downlink data is available.
**System capability**: SystemCapability.Telephony.CellularData|
-| 2 | DATA_FLOW_TYPE_UP | Only the uplink data is available.
**System capability**: SystemCapability.Telephony.CellularData|
-| 3 | DATA_FLOW_TYPE_UP_DOWN | Both uplink data and downlink data are available.
**System capability**: SystemCapability.Telephony.CellularData|
-| 4 | DATA_FLOW_TYPE_DORMANT | No uplink or downlink data is available because the lower-layer link is in the dormant state.
**System capability**: SystemCapability.Telephony.CellularData|
+**System capability**: SystemCapability.Telephony.CellularData
+
+| Name | Value | Description |
+| ---------------------- | ---- | ------------------------------------------ |
+| DATA_FLOW_TYPE_NONE | 0 | No uplink or downlink data is available. |
+| DATA_FLOW_TYPE_DOWN | 1 | Only the downlink data is available. |
+| DATA_FLOW_TYPE_UP | 2 | Only the uplink data is available. |
+| DATA_FLOW_TYPE_UP_DOWN | 3 | Both uplink data and downlink data are available. |
+| DATA_FLOW_TYPE_DORMANT | 4 | No uplink or downlink data is available because the lower-layer link is in the dormant state.|
-## DataConnectState
+## DataConnectState
- Describes the connection status of a cellular data link.
+Describes the connection status of a cellular data link.
+
+**System capability**: SystemCapability.Telephony.CellularData
-| Name| Value| Description|
-| ------ | ----------------------- | ------------------------------------------------------------ |
-| -1 | DATA_STATE_UNKNOWN| The status of the cellular data link is unknown.
**System capability**: SystemCapability.Telephony.CellularData|
-| 0 | DATA_STATE_DISCONNECTED | The cellular data link is disconnected.
**System capability**: SystemCapability.Telephony.CellularData|
-| 1 | DATA_STATE_CONNECTING | The cellular data link is being connected.
**System capability**: SystemCapability.Telephony.CellularData|
-| 2 | DATA_STATE_CONNECTED | The cellular data link is connected.
**System capability**: SystemCapability.Telephony.CellularData|
-| 3 | DATA_STATE_SUSPENDED | The cellular data link is suspended.
**System capability**: SystemCapability.Telephony.CellularData|
+| Name | Value | Description |
+| ----------------------- | ---- | -------------------------- |
+| DATA_STATE_UNKNOWN | -1 | The status of the cellular data link is unknown. |
+| DATA_STATE_DISCONNECTED | 0 | The cellular data link is disconnected. |
+| DATA_STATE_CONNECTING | 1 | The cellular data link is being connected.|
+| DATA_STATE_CONNECTED | 2 | The cellular data link is connected. |
+| DATA_STATE_SUSPENDED | 3 | The cellular data link is suspended. |
diff --git a/en/application-dev/reference/apis/js-apis-thermal.md b/en/application-dev/reference/apis/js-apis-thermal.md
index 5d6648171ee97febc156025f1501c8500a0cb011..f1b246f11ff17c4b2b31a1ca16210d5ce11c48bc 100644
--- a/en/application-dev/reference/apis/js-apis-thermal.md
+++ b/en/application-dev/reference/apis/js-apis-thermal.md
@@ -3,7 +3,7 @@
>  **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.
-The Thermal Manager module provides APIs for listening to the device thermal status.
+This module provides thermal level-related callback and query APIs to obtain the information required for thermal control.
## Modules to Import
@@ -17,15 +17,17 @@ import thermal from '@ohos.thermal';
Represents the thermal level.
+**System capability:** SystemCapability.PowerManager.ThermalManager
+
| Name | Default Value | Description |
| ---------- | ---- | ---------------------------------------- |
-| COOL | 0 | The device is cool, and services are not restricted.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| NORMAL | 1 | The device is operational but is not cool. You need to pay attention to its heating.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| WARM | 2 | The device is warm. You need to stop or delay some imperceptible services.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| HOT | 3 | The device is heating up. You need to stop all imperceptible services and downgrade or reduce the load of other services.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| OVERHEATED | 4 | The device is overheated. You need to stop all imperceptible services and downgrade or reduce the load of major services.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| WARNING | 5 | The device is overheated and is about to enter the emergency state. You need to stop all imperceptible services and downgrade major services to the maximum extent.
**System capability:** SystemCapability.PowerManager.ThermalManager|
-| EMERGENCY | 6 | The device has entered the emergency state. You need to stop all services except those for the emergency help purposes.
**System capability:** SystemCapability.PowerManager.ThermalManager|
+| COOL | 0 | The device is cool, and services are not restricted.|
+| NORMAL | 1 | The device is operational but is not cool. You need to pay attention to its heating.|
+| WARM | 2 | The device is warm. You need to stop or delay some imperceptible services.|
+| HOT | 3 | The device is heating up. You need to stop all imperceptible services and downgrade or reduce the load of other services.|
+| OVERHEATED | 4 | The device is overheated. You need to stop all imperceptible services and downgrade or reduce the load of major services.|
+| WARNING | 5 | The device is overheated and is about to enter the emergency state. You need to stop all imperceptible services and downgrade major services to the maximum extent.|
+| EMERGENCY | 6 | The device has entered the emergency state. You need to stop all services except those for the emergency help purposes.|
## thermal.subscribeThermalLevel
diff --git a/en/application-dev/reference/apis/js-apis-webSocket.md b/en/application-dev/reference/apis/js-apis-webSocket.md
index 65d7eeb5c49fbe9a0b456333dd043d17835aeaea..7ffb3babc8171c25ffb2e1814e69e150870071e9 100644
--- a/en/application-dev/reference/apis/js-apis-webSocket.md
+++ b/en/application-dev/reference/apis/js-apis-webSocket.md
@@ -1,4 +1,4 @@
-# WebSocket
+# WebSocket Connection
> **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.
diff --git a/en/application-dev/website.md b/en/application-dev/website.md
index 98d9ffe250c4827420553b7c348c085f1f7c5626..4f312d93b860af28ea806a15a17fe6fb54552ea5 100644
--- a/en/application-dev/website.md
+++ b/en/application-dev/website.md
@@ -3,547 +3,515 @@
- [Application Development Overview](application-dev-guide.md)
- Quick Start
- [Getting Started with Application Development](quick-start/Readme-EN.md)
- - [DevEco Studio \(OpenHarmony\) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md)
- - [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)
- - [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)
-- Development
- - [UI](ui/Readme-EN.md)
- - JavaScript-based Web-Like Development Paradigm
- - [Overview](ui/ui-js-overview.md)
- - Framework
- - [File Organization](ui/js-framework-file.md)
- - ["js" Tag](ui/js-framework-js-tag.md)
- - [app.js](ui/js-framework-js-file.md)
- - Syntax
- - [HML](ui/js-framework-syntax-hml.md)
- - [CSS](ui/js-framework-syntax-css.md)
- - [JavaScript](ui/js-framework-syntax-js.md)
- - [Lifecycle](ui/js-framework-lifecycle.md)
- - [Resource Limitations and Access](ui/js-framework-resource-restriction.md)
- - [Multi-Language Capability](ui/js-framework-multiple-languages.md)
- - Building the UI
- - [Component Overview](ui/ui-js-building-ui-component.md)
- - Building the Layout
- - [Layout Description](ui/ui-js-building-ui-layout-intro.md)
- - [Adding Title and Paragraph Text](ui/ui-js-building-ui-layout-text.md)
- - [Adding an Image](ui/ui-js-building-ui-layout-image.md)
- - [Adding a Comment](ui/ui-js-building-ui-layout-comment.md)
- - [Adding a Container](ui/ui-js-building-ui-layout-external-container.md)
- - [Adding Interactions](ui/ui-js-building-ui-interactions.md)
- - [Developing Animations](ui/ui-js-building-ui-animation.md)
- - [Defining Events](ui/ui-js-building-ui-event.md)
- - [Defining Page Routes](ui/ui-js-building-ui-routes.md)
- - Common Component Development Guidelines
- - [Text](ui/ui-js-components-text.md)
- - [Input](ui/ui-js-components-input.md)
- - [Button](ui/ui-js-components-button.md)
- - [List](ui/ui-js-components-list.md)
- - [Picker](ui/ui-js-components-picker.md)
- - [Dialog](ui/ui-js-components-dialog.md)
- - [Form](ui/ui-js-components-form.md)
- - [Stepper](ui/ui-js-components-stepper.md)
- - [Tabs](ui/ui-js-component-tabs.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)
- - JS Animation
- - [Component Animation](ui/ui-js-animate-component.md)
- - Interpolator Animation
- - [Animation Effect](ui/ui-js-animate-dynamic-effects.md)
- - [Animation Frame](ui/ui-js-animate-frame.md)
- - [Custom Components](ui/ui-js-custom-components.md)
- - TypeScript-based Declarative Development Paradigm
- - [Overview](ui/ui-ts-overview.md)
- - Framework Overview
- - File Organization
- - [Directory Structure](ui/ts-framework-directory.md)
- - [Rules for Accessing Application Code Files](ui/ts-framework-file-access-rules.md)
- - ["js" Tag](ui/ts-framework-js-tag.md)
- - Resource Access
- - [Media Resource Types](ui/ts-media-resource-type.md)
- - [Pixel Units](ui/ts-pixel-units.md)
- - [Types](ui/ts-types.md)
- - Declarative Syntax
- - [Overview](ui/ts-syntax-intro.md)
- - General UI Description Specifications
- - [Basic Concepts](ui/ts-general-ui-concepts.md)
- - Declarative UI Description Specifications
- - [Parameterless Configuration](ui/ts-parameterless-configuration.md)
- - [Configuration with Mandatory Parameters](ui/ts-configuration-with-mandatory-parameters.md)
- - [Attribution Configuration](ui/ts-attribution-configuration.md)
- - [Event Configuration](ui/ts-event-configuration.md)
- - [Child Component Configuration](ui/ts-child-component-configuration.md)
- - Componentization
- - [@Component](ui/ts-component-based-component.md)
- - [@Entry](ui/ts-component-based-entry.md)
- - [@Preview](ui/ts-component-based-preview.md)
- - [@Builder](ui/ts-component-based-builder.md)
- - [@Extend](ui/ts-component-based-extend.md)
- - [@CustomDialog](ui/ts-component-based-customdialog.md)
- - About UI State Management
- - [Basic Concepts](ui/ts-ui-state-mgmt-concepts.md)
- - Managing Component States
- - [@State](ui/ts-component-states-state.md)
- - [@Prop](ui/ts-component-states-prop.md)
- - [@Link](ui/ts-component-states-link.md)
- - Managing Application States
- - [AppStorage](ui/ts-application-states-appstorage.md)
- - [PersistentStorage](ui/ts-application-states-apis-persistentstorage.md)
- - [Environment](ui/ts-application-states-apis-environment.md)
- - Managing Other States
- - [@observed and @objectLink](ui/ts-other-states-observed-objectlink.md)
- - [@Consume and @Provide](ui/ts-other-states-consume-provide.md)
- - [@Watch](ui/ts-other-states-watch.md)
- - About Rendering Control Syntax
- - [if/else](ui/ts-rending-control-syntax-if-else.md)
- - [ForEach](ui/ts-rending-control-syntax-foreach.md)
- - [LazyForEach](ui/ts-rending-control-syntax-lazyforeach.md)
- - About @Component
- - [build Function](ui/ts-function-build.md)
- - [Custom Component Initialization](ui/ts-custom-component-initialization.md)
- - [Custom Component Lifecycle Callbacks](ui/ts-custom-component-lifecycle-callbacks.md)
- - [Example: Component Creation and Re-Initialization](ui/ts-component-creation-re-initialization.md)
- - [Syntactic Sugar](ui/ts-syntactic-sugar.md)
- - Experiencing the Declarative UI
- - [Creating a Declarative UI Project](ui/ui-ts-creating-project.md)
- - [Getting to Know Components](ui/ui-ts-components.md)
- - [Creating a Simple Page](ui/ui-ts-creating-simple-page.md)
- - Defining Page Layout and Connection
- - [Building a Food Data Model](ui/ui-ts-building-data-model.md)
- - [Building a Food Category List Layout](ui/ui-ts-building-category-list-layout.md)
- - [Building a Food Category Grid Layout](ui/ui-ts-building-category-grid-layout.md)
- - [Implementing Page Redirection and Data Transmission](ui/ui-ts-page-redirection-data-transmission.md)
- - Basic Functions
- - [Agent-Powered Scheduled Reminders ](background-agent-scheduled-reminder/Readme-EN.md)
- - [Overview](background-agent-scheduled-reminder/background-agent-scheduled-reminder-overview.md)
- - [Development Guidelines](background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md)
- - [Background Task Management ](background-task-management/Readme-EN.md)
- - [Background Task Management Overview](background-task-management/background-task-overview.md)
- - [Background Task Management Development](background-task-management/background-task-dev-guide.md)
- - [WebGL](webgl/Readme-EN.md)
- - [WebGL Overview](webgl/webgl-overview.md)
- - [WebGL Development](webgl/webgl-guidelines.md)
- - [Media](media/Readme-EN.md)
- - Audio
-
- - [Audio Overview](media/audio-overview.md)
-
- - [Audio Playback Development](media/audio-playback.md)
-
- - [Audio Playback Development Using AudioRenderer](media/audio-renderer.md)
-
- - [Audio Management Development](media/audio-management.md)
-
- - [Audio Recording Development](media/audio-recorder.md)
-
- - [Audio Recorder Development Using AudioCapturer](media/audio-capturer)
- - Video
-
- - [Video Playback Development](media/video-playback.md)
-
- - [Video Recording Development](media/video-recorder.md)
- - [Security](security/Readme-EN.md)
- - User Authentication
- - [User Authentication Overview](security/userauth-overview.md)
- - [User Authentication Development](security/userauth-guidelines.md)
- - [Connectivity](connectivity/Readme-EN.md)
- - [IPC & RPC](connectivity/ipc-rpc.md)
- - [IPC & RPC Overview](connectivity/ipc-rpc-overview.md)
- - [IPC & RPC Development Guidelines](connectivity/ipc-rpc-development-guideline.md)
- - [Subscribing to State Changes of a Remote Object](connectivity/subscribe-remote-state.md)
- - [Data Management](database/Readme-EN.md)
- - Distributed Data Service
- - [Distributed Data Service Overview](database/database-mdds-overview.md)
- - [Distributed Data Service Development](database/database-mdds-guidelines.md)
- - Relational Database Overview
- - [RDB Overview](database/database-relational-overview.md)
- - [RDB Development](database/database-relational-guidelines.md)
- - Lightweight Data Store
- - [Lightweight Data Store Overview](database/database-preference-overview.md)
- - [Lightweight Data Store Development](database/database-preference-guidelines.md)
- - [Device](device/Readme-EN.md)
- - USB Service
- - [USB Service Overview](device/usb-overview.md)
- - [USB Service Development](device/usb-guidelines.md)
- - Location
- - [Location Overview](device/device-location-overview.md)
- - [Obtaining Device Location Information](device/device-location-info.md)
- - [Geocoding and Reverse Geocoding Capabilities](device/device-location-geocoding.md)
- - [DFX](dfx/Readme-EN.md)
- - Application Event Logging
- - [Overview of Application Event Logging](dfx/hiappevent-overview.md)
- - [Development Guidelines on Application Event Logging](dfx/hiappevent-guidelines.md)
-- Tools
- - [DevEco Studio \(OpenHarmony\) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md)
- - [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)
+ - 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)
+ - [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)
-- Hands-On Tutorials
- - [Samples](https://gitee.com/openharmony/app_samples/blob/master/README.md)
-- API References
- - [Compent Reference (JavaScript-based Web-like Development Paradigm)](reference/arkui-js/Readme-EN.md)
- - [Components](reference/arkui-js/js-components.md)
- - [Common](reference/arkui-js/js-components-common.md)
- - [Universal Attributes](reference/arkui-js/js-components-common-attributes.md)
- - [Universal Styles](reference/arkui-js/js-components-common-styles.md)
- - [Universal Events](reference/arkui-js/js-components-common-events.md)
- - [Universal Methods](reference/arkui-js/js-components-common-methods.md)
- - [Animation Styles](reference/arkui-js/js-components-common-animation.md)
- - [Gradient Styles](reference/arkui-js/js-components-common-gradient.md)
- - [Transition Styles](reference/arkui-js/js-components-common-transition.md)
- - [Media Query](reference/arkui-js/js-components-common-mediaquery.md)
- - [Custom Font Styles](reference/arkui-js/js-components-common-customizing-font.md)
- - [Atomic Layout](reference/arkui-js/js-components-common-atomic-layout.md)
-
- - [Container Component](reference/arkui-js/js-components-container.md)
- - [badge](reference/arkui-js/js-components-container-badge.md)
- - [dialog](reference/arkui-js/js-components-container-dialog.md)
- - [div](reference/arkui-js/js-components-container-div.md)
- - [form](reference/arkui-js/js-components-container-form.md)
- - [list](reference/arkui-js/js-components-container-list.md)
- - [list-item](reference/arkui-js/js-components-container-list-item.md)
- - [list-item-group](reference/arkui-js/js-components-container-list-item-group.md)
- - [panel](reference/arkui-js/js-components-container-panel.md)
- - [popup](reference/arkui-js/js-components-container-popup.md)
- - [refresh](reference/arkui-js/js-components-container-refresh.md)
- - [stack](reference/arkui-js/js-components-container-stack.md)
- - [stepper](reference/arkui-js/js-components-container-stepper.md)
- - [stepper-item](reference/arkui-js/js-components-container-stepper-item.md)
- - [swiper](reference/arkui-js/js-components-container-swiper.md)
- - [tabs](reference/arkui-js/js-components-container-tabs.md)
- - [tab-bar](reference/arkui-js/js-components-container-tab-bar.md)
- - [tab-content](reference/arkui-js/js-components-container-tab-content.md)
-
- - [Basic Components](reference/arkui-js/js-components-basic.md)
- - [button](reference/arkui-js/js-components-basic-button.md)
- - [chart](reference/arkui-js/js-components-basic-chart.md)
- - [divider](reference/arkui-js/js-components-basic-divider.md)
- - [image](reference/arkui-js/js-components-basic-image.md)
- - [image-animator](reference/arkui-js/js-components-basic-image-animator.md)
- - [input](reference/arkui-js/js-components-basic-input.md)
- - [label](reference/arkui-js/js-components-basic-label.md)
- - [marquee](reference/arkui-js/js-components-basic-marquee.md)
- - [menu](reference/arkui-js/js-components-basic-menu.md)
- - [option](reference/arkui-js/js-components-basic-option.md)
- - [picker](reference/arkui-js/js-components-basic-picker.md)
- - [picker-view](reference/arkui-js/js-components-basic-picker-view.md)
- - [piece](reference/arkui-js/js-components-basic-piece.md)
- - [progress](reference/arkui-js/js-components-basic-progress.md)
- - [qrcode](reference/arkui-js/js-components-basic-qrcode.md)
- - [rating](reference/arkui-js/js-components-basic-rating.md)
- - [richtext](reference/arkui-js/js-components-basic-richtext.md)
- - [search](reference/arkui-js/js-components-basic-search.md)
- - [select](reference/arkui-js/js-components-basic-select.md)
- - [slider](reference/arkui-js/js-components-basic-slider.md)
- - [span](reference/arkui-js/js-components-basic-span.md)
- - [switch](reference/arkui-js/js-components-basic-switch.md)
- - [text](reference/arkui-js/js-components-basic-text.md)
- - [textarea](reference/arkui-js/js-components-basic-textarea.md)
- - [toolbar](reference/arkui-js/js-components-basic-toolbar.md)
- - [toolbar-item](reference/arkui-js/js-components-basic-toolbar-item.md)
- - [toggle](reference/arkui-js/js-components-basic-toggle.md)
-
- - [Media Components](reference/arkui-js/js-components-media.md)
- - [video](reference/arkui-js/js-components-media-video.md)
-
- - [Canvas Components](reference/arkui-js/js-components-canvas.md)
- - [canvas](reference/arkui-js/js-components-canvas-canvas.md)
- - [CanvasRenderingContext2D](reference/arkui-js/js-components-canvas-canvasrenderingcontext2d.md)
- - [Image](reference/arkui-js/js-components-canvas-image.md)
- - [CanvasGradient](reference/arkui-js/js-components-canvas-canvasgradient.md)
- - [ImageData](reference/arkui-js/js-components-canvas-imagedata.md)
- - [Path2D](reference/arkui-js/js-components-canvas-path2d.md)
- - [ImageBitmap](reference/arkui-js/js-components-canvas-imagebitmap.md)
- - [OffscreenCanvas](reference/arkui-js/js-components-canvas-offscreencanvas.md)
- - [OffscreenCanvasRenderingContext2D](reference/arkui-js/js-offscreencanvasrenderingcontext2d.md)
-
- - [Grid](reference/arkui-js/js-components-grid.md)
- - [Basic Concepts](reference/arkui-js/js-components-grid-basic-concepts.md)
- - [grid-container](reference/arkui-js/js-components-grid-container.md)
- - [grid-row](reference/arkui-js/js-components-grid-row.md)
- - [grid-col](reference/arkui-js/js-components-grid-col.md)
-
- - [SVG Components](reference/arkui-js/js-svg.md)
- - [Universal Attributes](reference/arkui-js/js-components-svg-common-attributes.md)
- - [svg](reference/arkui-js/js-components-svg.md)
- - [rect](reference/arkui-js/js-components-svg-rect.md)
- - [circle](reference/arkui-js/js-components-svg-circle.md)
- - [ellipse](reference/arkui-js/js-components-svg-ellipse.md)
- - [path](reference/arkui-js/js-components-svg-path.md)
- - [line](reference/arkui-js/js-components-svg-line.md)
- - [polyline](reference/arkui-js/js-components-svg-polyline.md)
- - [polygon](reference/arkui-js/js-components-svg-polygon.md)
- - [text](reference/arkui-js/js-components-svg-text.md)
- - [tspan](reference/arkui-js/js-components-svg-tspan.md)
- - [textPath](reference/arkui-js/js-components-svg-textpath.md)
- - [animate](reference/arkui-js/js-components-svg-animate.md)
- - [animateMotion](reference/arkui-js/js-components-svg-animatemotion.md)
- - [animateTransform](reference/arkui-js/js-components-svg-animatetransform.md)
-
- - [Custom Components](reference/arkui-js/js-components-custom.md)
- - [Basic Usage](reference/arkui-js/js-components-custom-basic-usage.md)
- - [Custom Events](reference/arkui-js/js-components-custom-events.md)
- - [props](reference/arkui-js/js-components-custom-props.md)
- - [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](reference/arkui-js/js-appendix.md)
- - [Type Attributes](reference/arkui-js/js-appendix-types.md)
- - [Compent Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/Readme-EN.md)
- - [Components](reference/arkui-ts/ts-components.md)
- - [Universal Components](reference/arkui-ts/ts-universal-components.md)
- - [Universal Events](reference/arkui-ts/ts-universal-events.md)
- - [Click Event](reference/arkui-ts/ts-universal-events-click.md)
- - [Touch](reference/arkui-ts/ts-universal-events-touch.md)
- - [Show/Hide Event](reference/arkui-ts/ts-universal-events-show-hide.md)
- - [Key Event](reference/arkui-ts/ts-universal-events-key.md)
- - [Component Area Change Event](reference/arkui-ts/ts-universal-events-component-area-change.md)
-
- - [Universal Attributes](reference/arkui-ts/ts-universal-attributes.md)
- - [Size](reference/arkui-ts/ts-universal-attributes-size.md)
- - [Location](reference/arkui-ts/ts-universal-attributes-location.md)
- - [Layout Constraints](reference/arkui-ts/ts-universal-attributes-layout-constraints.md)
- - [Flex Layout](reference/arkui-ts/ts-universal-attributes-flex-layout.md)
- - [Border Configuration](reference/arkui-ts/ts-universal-attributes-border.md)
- - [Background](reference/arkui-ts/ts-universal-attributes-background.md)
- - [Opacity](reference/arkui-ts/ts-universal-attributes-opacity.md)
- - [Visibility](reference/arkui-ts/ts-universal-attributes-visibility.md)
- - [Enable/Disable](reference/arkui-ts/ts-universal-attributes-enable.md)
- - [Overlay](reference/arkui-ts/ts-universal-attributes-overlay.md)
- - [Z-order Control](reference/arkui-ts/ts-universal-attributes-z-order.md)
- - [Transformation](reference/arkui-ts/ts-universal-attributes-transformation.md)
- - [Image Effect Configuration](reference/arkui-ts/ts-universal-attributes-image-effect.md)
- - [Shape Clipping](reference/arkui-ts/ts-universal-attributes-sharp-clipping.md)
- - [Text Style](reference/arkui-ts/ts-universal-attributes-text-style.md)
- - [Grid](reference/arkui-ts/ts-universal-attributes-grid.md)
- - [Gradient Color](reference/arkui-ts/ts-universal-attributes-gradient-color.md)
- - [Popup Control](reference/arkui-ts/ts-universal-attributes-popup.md)
- - [Menu Control](reference/arkui-ts/ts-universal-attributes-menu.md)
- - [Click Control](reference/arkui-ts/ts-universal-attributes-touchable.md)
- - [Touch Target](reference/arkui-ts/ts-universal-attributes-response-region.md)
-
- - [Gesture Processing](reference/arkui-ts/ts-gesture-processing.md)
- - [Gesture Binding Methods](reference/arkui-ts/ts-gesture-settings.md)
- - [Basic Gestures](reference/arkui-ts/ts-basic-gestures.md)
- - [TapGesture](reference/arkui-ts/ts-basic-gestures-tapgesture.md)
- - [LongPressGesture](reference/arkui-ts/ts-basic-gestures-longpressgesture.md)
- - [PanGesture](reference/arkui-ts/ts-basic-gestures-pangesture.md)
- - [PinchGesture](reference/arkui-ts/ts-basic-gestures-pinchgesture.md)
- - [RotationGesture](reference/arkui-ts/ts-basic-gestures-rotationgesture.md)
- - [SwipeGesture](reference/arkui-ts/ts-basic-gestures-swipegesture.md)
-
- - [Combined Gestures](reference/arkui-ts/ts-combined-gestures.md)
-
- - [Basic Components](reference/arkui-ts/ts-basic-components.md)
- - [Blank](reference/arkui-ts/ts-basic-components-blank.md)
- - [Button](reference/arkui-ts/ts-basic-components-button.md)
- - [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.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)
- - [Progress](reference/arkui-ts/ts-basic-components-progress.md)
- - [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
- - [Rating](reference/arkui-ts/ts-basic-components-rating.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)
- - [Text](reference/arkui-ts/ts-basic-components-text.md)
- - [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
- - [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
- - [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
- - [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
-
- - [Container Components](reference/arkui-ts/ts-components-container.md)
- - [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
- - [Badge](reference/arkui-ts/ts-container-badge.md)
- - [Column](reference/arkui-ts/ts-container-column.md)
- - [ColumnSplit](reference/arkui-ts/ts-container-columnsplit.md)
- - [Counter](reference/arkui-ts/ts-container-counter.md)
- - [Flex](reference/arkui-ts/ts-container-flex.md)
- - [GridContainer](reference/arkui-ts/ts-container-gridcontainer.md)
- - [Grid](reference/arkui-ts/ts-container-grid.md)
- - [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)
- - [Panel](reference/arkui-ts/ts-container-panel.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)
- - [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)
- - [Drawing Components](reference/arkui-ts/ts-drawing-components.md)
-
- - [Circle](reference/arkui-ts/ts-drawing-components-circle.md)
- - [Ellipse](reference/arkui-ts/ts-drawing-components-ellipse.md)
- - [Line](reference/arkui-ts/ts-drawing-components-line.md)
- - [Polyline](reference/arkui-ts/ts-drawing-components-polyline.md)
- - [Polygon](reference/arkui-ts/ts-drawing-components-polygon.md)
- - [Path](reference/arkui-ts/ts-drawing-components-path.md)
- - [Rect](reference/arkui-ts/ts-drawing-components-rect.md)
- - [Shape](reference/arkui-ts/ts-drawing-components-shape.md)
-
- - [Canvas Components](reference/arkui-ts/ts-components-canvas.md)
- - [Canvas](reference/arkui-ts/ts-components-canvas-canvas.md)
- - [CanvasRenderingContext2D](reference/arkui-ts/ts-canvasrenderingcontext2d.md)
- - [OffscreenCanvasRenderingConxt2D](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md)
- - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md)
- - [Path2D](reference/arkui-ts/ts-components-canvas-path2d.md)
- - [CanvasGradient](reference/arkui-ts/ts-components-canvas-canvasgradient.md)
- - [ImageBitmap](reference/arkui-ts/ts-components-canvas-imagebitmap.md)
- - [ImageData](reference/arkui-ts/ts-components-canvas-imagedata.md)
- - [Animation](reference/arkui-ts/ts-animation.md)
- - [Attribute Animation](reference/arkui-ts/ts-animatorproperty.md)
- - [Explicit Animation](reference/arkui-ts/ts-explicit-animation.md)
- - [Transition Animation](reference/arkui-ts/ts-transition-animation.md)
- - [Page Transition](reference/arkui-ts/ts-page-transition-animation.md)
- - [Component Transition](reference/arkui-ts/ts-transition-animation-component.md)
- - [Transition of Shared Elements](reference/arkui-ts/ts-transition-animation-shared-elements.md)
-
- - [Motion Path Animation](reference/arkui-ts/ts-motion-path-animation.md)
- - [Matrix Transformation](reference/arkui-ts/ts-matrix-transformation.md)
- - [Interpolation Calculation](reference/arkui-ts/ts-interpolation-calculation.md)
-
- - [Global UI Methods](reference/arkui-ts/ts-global-ui-methods.md)
- - [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
- - [Custom Dialog box](reference/arkui-ts/ts-methods-custom-dialog-box.md)
- - [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
- - [Media Query](reference/arkui-ts/ts-methods-media-query.md)
- - [List Selection Dialog Box](reference/arkui-ts/ts-methods-action-sheet.md)
-
- - [Appendix](reference/arkui-ts/ts-appendix.md)
-
- - [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- - [APIs](reference/apis/Readme-EN.md)
- - 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)
- - Media
- - [Audio Management](reference/apis/js-apis-audio.md)
- - [Media](reference/apis/js-apis-media.md)
- - Security
- - [User Authentication](reference/apis/js-apis-useriam-userauth.md)
- - [Access Control](reference/apis/js-apis-abilityAccessCtrl.md)
- - Data Management
- - [Lightweight Storage (deprecated since 8)](reference/apis/js-apis-data-storage.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)
- - 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
- - [Distributed Account Management](reference/apis/js-apis-distributed-account.md)
- - [App Account Management](reference/apis/js-apis-appAccount.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)
- - 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)
- - 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)
- - [Pop-up Window](reference/apis/js-apis-basic-features-pop-up.md)
- - [Application Configuration](reference/apis/js-apis-basic-features-configuration.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)
- - 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)
- - 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)
\ No newline at end of file
+ - [Directory Structure](quick-start/package-structure.md)
+- Development
+ - UI
+ - JavaScript-based Web-Like Development Paradigm
+ - [Overview](ui/ui-js-overview.md)
+ - Framework
+ - [File Organization](ui/js-framework-file.md)
+ - ["js" Tag](ui/js-framework-js-tag.md)
+ - [app.js](ui/js-framework-js-file.md)
+ - Syntax
+ - [HML](ui/js-framework-syntax-hml.md)
+ - [CSS](ui/js-framework-syntax-css.md)
+ - [JavaScript](ui/js-framework-syntax-js.md)
+ - [Lifecycle](ui/js-framework-lifecycle.md)
+ - [Resource Limitations and Access](ui/js-framework-resource-restriction.md)
+ - [Multi-Language Capability](ui/js-framework-multiple-languages.md)
+ - Building the UI
+ - [Component Overview](ui/ui-js-building-ui-component.md)
+ - Building the Layout
+ - [Layout Description](ui/ui-js-building-ui-layout-intro.md)
+ - [Adding Title and Paragraph Text](ui/ui-js-building-ui-layout-text.md)
+ - [Adding an Image](ui/ui-js-building-ui-layout-image.md)
+ - [Adding a Comment](ui/ui-js-building-ui-layout-comment.md)
+ - [Adding a Container](ui/ui-js-building-ui-layout-external-container.md)
+ - [Adding Interactions](ui/ui-js-building-ui-interactions.md)
+ - [Developing Animations](ui/ui-js-building-ui-animation.md)
+ - [Defining Events](ui/ui-js-building-ui-event.md)
+ - [Defining Page Routes](ui/ui-js-building-ui-routes.md)
+ - Common Component Development Guidelines
+ - [Text](ui/ui-js-components-text.md)
+ - [Input](ui/ui-js-components-input.md)
+ - [Button](ui/ui-js-components-button.md)
+ - [List](ui/ui-js-components-list.md)
+ - [Picker](ui/ui-js-components-picker.md)
+ - [Dialog](ui/ui-js-components-dialog.md)
+ - [Form](ui/ui-js-components-form.md)
+ - [Stepper](ui/ui-js-components-stepper.md)
+ - [Tabs](ui/ui-js-component-tabs.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)
+ - JS Animation
+ - [Component Animation](ui/ui-js-animate-component.md)
+ - Interpolator Animation
+ - [Animation Effect](ui/ui-js-animate-dynamic-effects.md)
+ - [Animation Frame](ui/ui-js-animate-frame.md)
+ - [Custom Components](ui/ui-js-custom-components.md)
+ - TypeScript-based Declarative Development Paradigm
+ - [Overview](ui/ui-ts-overview.md)
+ - Framework Overview
+ - File Organization
+ - [Directory Structure](ui/ts-framework-directory.md)
+ - [Rules for Accessing Application Code Files](ui/ts-framework-file-access-rules.md)
+ - ["js" Tag](ui/ts-framework-js-tag.md)
+ - Resource Access
+ - [Media Resource Types](ui/ts-media-resource-type.md)
+ - [Pixel Units](ui/ts-pixel-units.md)
+ - [Types](ui/ts-types.md)
+ - Declarative Syntax
+ - [Overview](ui/ts-syntax-intro.md)
+ - General UI Description Specifications
+ - [Basic Concepts](ui/ts-general-ui-concepts.md)
+ - Declarative UI Description Specifications
+ - [Parameterless Configuration](ui/ts-parameterless-configuration.md)
+ - [Configuration with Mandatory Parameters](ui/ts-configuration-with-mandatory-parameters.md)
+ - [Attribution Configuration](ui/ts-attribution-configuration.md)
+ - [Event Configuration](ui/ts-event-configuration.md)
+ - [Child Component Configuration](ui/ts-child-component-configuration.md)
+ - Componentization
+ - [@Component](ui/ts-component-based-component.md)
+ - [@Entry](ui/ts-component-based-entry.md)
+ - [@Preview](ui/ts-component-based-preview.md)
+ - [@Builder](ui/ts-component-based-builder.md)
+ - [@Extend](ui/ts-component-based-extend.md)
+ - [@CustomDialog](ui/ts-component-based-customdialog.md)
+ - About UI State Management
+ - [Basic Concepts](ui/ts-ui-state-mgmt-concepts.md)
+ - Managing Component States
+ - [@State](ui/ts-component-states-state.md)
+ - [@Prop](ui/ts-component-states-prop.md)
+ - [@Link](ui/ts-component-states-link.md)
+ - Managing Application States
+ - [AppStorage](ui/ts-application-states-appstorage.md)
+ - [PersistentStorage](ui/ts-application-states-apis-persistentstorage.md)
+ - [Environment](ui/ts-application-states-apis-environment.md)
+ - Managing Other States
+ - [@observed and @objectLink](ui/ts-other-states-observed-objectlink.md)
+ - [@Consume and @Provide](ui/ts-other-states-consume-provide.md)
+ - [@Watch](ui/ts-other-states-watch.md)
+ - About Rendering Control Syntax
+ - [if/else](ui/ts-rending-control-syntax-if-else.md)
+ - [ForEach](ui/ts-rending-control-syntax-foreach.md)
+ - [LazyForEach](ui/ts-rending-control-syntax-lazyforeach.md)
+ - About @Component
+ - [build Function](ui/ts-function-build.md)
+ - [Custom Component Initialization](ui/ts-custom-component-initialization.md)
+ - [Custom Component Lifecycle Callbacks](ui/ts-custom-component-lifecycle-callbacks.md)
+ - [Example: Component Creation and Re-Initialization](ui/ts-component-creation-re-initialization.md)
+ - [Syntactic Sugar](ui/ts-syntactic-sugar.md)
+ - Experiencing the Declarative UI
+ - [Creating a Declarative UI Project](ui/ui-ts-creating-project.md)
+ - [Getting to Know Components](ui/ui-ts-components.md)
+ - [Creating a Simple Page](ui/ui-ts-creating-simple-page.md)
+ - Defining Page Layout and Connection
+ - [Building a Food Data Model](ui/ui-ts-building-data-model.md)
+ - [Building a Food Category List Layout](ui/ui-ts-building-category-list-layout.md)
+ - [Building a Food Category Grid Layout](ui/ui-ts-building-category-grid-layout.md)
+ - [Implementing Page Redirection and Data Transmission](ui/ui-ts-page-redirection-data-transmission.md)
+ - Basic Functions
+ - Agent-Powered Scheduled Reminders
+ - [Overview](background-agent-scheduled-reminder/background-agent-scheduled-reminder-overview.md)
+ - [Development Guidelines](background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md)
+ - Background Task Management
+ - [Background Task Management Overview](background-task-management/background-task-overview.md)
+ - [Background Task Management Development](background-task-management/background-task-dev-guide.md)
+ - WebGL
+ - [WebGL Overview](webgl/webgl-overview.md)
+ - [WebGL Development](webgl/webgl-guidelines.md)
+ - Media
+ - Audio
+ - [Audio Overview](media/audio-overview.md)
+ - [Audio Playback Development](media/audio-playback.md)
+ - [Audio Playback Development Using AudioRenderer](media/audio-renderer.md)
+ - [Audio Recording Development](media/audio-recorder.md)
+ - [Audio Recorder Development Using AudioCapturer](media/audio-capturer)
+ - Video
+ - [Video Playback Development](media/video-playback.md)
+ - [Video Recording Development](media/video-recorder.md)
+ - Security
+ - User Authentication
+ - [User Authentication Overview](security/userauth-overview.md)
+ - [User Authentication Development](security/userauth-guidelines.md)
+ - Connectivity
+ - IPC & RPC
+ - [IPC & RPC Overview](connectivity/ipc-rpc-overview.md)
+ - [IPC & RPC Development Guidelines](connectivity/ipc-rpc-development-guideline.md)
+ - [Subscribing to State Changes of a Remote Object](connectivity/subscribe-remote-state.md)
+ - Data Management
+ - Distributed Data Service
+ - [Distributed Data Service Overview](database/database-mdds-overview.md)
+ - [Distributed Data Service Development](database/database-mdds-guidelines.md)
+ - Relational Database Overview
+ - [RDB Overview](database/database-relational-overview.md)
+ - [RDB Development](database/database-relational-guidelines.md)
+ - Lightweight Data Store
+ - [Lightweight Data Store Overview](database/database-preference-overview.md)
+ - [Lightweight Data Store Development](database/database-preference-guidelines.md)
+ - Device
+ - USB Service
+ - [USB Service Overview](device/usb-overview.md)
+ - [USB Service Development](device/usb-guidelines.md)
+ - Location
+ - [Location Overview](device/device-location-overview.md)
+ - [Obtaining Device Location Information](device/device-location-info.md)
+ - [Geocoding and Reverse Geocoding Capabilities](device/device-location-geocoding.md)
+ - DFX
+ - Application Event Logging
+ - [Overview of Application Event Logging](dfx/hiappevent-overview.md)
+ - [Development Guidelines on Application Event Logging](dfx/hiappevent-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)
+- Hands-On Tutorials
+ - [Samples](https://gitee.com/openharmony/app_samples/blob/master/README.md)
+- API References
+ - Compent Reference (JavaScript-based Web-like Development Paradigm)
+ - [Components](reference/arkui-js/js-components.md)
+ - [Common](reference/arkui-js/js-components-common.md)
+ - [Universal Attributes](reference/arkui-js/js-components-common-attributes.md)
+ - [Universal Styles](reference/arkui-js/js-components-common-styles.md)
+ - [Universal Events](reference/arkui-js/js-components-common-events.md)
+ - [Universal Methods](reference/arkui-js/js-components-common-methods.md)
+ - [Animation Styles](reference/arkui-js/js-components-common-animation.md)
+ - [Gradient Styles](reference/arkui-js/js-components-common-gradient.md)
+ - [Transition Styles](reference/arkui-js/js-components-common-transition.md)
+ - [Custom Font Styles](reference/arkui-js/js-components-common-customizing-font.md)
+ - [Atomic Layout](reference/arkui-js/js-components-common-atomic-layout.md)
+ - [Container Component](reference/arkui-js/js-components-container.md)
+ - [badge](reference/arkui-js/js-components-container-badge.md)
+ - [dialog](reference/arkui-js/js-components-container-dialog.md)
+ - [div](reference/arkui-js/js-components-container-div.md)
+ - [form](reference/arkui-js/js-components-container-form.md)
+ - [list](reference/arkui-js/js-components-container-list.md)
+ - [list-item](reference/arkui-js/js-components-container-list-item.md)
+ - [list-item-group](reference/arkui-js/js-components-container-list-item-group.md)
+ - [panel](reference/arkui-js/js-components-container-panel.md)
+ - [popup](reference/arkui-js/js-components-container-popup.md)
+ - [refresh](reference/arkui-js/js-components-container-refresh.md)
+ - [stack](reference/arkui-js/js-components-container-stack.md)
+ - [stepper](reference/arkui-js/js-components-container-stepper.md)
+ - [stepper-item](reference/arkui-js/js-components-container-stepper-item.md)
+ - [swiper](reference/arkui-js/js-components-container-swiper.md)
+ - [tabs](reference/arkui-js/js-components-container-tabs.md)
+ - [tab-bar](reference/arkui-js/js-components-container-tab-bar.md)
+ - [tab-content](reference/arkui-js/js-components-container-tab-content.md)
+ - [Basic Components](reference/arkui-js/js-components-basic.md)
+ - [button](reference/arkui-js/js-components-basic-button.md)
+ - [chart](reference/arkui-js/js-components-basic-chart.md)
+ - [divider](reference/arkui-js/js-components-basic-divider.md)
+ - [image](reference/arkui-js/js-components-basic-image.md)
+ - [image-animator](reference/arkui-js/js-components-basic-image-animator.md)
+ - [input](reference/arkui-js/js-components-basic-input.md)
+ - [label](reference/arkui-js/js-components-basic-label.md)
+ - [marquee](reference/arkui-js/js-components-basic-marquee.md)
+ - [menu](reference/arkui-js/js-components-basic-menu.md)
+ - [option](reference/arkui-js/js-components-basic-option.md)
+ - [picker](reference/arkui-js/js-components-basic-picker.md)
+ - [picker-view](reference/arkui-js/js-components-basic-picker-view.md)
+ - [piece](reference/arkui-js/js-components-basic-piece.md)
+ - [progress](reference/arkui-js/js-components-basic-progress.md)
+ - [qrcode](reference/arkui-js/js-components-basic-qrcode.md)
+ - [rating](reference/arkui-js/js-components-basic-rating.md)
+ - [richtext](reference/arkui-js/js-components-basic-richtext.md)
+ - [search](reference/arkui-js/js-components-basic-search.md)
+ - [select](reference/arkui-js/js-components-basic-select.md)
+ - [slider](reference/arkui-js/js-components-basic-slider.md)
+ - [span](reference/arkui-js/js-components-basic-span.md)
+ - [switch](reference/arkui-js/js-components-basic-switch.md)
+ - [text](reference/arkui-js/js-components-basic-text.md)
+ - [textarea](reference/arkui-js/js-components-basic-textarea.md)
+ - [toolbar](reference/arkui-js/js-components-basic-toolbar.md)
+ - [toolbar-item](reference/arkui-js/js-components-basic-toolbar-item.md)
+ - [toggle](reference/arkui-js/js-components-basic-toggle.md)
+ - [Media Components](reference/arkui-js/js-components-media.md)
+ - [video](reference/arkui-js/js-components-media-video.md)
+ - [Canvas Components](reference/arkui-js/js-components-canvas.md)
+ - [canvas](reference/arkui-js/js-components-canvas-canvas.md)
+ - [CanvasRenderingContext2D](reference/arkui-js/js-components-canvas-canvasrenderingcontext2d.md)
+ - [Image](reference/arkui-js/js-components-canvas-image.md)
+ - [CanvasGradient](reference/arkui-js/js-components-canvas-canvasgradient.md)
+ - [ImageData](reference/arkui-js/js-components-canvas-imagedata.md)
+ - [Path2D](reference/arkui-js/js-components-canvas-path2d.md)
+ - [ImageBitmap](reference/arkui-js/js-components-canvas-imagebitmap.md)
+ - [OffscreenCanvas](reference/arkui-js/js-components-canvas-offscreencanvas.md)
+ - [OffscreenCanvasRenderingContext2D](reference/arkui-js/js-offscreencanvasrenderingcontext2d.md)
+ - [Grid](reference/arkui-js/js-components-grid.md)
+ - [Basic Concepts](reference/arkui-js/js-components-grid-basic-concepts.md)
+ - [grid-container](reference/arkui-js/js-components-grid-container.md)
+ - [grid-row](reference/arkui-js/js-components-grid-row.md)
+ - [grid-col](reference/arkui-js/js-components-grid-col.md)
+ - [SVG Components](reference/arkui-js/js-svg.md)
+ - [Universal Attributes](reference/arkui-js/js-components-svg-common-attributes.md)
+ - [svg](reference/arkui-js/js-components-svg.md)
+ - [rect](reference/arkui-js/js-components-svg-rect.md)
+ - [circle](reference/arkui-js/js-components-svg-circle.md)
+ - [ellipse](reference/arkui-js/js-components-svg-ellipse.md)
+ - [path](reference/arkui-js/js-components-svg-path.md)
+ - [line](reference/arkui-js/js-components-svg-line.md)
+ - [polyline](reference/arkui-js/js-components-svg-polyline.md)
+ - [polygon](reference/arkui-js/js-components-svg-polygon.md)
+ - [text](reference/arkui-js/js-components-svg-text.md)
+ - [tspan](reference/arkui-js/js-components-svg-tspan.md)
+ - [textPath](reference/arkui-js/js-components-svg-textpath.md)
+ - [animate](reference/arkui-js/js-components-svg-animate.md)
+ - [animateMotion](reference/arkui-js/js-components-svg-animatemotion.md)
+ - [animateTransform](reference/arkui-js/js-components-svg-animatetransform.md)
+ - [Custom Components](reference/arkui-js/js-components-custom.md)
+ - [Basic Usage](reference/arkui-js/js-components-custom-basic-usage.md)
+ - [Custom Events](reference/arkui-js/js-components-custom-events.md)
+ - [props](reference/arkui-js/js-components-custom-props.md)
+ - [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](reference/arkui-js/js-appendix.md)
+ - [Type Attributes](reference/arkui-js/js-appendix-types.md)
+ - Compent Reference (TypeScript-based Declarative Development Paradigm)
+ - [Components](reference/arkui-ts/ts-components.md)
+ - [Universal Components](reference/arkui-ts/ts-universal-components.md)
+ - [Universal Events](reference/arkui-ts/ts-universal-events.md)
+ - [Click Event](reference/arkui-ts/ts-universal-events-click.md)
+ - [Touch](reference/arkui-ts/ts-universal-events-touch.md)
+ - [Show/Hide Event](reference/arkui-ts/ts-universal-events-show-hide.md)
+ - [Key Event](reference/arkui-ts/ts-universal-events-key.md)
+ - [Component Area Change Event](reference/arkui-ts/ts-universal-events-component-area-change.md)
+ - [Universal Attributes](reference/arkui-ts/ts-universal-attributes.md)
+ - [Size](reference/arkui-ts/ts-universal-attributes-size.md)
+ - [Location](reference/arkui-ts/ts-universal-attributes-location.md)
+ - [Layout Constraints](reference/arkui-ts/ts-universal-attributes-layout-constraints.md)
+ - [Flex Layout](reference/arkui-ts/ts-universal-attributes-flex-layout.md)
+ - [Border Configuration](reference/arkui-ts/ts-universal-attributes-border.md)
+ - [Background](reference/arkui-ts/ts-universal-attributes-background.md)
+ - [Opacity](reference/arkui-ts/ts-universal-attributes-opacity.md)
+ - [Visibility](reference/arkui-ts/ts-universal-attributes-visibility.md)
+ - [Enable/Disable](reference/arkui-ts/ts-universal-attributes-enable.md)
+ - [Overlay](reference/arkui-ts/ts-universal-attributes-overlay.md)
+ - [Z-order Control](reference/arkui-ts/ts-universal-attributes-z-order.md)
+ - [Transformation](reference/arkui-ts/ts-universal-attributes-transformation.md)
+ - [Image Effect Configuration](reference/arkui-ts/ts-universal-attributes-image-effect.md)
+ - [Shape Clipping](reference/arkui-ts/ts-universal-attributes-sharp-clipping.md)
+ - [Text Style](reference/arkui-ts/ts-universal-attributes-text-style.md)
+ - [Grid](reference/arkui-ts/ts-universal-attributes-grid.md)
+ - [Gradient Color](reference/arkui-ts/ts-universal-attributes-gradient-color.md)
+ - [Popup Control](reference/arkui-ts/ts-universal-attributes-popup.md)
+ - [Menu Control](reference/arkui-ts/ts-universal-attributes-menu.md)
+ - [Click Control](reference/arkui-ts/ts-universal-attributes-touchable.md)
+ - [Touch Target](reference/arkui-ts/ts-universal-attributes-response-region.md)
+ - [Gesture Processing](reference/arkui-ts/ts-gesture-processing.md)
+ - [Gesture Binding Methods](reference/arkui-ts/ts-gesture-settings.md)
+ - [Basic Gestures](reference/arkui-ts/ts-basic-gestures.md)
+ - [TapGesture](reference/arkui-ts/ts-basic-gestures-tapgesture.md)
+ - [LongPressGesture](reference/arkui-ts/ts-basic-gestures-longpressgesture.md)
+ - [PanGesture](reference/arkui-ts/ts-basic-gestures-pangesture.md)
+ - [PinchGesture](reference/arkui-ts/ts-basic-gestures-pinchgesture.md)
+ - [RotationGesture](reference/arkui-ts/ts-basic-gestures-rotationgesture.md)
+ - [SwipeGesture](reference/arkui-ts/ts-basic-gestures-swipegesture.md)
+ - [Combined Gestures](reference/arkui-ts/ts-combined-gestures.md)
+ - [Basic Components](reference/arkui-ts/ts-basic-components.md)
+ - [Blank](reference/arkui-ts/ts-basic-components-blank.md)
+ - [Button](reference/arkui-ts/ts-basic-components-button.md)
+ - [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.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)
+ - [Progress](reference/arkui-ts/ts-basic-components-progress.md)
+ - [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
+ - [Rating](reference/arkui-ts/ts-basic-components-rating.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)
+ - [Text](reference/arkui-ts/ts-basic-components-text.md)
+ - [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
+ - [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
+ - [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
+ - [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
+ - [Container Components](reference/arkui-ts/ts-components-container.md)
+ - [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
+ - [Badge](reference/arkui-ts/ts-container-badge.md)
+ - [Column](reference/arkui-ts/ts-container-column.md)
+ - [ColumnSplit](reference/arkui-ts/ts-container-columnsplit.md)
+ - [Counter](reference/arkui-ts/ts-container-counter.md)
+ - [Flex](reference/arkui-ts/ts-container-flex.md)
+ - [GridContainer](reference/arkui-ts/ts-container-gridcontainer.md)
+ - [Grid](reference/arkui-ts/ts-container-grid.md)
+ - [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)
+ - [Panel](reference/arkui-ts/ts-container-panel.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)
+ - [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)
+ - [Drawing Components](reference/arkui-ts/ts-drawing-components.md)
+ - [Circle](reference/arkui-ts/ts-drawing-components-circle.md)
+ - [Ellipse](reference/arkui-ts/ts-drawing-components-ellipse.md)
+ - [Line](reference/arkui-ts/ts-drawing-components-line.md)
+ - [Polyline](reference/arkui-ts/ts-drawing-components-polyline.md)
+ - [Polygon](reference/arkui-ts/ts-drawing-components-polygon.md)
+ - [Path](reference/arkui-ts/ts-drawing-components-path.md)
+ - [Rect](reference/arkui-ts/ts-drawing-components-rect.md)
+ - [Shape](reference/arkui-ts/ts-drawing-components-shape.md)
+ - [Canvas Components](reference/arkui-ts/ts-components-canvas.md)
+ - [Canvas](reference/arkui-ts/ts-components-canvas-canvas.md)
+ - [CanvasRenderingContext2D](reference/arkui-ts/ts-canvasrenderingcontext2d.md)
+ - [OffscreenCanvasRenderingConxt2D](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md)
+ - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md)
+ - [Path2D](reference/arkui-ts/ts-components-canvas-path2d.md)
+ - [CanvasGradient](reference/arkui-ts/ts-components-canvas-canvasgradient.md)
+ - [ImageBitmap](reference/arkui-ts/ts-components-canvas-imagebitmap.md)
+ - [ImageData](reference/arkui-ts/ts-components-canvas-imagedata.md)
+ - [Animation](reference/arkui-ts/ts-animation.md)
+ - [Attribute Animation](reference/arkui-ts/ts-animatorproperty.md)
+ - [Explicit Animation](reference/arkui-ts/ts-explicit-animation.md)
+ - [Transition Animation](reference/arkui-ts/ts-transition-animation.md)
+ - [Page Transition](reference/arkui-ts/ts-page-transition-animation.md)
+ - [Component Transition](reference/arkui-ts/ts-transition-animation-component.md)
+ - [Transition of Shared Elements](reference/arkui-ts/ts-transition-animation-shared-elements.md)
+ - [Motion Path Animation](reference/arkui-ts/ts-motion-path-animation.md)
+ - [Matrix Transformation](reference/arkui-ts/ts-matrix-transformation.md)
+ - [Interpolation Calculation](reference/arkui-ts/ts-interpolation-calculation.md)
+ - [Global UI Methods](reference/arkui-ts/ts-global-ui-methods.md)
+ - [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
+ - [Custom Dialog box](reference/arkui-ts/ts-methods-custom-dialog-box.md)
+ - [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
+ - [Media Query](reference/arkui-ts/ts-methods-media-query.md)
+ - [List Selection Dialog Box](reference/arkui-ts/ts-methods-action-sheet.md)
+ - [Appendix](reference/arkui-ts/ts-appendix.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)
+ - Media
+ - [Audio Management](reference/apis/js-apis-audio.md)
+ - [Media](reference/apis/js-apis-media.md)
+ - Security
+ - [User Authentication](reference/apis/js-apis-useriam-userauth.md)
+ - [Access Control](reference/apis/js-apis-abilityAccessCtrl.md)
+ - Data Management
+ - [Lightweight Storage (deprecated since 8)](reference/apis/js-apis-data-storage.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)
+ - 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
+ - [Distributed Account Management](reference/apis/js-apis-distributed-account.md)
+ - [App Account Management](reference/apis/js-apis-appAccount.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)
+ - 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)
+ - 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)
+ - [Pop-up Window](reference/apis/js-apis-basic-features-pop-up.md)
+ - [Application Configuration](reference/apis/js-apis-basic-features-configuration.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)
+ - 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)
+ - 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)
\ No newline at end of file
diff --git a/en/device-dev/driver/driver-platform-mipicsi-des.md b/en/device-dev/driver/driver-platform-mipicsi-des.md
new file mode 100644
index 0000000000000000000000000000000000000000..cd877612d26e3451d2ca57a4d3929c9f14fa6547
--- /dev/null
+++ b/en/device-dev/driver/driver-platform-mipicsi-des.md
@@ -0,0 +1,670 @@
+# MIPI CSI
+
+## Overview
+
+Defined by the Mobile Industry Processor Interface (MIPI) Alliance, the Camera Serial Interface (CSI) is a specification that allows data to be transmitted from the camera to the host processor on mobile platforms. As the second release, the MIPI CSI-2 consists of the application layer, protocol layer, and physical layer. It supports a maximum of four-lane data transmission and a single-lane transmission rate of 1 Gbit/s.
+
+The physical layer supports the high speed (HS) and low power (LP) modes. Using low-voltage differential signaling (LVDS), the HS mode delivers 80 Mbit/s to 1 Gbit/s transmission speed but high power consumption. The unidirectional LP mode provides lower power consumption but lower transmission speed (< 10 Mbit/s). The blend of the two modes ensures high-speed transmission of massive data (such as images) and minimized power consumption when less data is transmitted.
+
+The figure below shows a simplified CSI. The D-PHY transmits data by using one pair of source-synchronized differential clocks and one to four pairs of differential data lanes. Data is transmitted in Double Data Rate (DDR) mode, that is, data is transmitted on both the rising and falling edges of the clock.
+
+**Figure 1** CSI TX and RX interfaces
+
+
+### ComboDevAttr Structure
+
+**Table 1** ComboDevAttr structure
+
+
+
+| Name | Description |
+| --------- | ----------------------------------------------------- |
+| devno | Device number. |
+| inputMode | Input mode, which can be MIPI, LVDS, sub-LVDS, HiSPI, or DC. |
+| dataRate | Input rate of the MIPI RX scalable low voltage signaling (SLVS). |
+| imgRect | Crop area of the MIPI RX device (same as the size of the input image of the sensor).|
+| MIPIAttr | Attributes of the MIPI device. |
+| lvdsAttr | Attributes of the LVDS, sub-LVDS, or HiSPi device. |
+
+### ExtDataType Structure
+
+**Table 2** ExtDataType structure
+
+
+
+| Name | Description |
+| --------------- | ------------------------------- |
+| devno | Device number. |
+| num | Sensor number. |
+| extDataBitWidth | Bit depth of an image. |
+| extDataType | Pointer to the YUV, raw data format, and bit depth.|
+
+### Available APIs
+
+**Table 3** MIPI CSI APIs
+
+
+
+ | Category| API|
+| -------- | -------- |
+| Opening or closing the MIPI CSI controller operation handle| **MipiCsiOpen**: opens the MIPI CSI controller operation handle.
**MipiCsiClose**: closes the MIPI CSI controller operation handle.|
+| Setting MIPI CSI parameters| **MipiCsiSetComboDevAttr**: sets parameters of the MIPI, CMOS, or LVDS camera to the controller. The parameters include the working mode, image area, image depth, data rate, and physical channel.
**MipiCsiSetExtDataType** (optional): sets the YUV and RAW data formats and bit depths.
**MipiCsiSetHsMode**: sets the MIPI RX lane distribution. Set the mode based on the hardware connection.
**MipiCsiSetPhyCmvmode**: sets the common-mode voltage (CMV) mode.|
+| Resetting a sensor or deasserting the reset of a sensor| **MipiCsiResetSensor**: resets a sensor.
**MipiCsiUnresetSensor**: deasserts the reset of a sensor.|
+| Resetting the MIPI RX or deasserting the reset of the MIPI RX| **MipiCsiResetRx**: resets the MIPI RX. The value of **enSnsType** varies depending on the value of **s32WorkingViNum**.
**MipiCsiUnresetRx**: deasserts the reset on the MIPI RX.|
+| Enabling or disabling the MIPI clock| **MipiCsiEnableClock**: enables the MIPI clock. The **enSnsType** passed by the upper-layer function during electrophoresis determines whether MIPI or LVDS is used.
**MipiCsiDisableClock**: disables the MIPI clock.|
+| Enabling or disabling the MIPI sensor clock| **MipiCsiEnableSensorClock**: enables the MIPI sensor clock.
**MipiCsiDisableSensorClock**: disables the MIPI sensor clock.|
+
+
+## Usage Guidelines
+
+### How to Use
+
+The figure below shows the process of using a MIPI CSI device.
+
+**Figure 2** MIPI CSI usage process
+
+
+
+
+### Opening the MIPI CSI Controller Operation Handle
+
+Before starting MIPI CSI communication, call **MipiCsiOpen** to open the MIPI CSI device handle. This function returns the MIPI CSI device handle with the specified lane ID.
+
+```c
+DevHandle MipiCsiOpen(uint8_t id);
+```
+
+**Table 4** Description of MipiCsiOpen
+
+
+
+| Parameter | Description |
+| ---------- | ----------------------------------------------- |
+| id | MIPI CSI lane ID. |
+| **Return Value**| **Description** |
+| NULL | The operation fails. |
+| Device handle | MIPI CSI device handle with the specified lane ID. The data type is **DevHandle**.|
+
+For example, open the controller operation handle for MIPI CSI lane 0:
+
+```c
+DevHandle mipiCsiHandle = NULL; /* Device handle */
+id = 0; /* MIPI CSI lane ID */
+
+/* Open the controller operation handle. */
+MipiCsiHandle = MipiCsiOpen(id);
+if (MipiCsiHandle == NULL) {
+ HDF_LOGE("MipiCsiOpen: failed\n");
+ return;
+}
+```
+
+### Setting MIPI CSI Parameters
+
+- Set MIPI CSI parameters.
+
+ ```c
+ int32_t MipiCsiSetComboDevAttr(DevHandle handle, ComboDevAttr *pAttr);
+ ```
+
+ **Table 5** Description of MipiCsiSetComboDevAttr
+
+
+
+ | Parameter | Description |
+ | ---------- | -------------------------- |
+ | handle | Controller operation handle. |
+ | pAttr | Pointer to the MIPI CSI structure.|
+ | **Return Value**| **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ struct ComboDevAttr attr;
+
+ /* The current configuration is as follows: */
+ (void)memset_s(&attr, sizeof(ComboDevAttr), 0, sizeof(ComboDevAttr));
+ attr.devno = 0; /* Device 0 */
+ attr.inputMode = INPUT_MODE_MIPI; /* The input mode is MIPI. */
+ attr.dataRate = MIPI_DATA_RATE_X1; /* The data rate is 1 pixel per clock cycle. */
+ attr.imgRect.x = 0; /* The value 0 indicates the upper left position of the image sensor. */
+ attr.imgRect.y = 0; /* The value 0 indicates the upper right position of the image sensor. */
+ attr.imgRect.width = 2592; /* The width of the image sensor is 2592. */
+ attr.imgRect.height = 1944; /* The height of the image sensor is 1944. */
+ /* Write the MIPI CSI configuration. */
+ ret = MipiCsiSetComboDevAttr(MipiCsiHandle, &attr);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetComboDevAttr fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Set the YUV, RAW data format, and bit depth.
+
+ ```c
+ int32_t MipiCsiSetExtDataType(DevHandle handle, ExtDataType* dataType);
+ ```
+
+ **Table 6** Description of MipiCsiSetExtDataType
+
+
+
+ | Parameter | Description |
+ | ---------- | ------------------------------- |
+ | handle | Controller operation handle. |
+ | dataType | Pointer to the YUV, raw data format, and bit depth.|
+ | **Return Value**| **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ struct ExtDataType dataType;
+
+ /* Set the YUV, raw data format, and bit depth. */
+ dataType.devno = 0; /* Device 0 */
+ dataType.num = 0; /* sensor 0 */
+ dataType.extDataBitWidth[0] = 12; /* Bit depth array element 0 */
+ dataType.extDataBitWidth[1] = 12; /* Bit depth array element 1 */
+ dataType.extDataBitWidth[2] = 12; /* Bit depth array element 2 */
+
+ dataType.extDataType[0] = 0x39; /* Define YUV, raw data format, and bit depth element 0. */
+ dataType.extDataType[1] = 0x39; /* Define YUV, raw data format, and bit depth element 1. */
+ dataType.extDataType[2] = 0x39; /* Define YUV, raw data format, and bit depth element 2. */
+ /* Set the YUV, raw data format, and bit depth. */
+ ret = MipiCsiSetExtDataType(MipiCsiHandle, &dataType);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetExtDataType fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Set the MIPI RX lane distribution.
+
+ ```c
+ int32_t MipiCsiSetHsMode(DevHandle handle, LaneDivideMode laneDivideMode);
+ ```
+
+ **Table 7** Description of MipiCsiSetHsMode
+
+
+
+ | Parameter | Description |
+ | -------------- | -------------- |
+ | handle | Controller operation handle.|
+ | laneDivideMode | Lane mode. |
+ | **Return Value** | **Description**|
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ enum LaneDivideMode mode;
+
+ /* Set the lane mode to 0. */
+ mode = LANE_DIVIDE_MODE_0;
+ /* Set the MIPI RX lane distribution. */
+ ret = MipiCsiSetHsMode(MipiCsiHandle, mode);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetHsMode fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Set the CMV mode.
+
+ ```c
+ int32_t MipiCsiSetPhyCmvmode(DevHandle handle, uint8_t devno, PhyCmvMode cmvMode);
+ ```
+
+ **Table 8** Description of MipiCsiSetPhyCmvmode
+
+
+
+ | Parameter | Description |
+ | ---------- | ---------------- |
+ | handle | Controller operation handle. |
+ | cmvMode | CMV mode.|
+ | devno | Device number. |
+ | **Return Value**| **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ enum PhyCmvMode mode;
+ uint8_t devno;
+
+ /* Set the CMV mode to 0. */
+ mode = PHY_CMV_GE1200MV;
+ /* The device number is 0. */
+ devno = 0;
+ /* Set the CMV mode. */
+ ret = MipiCsiSetPhyCmvmode(MipiCsiHandle, devno, mode);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetPhyCmvmode fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+### Resetting a Sensor or Deasserting the Reset of a Sensor
+
+- Reset a sensor.
+
+ ```c
+ int32_t MipiCsiResetSensor(DevHandle handle, uint8_t snsResetSource);
+ ```
+
+ **Table 9** Description of MipiCsiResetSensor
+
+
+
+ | Parameter | Description |
+ | -------------- | ------------------------------------------------ |
+ | handle | Controller operation handle. |
+ | snsResetSource | Sensor's reset signal cable number, which is called reset source of the sensor in software.|
+ | **Return Value** | **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t snsResetSource;
+
+ /* The sensor's reset signal cable number is 0. */
+ snsResetSource = 0;
+ /* Reset the sensor. */
+ ret = MipiCsiResetSensor(MipiCsiHandle, snsResetSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiResetSensor fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Deassert the reset of a sensor.
+
+ ```c
+ int32_t MipiCsiUnresetSensor(DevHandle handle, uint8_t snsResetSource);
+ ```
+
+ **Table 10** Description of MipiCsiUnresetSensor
+
+
+
+ | Parameter | Description |
+ | -------------- | ------------------------------------------------ |
+ | handle | Controller operation handle. |
+ | snsResetSource | Sensor's reset signal cable number, which is called reset source of the sensor in software.|
+ | **Return Value** | **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t snsResetSource;
+
+ /* The sensor's reset signal cable number is 0. */
+ snsResetSource = 0;
+ /* Deassert the reset of the sensor. */
+ ret = MipiCsiUnresetSensor(MipiCsiHandle, snsResetSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiUnresetSensor fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+### Resetting the MIPI RX or Deasserting the Reset of the MIPI RX
+
+- Reset the MIPI RX.
+
+ ```c
+ int32_t MipiCsiResetRx(DevHandle handle, uint8_t comboDev);
+ ```
+
+ **Table 11** Description of MipiCsiResetRx
+
+
+
+ | Parameter | Description |
+ | ---------- | --------------------- |
+ | handle | Controller operation handle. |
+ | comboDev | MIPI RX or LVDS channel number.|
+ | **Return Value**| **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t comboDev;
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Reset the MIPI RX. */
+ ret = MipiCsiResetRx(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiResetRx fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Deassert the reset of the MIPI RX.
+
+ ```c
+ int32_t MipiCsiUnresetRx(DevHandle handle, uint8_t comboDev);
+ ```
+
+ **Table 12** Description of MipiCsiUnresetRx
+
+
+
+ | Parameter | Description |
+ | ---------- | --------------------- |
+ | handle | Controller operation handle. |
+ | comboDev | MIPI RX or LVDS channel number.|
+ | **Return Value**| **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t comboDev;
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Deassert the reset of the MIPI RX. */
+ ret = MipiCsiUnresetRx(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiUnresetRx fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+### Enabling or Disabling the MIPI Clock
+
+- Enable the MIPI clock.
+
+ ```c
+ int32_t MipiCsiEnableClock(DevHandle handle, uint8_t comboDev);
+ ```
+
+ **Table 13** Description of MipiCsiEnableClock
+
+
+
+ | Parameter | Description |
+ | ---------- | -------------- |
+ | handle | Controller operation handle.|
+ | comboDev | Channel number. |
+ | **Return Value**| **Description**|
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t comboDev;
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Enable the MIPI clock. */
+ ret = MipiCsiEnableClock(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiEnableClock fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Disable the MIPI clock.
+
+ ```c
+ int32_t MipiCsiDisableClock(DevHandle handle, uint8_t comboDev);
+ ```
+
+ **Table 14** Description of MipiCsiDisableClock
+
+
+
+ | Parameter | Description |
+ | ---------- | -------------- |
+ | handle | Controller operation handle.|
+ | comboDev | Channel number. |
+ | **Return Value**| **Description**|
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t comboDev;
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Disable the MIPI clock. */
+ ret = MipiCsiDisableClock(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiDisableClock fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+### Enabling or Disabling the MIPI Sensor Clock
+
+- Enable the MIPI sensor clock.
+
+ ```c
+ int32_t MipiCsiEnableSensorClock(DevHandle handle, uint8_t snsClkSource);
+ ```
+
+ **Table 15** Description of MipiCsiEnableSensorClock
+
+
+
+ | Parameter | Description |
+ | ------------ | ------------------------------------------------ |
+ | handle | Controller operation handle. |
+ | snsClkSource | Sensor's clock signal cable number, which is called clock source of the sensor in software.|
+ | **Return Value** | **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t snsClkSource;
+
+ /* The sensor's clock signal cable number is 0. */
+ snsClkSource = 0;
+ /* Enable the MIPI sensor clock. */
+ ret = MipiCsiEnableSensorClock(MipiCsiHandle, snsClkSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiEnableSensorClock fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+- Disable the MIPI sensor clock.
+
+ ```c
+ int32_t MipiCsiDisableSensorClock(DevHandle handle, uint8_t snsClkSource);
+ ```
+
+ **Table 16** Description of MipiCsiDisableSensorClock
+
+
+
+ | Parameter | Description |
+ | ------------ | ------------------------------------------------ |
+ | handle | Controller operation handle. |
+ | snsClkSource | Sensor's clock signal cable number, which is called clock source of the sensor in software.|
+ | **Return Value** | **Description** |
+ | 0 | The operation is successful. |
+ | Negative value | The operation fails. |
+
+ ```c
+ int32_t ret;
+ uint8_t snsClkSource;
+
+ /* The sensor's clock signal cable number is 0. */
+ snsClkSource = 0;
+ /* Disable the MIPI sensor clock. */
+ ret = MipiCsiDisableSensorClock(MipiCsiHandle, snsClkSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiDisableSensorClock fail! ret=%d\n", __func__, ret);
+ return -1;
+ }
+ ```
+
+### Closing a MIPI CSI Controller Operation Handle
+
+After the MIPI CSI communication, close the MIPI CSI controller handle by calling the following function:
+
+```c
+void MipiCsiClose(DevHandle handle);
+```
+
+This function releases the resources requested by **MipiCsiOpen**.
+
+**Table 17** Description of MipiCsiClose
+
+
+
+ | Parameter | Description |
+ | ------------ | ------------------------------------------------ |
+ | handle | MIPI CSI controller operation handle. |
+
+```c
+MipiCsiClose(MIPIHandle); /* Close the operation handle of the MIPI CSI controller. */
+```
+
+## Development Example
+
+The sample code is as follows:
+
+```c
+#include "hdf.h"
+#include "MIPI_csi_if.h"
+
+void PalMipiCsiTestSample(void)
+{
+ uint8_t id;
+ int32_t ret;
+ uint8_t comboDev;
+ uint8_t snsClkSource;
+ uint8_t devno;
+ enum LaneDivideMode mode;
+ enum PhyCmvMode mode;
+ struct ComboDevAttr attr;
+ struct ExtDataType dataType;
+ DevHandle MipiCsiHandle = NULL;
+
+ /* Controller ID */
+ id = 0;
+ /* Open the controller operation handle. */
+ MipiCsiHandle = MipiCsiOpen(id);
+ if (MipiCsiHandle == NULL) {
+ HDF_LOGE("MipiCsiOpen: failed!\n");
+ return;
+ }
+
+ /* Set the lane mode to 0. */
+ mode = LANE_DIVIDE_MODE_0;
+ /* Set the MIPI RX lane distribution. */
+ ret = MipiCsiSetHsMode(MipiCsiHandle, mode);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetHsMode fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Enable the MIPI clock. */
+ ret = MipiCsiEnableClock(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiEnableClock fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Reset the MIPI RX. */
+ ret = MipiCsiResetRx(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiResetRx fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* The sensor's clock signal cable number is 0. */
+ snsClkSource = 0;
+ /* Enable the MIPI sensor clock. */
+ ret = MipiCsiEnableSensorClock(MipiCsiHandle, snsClkSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiEnableSensorClock fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Reset the sensor. */
+ ret = MipiCsiResetSensor(MipiCsiHandle, snsResetSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiResetSensor fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Set MIPI parameters. */
+ (void)memset_s(&attr, sizeof(ComboDevAttr), 0, sizeof(ComboDevAttr));
+ attr.devno = 0; /* Device 0 */
+ attr.inputMode = INPUT_MODE_MIPI; /* The input mode is MIPI. */
+ attr.dataRate = MIPI_DATA_RATE_X1; /* The data rate is 1 pixel per clock cycle. */
+ attr.imgRect.x = 0; /* The value 0 indicates the upper left position of the image sensor. */
+ attr.imgRect.y = 0; /* The value 0 indicates the upper right position of the image sensor. */
+ attr.imgRect.width = 2592; /* The width of the image sensor is 2592. */
+ attr.imgRect.height = 1944; /* The height of the image sensor is 1944. */
+ /* Write the MIPI CSI configuration. */
+ ret = MipiCsiSetComboDevAttr(MipiCsiHandle, &attr);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetComboDevAttr fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Set the CMV mode to 0. */
+ mode = PHY_CMV_GE1200MV;
+ /* The device number is 0. */
+ devno = 0;
+ /* Set the CMV mode. */
+ ret = MipiCsiSetPhyCmvmode(MipiCsiHandle, devno, mode);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiSetPhyCmvmode fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* The channel number is 0.*/
+ comboDev = 0;
+ /* Deassert the reset of the MIPI RX. */
+ ret = MipiCsiUnresetRx(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiUnresetRx fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Disable the MIPI clock. */
+ ret = MipiCsiDisableClock(MipiCsiHandle, comboDev);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiDisableClock fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* The sensor's reset signal cable number is 0. */
+ snsResetSource = 0;
+ /* Deassert the reset of the sensor. */
+ ret = MipiCsiUnresetSensor(MipiCsiHandle, snsResetSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiUnresetSensor fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Disable the MIPI sensor clock. */
+ ret = MipiCsiDisableSensorClock(MipiCsiHandle, snsClkSource);
+ if (ret != 0) {
+ HDF_LOGE("%s: MipiCsiDisableSensorClock fail! ret=%d\n", __func__, ret);
+ return;
+ }
+
+ /* Close the MIPI CSI device handle. */
+ MipiCsiClose(MipiCsiHandle);
+}
+```
diff --git a/en/device-dev/driver/figures/process-of-using-MIPI-CSI.png b/en/device-dev/driver/figures/process-of-using-MIPI-CSI.png
index 433774c644171cc6eeb267db5d08990e13606178..fcb1930b3d7e59165209b7c4a05c0cc6e82058c8 100644
Binary files a/en/device-dev/driver/figures/process-of-using-MIPI-CSI.png and b/en/device-dev/driver/figures/process-of-using-MIPI-CSI.png differ
diff --git a/en/device-dev/website.md b/en/device-dev/website.md
index 53019a18f1c6c90400102c5675168086dd1174a1..0bf7d860f20f80ae04a4d90c97f9c5782146f6f1 100644
--- a/en/device-dev/website.md
+++ b/en/device-dev/website.md
@@ -308,7 +308,7 @@
- [Startup](subsystems/subsys-boot.md)
- [DFX](subsystems/subsys-dfx.md)
- Featured Topics
- - [HPM Bundle](bundles/Readme-EN.md)
+ - HPM Bundle
- [Development Specifications](bundles/bundles-standard-rules.md)
- Development Guidelines
- [Bundle Development](bundles/bundles-guide-overview.md)
@@ -333,7 +333,7 @@
- [Samples](https://gitee.com/openharmony/app_samples/blob/master/README.md)
- [Codelabs](https://gitee.com/openharmony/codelabs/blob/master/README.md)
- References
- - [FAQs](faqs/Readme-EN.md)
+ - FAQs
- [Overview of FAQs](faqs/faqs-overview.md)
- [Environment Setup](faqs/faqs-environment-setup.md)
- [Compilation and Building Subsystem](faqs/faqs-building.md)
diff --git a/en/website.md b/en/website.md
index 40f4427b9262c95e75d1378605b54c894dc95c1e..ae9d754ed82bc293c436393d20c455b9cd4cb9ff 100644
--- a/en/website.md
+++ b/en/website.md
@@ -1,515 +1,31 @@
-- [Application Development Overview](application-dev-guide.md)
-- Quick Start
- - [Getting Started with Application Development](quick-start/Readme-EN.md)
- - 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)
- - [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)
-- Development
- - UI
- - JavaScript-based Web-Like Development Paradigm
- - [Overview](ui/ui-js-overview.md)
- - Framework
- - [File Organization](ui/js-framework-file.md)
- - ["js" Tag](ui/js-framework-js-tag.md)
- - [app.js](ui/js-framework-js-file.md)
- - Syntax
- - [HML](ui/js-framework-syntax-hml.md)
- - [CSS](ui/js-framework-syntax-css.md)
- - [JavaScript](ui/js-framework-syntax-js.md)
- - [Lifecycle](ui/js-framework-lifecycle.md)
- - [Resource Limitations and Access](ui/js-framework-resource-restriction.md)
- - [Multi-Language Capability](ui/js-framework-multiple-languages.md)
- - Building the UI
- - [Component Overview](ui/ui-js-building-ui-component.md)
- - Building the Layout
- - [Layout Description](ui/ui-js-building-ui-layout-intro.md)
- - [Adding Title and Paragraph Text](ui/ui-js-building-ui-layout-text.md)
- - [Adding an Image](ui/ui-js-building-ui-layout-image.md)
- - [Adding a Comment](ui/ui-js-building-ui-layout-comment.md)
- - [Adding a Container](ui/ui-js-building-ui-layout-external-container.md)
- - [Adding Interactions](ui/ui-js-building-ui-interactions.md)
- - [Developing Animations](ui/ui-js-building-ui-animation.md)
- - [Defining Events](ui/ui-js-building-ui-event.md)
- - [Defining Page Routes](ui/ui-js-building-ui-routes.md)
- - Common Component Development Guidelines
- - [Text](ui/ui-js-components-text.md)
- - [Input](ui/ui-js-components-input.md)
- - [Button](ui/ui-js-components-button.md)
- - [List](ui/ui-js-components-list.md)
- - [Picker](ui/ui-js-components-picker.md)
- - [Dialog](ui/ui-js-components-dialog.md)
- - [Form](ui/ui-js-components-form.md)
- - [Stepper](ui/ui-js-components-stepper.md)
- - [Tabs](ui/ui-js-component-tabs.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)
- - JS Animation
- - [Component Animation](ui/ui-js-animate-component.md)
- - Interpolator Animation
- - [Animation Effect](ui/ui-js-animate-dynamic-effects.md)
- - [Animation Frame](ui/ui-js-animate-frame.md)
- - [Custom Components](ui/ui-js-custom-components.md)
- - TypeScript-based Declarative Development Paradigm
- - [Overview](ui/ui-ts-overview.md)
- - Framework Overview
- - File Organization
- - [Directory Structure](ui/ts-framework-directory.md)
- - [Rules for Accessing Application Code Files](ui/ts-framework-file-access-rules.md)
- - ["js" Tag](ui/ts-framework-js-tag.md)
- - Resource Access
- - [Media Resource Types](ui/ts-media-resource-type.md)
- - [Pixel Units](ui/ts-pixel-units.md)
- - [Types](ui/ts-types.md)
- - Declarative Syntax
- - [Overview](ui/ts-syntax-intro.md)
- - General UI Description Specifications
- - [Basic Concepts](ui/ts-general-ui-concepts.md)
- - Declarative UI Description Specifications
- - [Parameterless Configuration](ui/ts-parameterless-configuration.md)
- - [Configuration with Mandatory Parameters](ui/ts-configuration-with-mandatory-parameters.md)
- - [Attribution Configuration](ui/ts-attribution-configuration.md)
- - [Event Configuration](ui/ts-event-configuration.md)
- - [Child Component Configuration](ui/ts-child-component-configuration.md)
- - Componentization
- - [@Component](ui/ts-component-based-component.md)
- - [@Entry](ui/ts-component-based-entry.md)
- - [@Preview](ui/ts-component-based-preview.md)
- - [@Builder](ui/ts-component-based-builder.md)
- - [@Extend](ui/ts-component-based-extend.md)
- - [@CustomDialog](ui/ts-component-based-customdialog.md)
- - About UI State Management
- - [Basic Concepts](ui/ts-ui-state-mgmt-concepts.md)
- - Managing Component States
- - [@State](ui/ts-component-states-state.md)
- - [@Prop](ui/ts-component-states-prop.md)
- - [@Link](ui/ts-component-states-link.md)
- - Managing Application States
- - [AppStorage](ui/ts-application-states-appstorage.md)
- - [PersistentStorage](ui/ts-application-states-apis-persistentstorage.md)
- - [Environment](ui/ts-application-states-apis-environment.md)
- - Managing Other States
- - [@observed and @objectLink](ui/ts-other-states-observed-objectlink.md)
- - [@Consume and @Provide](ui/ts-other-states-consume-provide.md)
- - [@Watch](ui/ts-other-states-watch.md)
- - About Rendering Control Syntax
- - [if/else](ui/ts-rending-control-syntax-if-else.md)
- - [ForEach](ui/ts-rending-control-syntax-foreach.md)
- - [LazyForEach](ui/ts-rending-control-syntax-lazyforeach.md)
- - About @Component
- - [build Function](ui/ts-function-build.md)
- - [Custom Component Initialization](ui/ts-custom-component-initialization.md)
- - [Custom Component Lifecycle Callbacks](ui/ts-custom-component-lifecycle-callbacks.md)
- - [Example: Component Creation and Re-Initialization](ui/ts-component-creation-re-initialization.md)
- - [Syntactic Sugar](ui/ts-syntactic-sugar.md)
- - Experiencing the Declarative UI
- - [Creating a Declarative UI Project](ui/ui-ts-creating-project.md)
- - [Getting to Know Components](ui/ui-ts-components.md)
- - [Creating a Simple Page](ui/ui-ts-creating-simple-page.md)
- - Defining Page Layout and Connection
- - [Building a Food Data Model](ui/ui-ts-building-data-model.md)
- - [Building a Food Category List Layout](ui/ui-ts-building-category-list-layout.md)
- - [Building a Food Category Grid Layout](ui/ui-ts-building-category-grid-layout.md)
- - [Implementing Page Redirection and Data Transmission](ui/ui-ts-page-redirection-data-transmission.md)
- - Basic Functions
- - Agent-Powered Scheduled Reminders
- - [Overview](background-agent-scheduled-reminder/background-agent-scheduled-reminder-overview.md)
- - [Development Guidelines](background-agent-scheduled-reminder/background-agent-scheduled-reminder-guide.md)
- - Background Task Management
- - [Background Task Management Overview](background-task-management/background-task-overview.md)
- - [Background Task Management Development](background-task-management/background-task-dev-guide.md)
- - WebGL
- - [WebGL Overview](webgl/webgl-overview.md)
- - [WebGL Development](webgl/webgl-guidelines.md)
- - Media
- - Audio
- - [Audio Overview](media/audio-overview.md)
- - [Audio Playback Development](media/audio-playback.md)
- - [Audio Playback Development Using AudioRenderer](media/audio-renderer.md)
- - [Audio Recording Development](media/audio-recorder.md)
- - [Audio Recorder Development Using AudioCapturer](media/audio-capturer)
- - Video
- - [Video Playback Development](media/video-playback.md)
- - [Video Recording Development](media/video-recorder.md)
- - Security
- - User Authentication
- - [User Authentication Overview](security/userauth-overview.md)
- - [User Authentication Development](security/userauth-guidelines.md)
- - Connectivity
- - IPC & RPC
- - [IPC & RPC Overview](connectivity/ipc-rpc-overview.md)
- - [IPC & RPC Development Guidelines](connectivity/ipc-rpc-development-guideline.md)
- - [Subscribing to State Changes of a Remote Object](connectivity/subscribe-remote-state.md)
- - Data Management
- - Distributed Data Service
- - [Distributed Data Service Overview](database/database-mdds-overview.md)
- - [Distributed Data Service Development](database/database-mdds-guidelines.md)
- - Relational Database Overview
- - [RDB Overview](database/database-relational-overview.md)
- - [RDB Development](database/database-relational-guidelines.md)
- - Lightweight Data Store
- - [Lightweight Data Store Overview](database/database-preference-overview.md)
- - [Lightweight Data Store Development](database/database-preference-guidelines.md)
- - Device
- - USB Service
- - [USB Service Overview](device/usb-overview.md)
- - [USB Service Development](device/usb-guidelines.md)
- - Location
- - [Location Overview](device/device-location-overview.md)
- - [Obtaining Device Location Information](device/device-location-info.md)
- - [Geocoding and Reverse Geocoding Capabilities](device/device-location-geocoding.md)
- - DFX
- - Application Event Logging
- - [Overview of Application Event Logging](dfx/hiappevent-overview.md)
- - [Development Guidelines on Application Event Logging](dfx/hiappevent-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)
-- Hands-On Tutorials
- - [Samples](https://gitee.com/openharmony/app_samples/blob/master/README.md)
-- API References
- - Compent Reference (JavaScript-based Web-like Development Paradigm)
- - [Components](reference/arkui-js/js-components.md)
- - [Common](reference/arkui-js/js-components-common.md)
- - [Universal Attributes](reference/arkui-js/js-components-common-attributes.md)
- - [Universal Styles](reference/arkui-js/js-components-common-styles.md)
- - [Universal Events](reference/arkui-js/js-components-common-events.md)
- - [Universal Methods](reference/arkui-js/js-components-common-methods.md)
- - [Animation Styles](reference/arkui-js/js-components-common-animation.md)
- - [Gradient Styles](reference/arkui-js/js-components-common-gradient.md)
- - [Transition Styles](reference/arkui-js/js-components-common-transition.md)
- - [Custom Font Styles](reference/arkui-js/js-components-common-customizing-font.md)
- - [Atomic Layout](reference/arkui-js/js-components-common-atomic-layout.md)
- - [Container Component](reference/arkui-js/js-components-container.md)
- - [badge](reference/arkui-js/js-components-container-badge.md)
- - [dialog](reference/arkui-js/js-components-container-dialog.md)
- - [div](reference/arkui-js/js-components-container-div.md)
- - [form](reference/arkui-js/js-components-container-form.md)
- - [list](reference/arkui-js/js-components-container-list.md)
- - [list-item](reference/arkui-js/js-components-container-list-item.md)
- - [list-item-group](reference/arkui-js/js-components-container-list-item-group.md)
- - [panel](reference/arkui-js/js-components-container-panel.md)
- - [popup](reference/arkui-js/js-components-container-popup.md)
- - [refresh](reference/arkui-js/js-components-container-refresh.md)
- - [stack](reference/arkui-js/js-components-container-stack.md)
- - [stepper](reference/arkui-js/js-components-container-stepper.md)
- - [stepper-item](reference/arkui-js/js-components-container-stepper-item.md)
- - [swiper](reference/arkui-js/js-components-container-swiper.md)
- - [tabs](reference/arkui-js/js-components-container-tabs.md)
- - [tab-bar](reference/arkui-js/js-components-container-tab-bar.md)
- - [tab-content](reference/arkui-js/js-components-container-tab-content.md)
- - [Basic Components](reference/arkui-js/js-components-basic.md)
- - [button](reference/arkui-js/js-components-basic-button.md)
- - [chart](reference/arkui-js/js-components-basic-chart.md)
- - [divider](reference/arkui-js/js-components-basic-divider.md)
- - [image](reference/arkui-js/js-components-basic-image.md)
- - [image-animator](reference/arkui-js/js-components-basic-image-animator.md)
- - [input](reference/arkui-js/js-components-basic-input.md)
- - [label](reference/arkui-js/js-components-basic-label.md)
- - [marquee](reference/arkui-js/js-components-basic-marquee.md)
- - [menu](reference/arkui-js/js-components-basic-menu.md)
- - [option](reference/arkui-js/js-components-basic-option.md)
- - [picker](reference/arkui-js/js-components-basic-picker.md)
- - [picker-view](reference/arkui-js/js-components-basic-picker-view.md)
- - [piece](reference/arkui-js/js-components-basic-piece.md)
- - [progress](reference/arkui-js/js-components-basic-progress.md)
- - [qrcode](reference/arkui-js/js-components-basic-qrcode.md)
- - [rating](reference/arkui-js/js-components-basic-rating.md)
- - [richtext](reference/arkui-js/js-components-basic-richtext.md)
- - [search](reference/arkui-js/js-components-basic-search.md)
- - [select](reference/arkui-js/js-components-basic-select.md)
- - [slider](reference/arkui-js/js-components-basic-slider.md)
- - [span](reference/arkui-js/js-components-basic-span.md)
- - [switch](reference/arkui-js/js-components-basic-switch.md)
- - [text](reference/arkui-js/js-components-basic-text.md)
- - [textarea](reference/arkui-js/js-components-basic-textarea.md)
- - [toolbar](reference/arkui-js/js-components-basic-toolbar.md)
- - [toolbar-item](reference/arkui-js/js-components-basic-toolbar-item.md)
- - [toggle](reference/arkui-js/js-components-basic-toggle.md)
- - [Media Components](reference/arkui-js/js-components-media.md)
- - [video](reference/arkui-js/js-components-media-video.md)
- - [Canvas Components](reference/arkui-js/js-components-canvas.md)
- - [canvas](reference/arkui-js/js-components-canvas-canvas.md)
- - [CanvasRenderingContext2D](reference/arkui-js/js-components-canvas-canvasrenderingcontext2d.md)
- - [Image](reference/arkui-js/js-components-canvas-image.md)
- - [CanvasGradient](reference/arkui-js/js-components-canvas-canvasgradient.md)
- - [ImageData](reference/arkui-js/js-components-canvas-imagedata.md)
- - [Path2D](reference/arkui-js/js-components-canvas-path2d.md)
- - [ImageBitmap](reference/arkui-js/js-components-canvas-imagebitmap.md)
- - [OffscreenCanvas](reference/arkui-js/js-components-canvas-offscreencanvas.md)
- - [OffscreenCanvasRenderingContext2D](reference/arkui-js/js-offscreencanvasrenderingcontext2d.md)
- - [Grid](reference/arkui-js/js-components-grid.md)
- - [Basic Concepts](reference/arkui-js/js-components-grid-basic-concepts.md)
- - [grid-container](reference/arkui-js/js-components-grid-container.md)
- - [grid-row](reference/arkui-js/js-components-grid-row.md)
- - [grid-col](reference/arkui-js/js-components-grid-col.md)
- - [SVG Components](reference/arkui-js/js-svg.md)
- - [Universal Attributes](reference/arkui-js/js-components-svg-common-attributes.md)
- - [svg](reference/arkui-js/js-components-svg.md)
- - [rect](reference/arkui-js/js-components-svg-rect.md)
- - [circle](reference/arkui-js/js-components-svg-circle.md)
- - [ellipse](reference/arkui-js/js-components-svg-ellipse.md)
- - [path](reference/arkui-js/js-components-svg-path.md)
- - [line](reference/arkui-js/js-components-svg-line.md)
- - [polyline](reference/arkui-js/js-components-svg-polyline.md)
- - [polygon](reference/arkui-js/js-components-svg-polygon.md)
- - [text](reference/arkui-js/js-components-svg-text.md)
- - [tspan](reference/arkui-js/js-components-svg-tspan.md)
- - [textPath](reference/arkui-js/js-components-svg-textpath.md)
- - [animate](reference/arkui-js/js-components-svg-animate.md)
- - [animateMotion](reference/arkui-js/js-components-svg-animatemotion.md)
- - [animateTransform](reference/arkui-js/js-components-svg-animatetransform.md)
- - [Custom Components](reference/arkui-js/js-components-custom.md)
- - [Basic Usage](reference/arkui-js/js-components-custom-basic-usage.md)
- - [Custom Events](reference/arkui-js/js-components-custom-events.md)
- - [props](reference/arkui-js/js-components-custom-props.md)
- - [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](reference/arkui-js/js-appendix.md)
- - [Type Attributes](reference/arkui-js/js-appendix-types.md)
- - Compent Reference (TypeScript-based Declarative Development Paradigm)
- - [Components](reference/arkui-ts/ts-components.md)
- - [Universal Components](reference/arkui-ts/ts-universal-components.md)
- - [Universal Events](reference/arkui-ts/ts-universal-events.md)
- - [Click Event](reference/arkui-ts/ts-universal-events-click.md)
- - [Touch](reference/arkui-ts/ts-universal-events-touch.md)
- - [Show/Hide Event](reference/arkui-ts/ts-universal-events-show-hide.md)
- - [Key Event](reference/arkui-ts/ts-universal-events-key.md)
- - [Component Area Change Event](reference/arkui-ts/ts-universal-events-component-area-change.md)
- - [Universal Attributes](reference/arkui-ts/ts-universal-attributes.md)
- - [Size](reference/arkui-ts/ts-universal-attributes-size.md)
- - [Location](reference/arkui-ts/ts-universal-attributes-location.md)
- - [Layout Constraints](reference/arkui-ts/ts-universal-attributes-layout-constraints.md)
- - [Flex Layout](reference/arkui-ts/ts-universal-attributes-flex-layout.md)
- - [Border Configuration](reference/arkui-ts/ts-universal-attributes-border.md)
- - [Background](reference/arkui-ts/ts-universal-attributes-background.md)
- - [Opacity](reference/arkui-ts/ts-universal-attributes-opacity.md)
- - [Visibility](reference/arkui-ts/ts-universal-attributes-visibility.md)
- - [Enable/Disable](reference/arkui-ts/ts-universal-attributes-enable.md)
- - [Overlay](reference/arkui-ts/ts-universal-attributes-overlay.md)
- - [Z-order Control](reference/arkui-ts/ts-universal-attributes-z-order.md)
- - [Transformation](reference/arkui-ts/ts-universal-attributes-transformation.md)
- - [Image Effect Configuration](reference/arkui-ts/ts-universal-attributes-image-effect.md)
- - [Shape Clipping](reference/arkui-ts/ts-universal-attributes-sharp-clipping.md)
- - [Text Style](reference/arkui-ts/ts-universal-attributes-text-style.md)
- - [Grid](reference/arkui-ts/ts-universal-attributes-grid.md)
- - [Gradient Color](reference/arkui-ts/ts-universal-attributes-gradient-color.md)
- - [Popup Control](reference/arkui-ts/ts-universal-attributes-popup.md)
- - [Menu Control](reference/arkui-ts/ts-universal-attributes-menu.md)
- - [Click Control](reference/arkui-ts/ts-universal-attributes-touchable.md)
- - [Touch Target](reference/arkui-ts/ts-universal-attributes-response-region.md)
- - [Gesture Processing](reference/arkui-ts/ts-gesture-processing.md)
- - [Gesture Binding Methods](reference/arkui-ts/ts-gesture-settings.md)
- - [Basic Gestures](reference/arkui-ts/ts-basic-gestures.md)
- - [TapGesture](reference/arkui-ts/ts-basic-gestures-tapgesture.md)
- - [LongPressGesture](reference/arkui-ts/ts-basic-gestures-longpressgesture.md)
- - [PanGesture](reference/arkui-ts/ts-basic-gestures-pangesture.md)
- - [PinchGesture](reference/arkui-ts/ts-basic-gestures-pinchgesture.md)
- - [RotationGesture](reference/arkui-ts/ts-basic-gestures-rotationgesture.md)
- - [SwipeGesture](reference/arkui-ts/ts-basic-gestures-swipegesture.md)
- - [Combined Gestures](reference/arkui-ts/ts-combined-gestures.md)
- - [Basic Components](reference/arkui-ts/ts-basic-components.md)
- - [Blank](reference/arkui-ts/ts-basic-components-blank.md)
- - [Button](reference/arkui-ts/ts-basic-components-button.md)
- - [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.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)
- - [Progress](reference/arkui-ts/ts-basic-components-progress.md)
- - [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
- - [Rating](reference/arkui-ts/ts-basic-components-rating.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)
- - [Text](reference/arkui-ts/ts-basic-components-text.md)
- - [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
- - [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
- - [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
- - [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- - [Container Components](reference/arkui-ts/ts-components-container.md)
- - [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
- - [Badge](reference/arkui-ts/ts-container-badge.md)
- - [Column](reference/arkui-ts/ts-container-column.md)
- - [ColumnSplit](reference/arkui-ts/ts-container-columnsplit.md)
- - [Counter](reference/arkui-ts/ts-container-counter.md)
- - [Flex](reference/arkui-ts/ts-container-flex.md)
- - [GridContainer](reference/arkui-ts/ts-container-gridcontainer.md)
- - [Grid](reference/arkui-ts/ts-container-grid.md)
- - [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)
- - [Panel](reference/arkui-ts/ts-container-panel.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)
- - [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)
- - [Drawing Components](reference/arkui-ts/ts-drawing-components.md)
- - [Circle](reference/arkui-ts/ts-drawing-components-circle.md)
- - [Ellipse](reference/arkui-ts/ts-drawing-components-ellipse.md)
- - [Line](reference/arkui-ts/ts-drawing-components-line.md)
- - [Polyline](reference/arkui-ts/ts-drawing-components-polyline.md)
- - [Polygon](reference/arkui-ts/ts-drawing-components-polygon.md)
- - [Path](reference/arkui-ts/ts-drawing-components-path.md)
- - [Rect](reference/arkui-ts/ts-drawing-components-rect.md)
- - [Shape](reference/arkui-ts/ts-drawing-components-shape.md)
- - [Canvas Components](reference/arkui-ts/ts-components-canvas.md)
- - [Canvas](reference/arkui-ts/ts-components-canvas-canvas.md)
- - [CanvasRenderingContext2D](reference/arkui-ts/ts-canvasrenderingcontext2d.md)
- - [OffscreenCanvasRenderingConxt2D](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md)
- - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md)
- - [Path2D](reference/arkui-ts/ts-components-canvas-path2d.md)
- - [CanvasGradient](reference/arkui-ts/ts-components-canvas-canvasgradient.md)
- - [ImageBitmap](reference/arkui-ts/ts-components-canvas-imagebitmap.md)
- - [ImageData](reference/arkui-ts/ts-components-canvas-imagedata.md)
- - [Animation](reference/arkui-ts/ts-animation.md)
- - [Attribute Animation](reference/arkui-ts/ts-animatorproperty.md)
- - [Explicit Animation](reference/arkui-ts/ts-explicit-animation.md)
- - [Transition Animation](reference/arkui-ts/ts-transition-animation.md)
- - [Page Transition](reference/arkui-ts/ts-page-transition-animation.md)
- - [Component Transition](reference/arkui-ts/ts-transition-animation-component.md)
- - [Transition of Shared Elements](reference/arkui-ts/ts-transition-animation-shared-elements.md)
- - [Motion Path Animation](reference/arkui-ts/ts-motion-path-animation.md)
- - [Matrix Transformation](reference/arkui-ts/ts-matrix-transformation.md)
- - [Interpolation Calculation](reference/arkui-ts/ts-interpolation-calculation.md)
- - [Global UI Methods](reference/arkui-ts/ts-global-ui-methods.md)
- - [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
- - [Custom Dialog box](reference/arkui-ts/ts-methods-custom-dialog-box.md)
- - [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
- - [Media Query](reference/arkui-ts/ts-methods-media-query.md)
- - [List Selection Dialog Box](reference/arkui-ts/ts-methods-action-sheet.md)
- - [Appendix](reference/arkui-ts/ts-appendix.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)
- - Media
- - [Audio Management](reference/apis/js-apis-audio.md)
- - [Media](reference/apis/js-apis-media.md)
- - Security
- - [User Authentication](reference/apis/js-apis-useriam-userauth.md)
- - [Access Control](reference/apis/js-apis-abilityAccessCtrl.md)
- - Data Management
- - [Lightweight Storage (deprecated since 8)](reference/apis/js-apis-data-storage.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)
- - 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
- - [Distributed Account Management](reference/apis/js-apis-distributed-account.md)
- - [App Account Management](reference/apis/js-apis-appAccount.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)
- - 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)
- - 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)
- - [Pop-up Window](reference/apis/js-apis-basic-features-pop-up.md)
- - [Application Configuration](reference/apis/js-apis-basic-features-configuration.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)
- - 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)
- - 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)
\ No newline at end of file
+# Learn About OpenHarmony
+
+- [OpenHarmony Project](OpenHarmony-Overview.md)
+- [Glossary](device-dev/glossary/glossary.md)
+- OpenHarmony Release Notes
+ - OpenHarmony 3.x Releases
+ - [OpenHarmony v3.1 Beta (2021-12-31)](release-notes/OpenHarmony-v3.1-beta.md)
+ - [OpenHarmony v3.0.1 LTS (2022-01-12)](release-notes/OpenHarmony-v3.0.1-LTS.md)
+ - [OpenHarmony v3.0 LTS (2021-09-30)](release-notes/OpenHarmony-v3.0-LTS.md)
+
+ - OpenHarmony 2.x Releases
+ - [OpenHarmony v2.2 beta2 (2021-08-04)](release-notes/OpenHarmony-v2.2-beta2.md)
+ - [OpenHarmony 2.0 Canary (2021-06-01)](release-notes/OpenHarmony-2-0-Canary.md)
+
+ - OpenHarmony 1.x Releases
+ - [OpenHarmony v1.1.4 LTS (2022-02-11)](release-notes/OpenHarmony-v1-1-4-LTS.md)
+ - [OpenHarmony v1.1.3 LTS (2021-09-30)](release-notes/OpenHarmony-v1-1-3-LTS.md)
+ - [OpenHarmony v1.1.2 LTS (2021-08-04)](release-notes/OpenHarmony-v1.1.2-LTS.md)
+ - [OpenHarmony 1.1.1 LTS (2021-06-22)](release-notes/OpenHarmony-1-1-1-LTS.md)
+ - [OpenHarmony 1.1.0 LTS (2021-04-01)](release-notes/OpenHarmony-1-1-0-LTS.md)
+ - [OpenHarmony 1.0 (2020-09-10)](release-notes/OpenHarmony-1-0.md)
+- Contribution
+ - [Contribution](contribute/contribution.md)
+ - [Code of Conduct](contribute/code-of-conduct.md)
+ - [Code Contribution](contribute/code-contribution.md)
+ - [Contribution Process](contribute/contribution-process.md)
+ - [Auto-Test](readme/test_subsystem.md)
+ - [Documentation Contribution](contribute/documentation-contribution.md)
+ - [Writing Instructions](contribute/writing-instructions.md)
+ - [Communication in Community](contribute/communication-in-community.md)
+ - [FAQs](contribute/FAQ.md)
\ No newline at end of file
diff --git a/zh-cn/OpenHarmony-Overview_zh.md b/zh-cn/OpenHarmony-Overview_zh.md
index f7e698c5051ce34b1848af423eb8c80805284e07..a20a54b234aa6cc76ec2c62464fbe831d22b96ac 100644
--- a/zh-cn/OpenHarmony-Overview_zh.md
+++ b/zh-cn/OpenHarmony-Overview_zh.md
@@ -1,4 +1,4 @@
-# OpenHarmony开源项目
+# OpenHarmony开源项目
- [项目介绍](#section1270210396435)
- [技术架构](#section2502124574318)
@@ -346,7 +346,10 @@ OpenHarmony支持如下几种系统类型:
## 快速入门
-入口:[device-dev/quick-start/Readme-CN.md](device-dev/quick-start/Readme-CN.md)
+- 设备开发快速入门:[device-dev/quick-start/Readme-CN.md](device-dev/quick-start/Readme-CN.md)
+- 应用开发快速入门:[application-dev/quick-start/Readme-CN.md](application-dev/quick-start/Readme-CN.md)
+
+
## 代码仓地址
diff --git a/zh-cn/application-dev/ability/Readme-CN.md b/zh-cn/application-dev/ability/Readme-CN.md
index f3b879e4b906488fff13331e10d006dcd98f0a51..98d1c3389afdb77a5df81a32eb38e4f4ae599b1f 100644
--- a/zh-cn/application-dev/ability/Readme-CN.md
+++ b/zh-cn/application-dev/ability/Readme-CN.md
@@ -1,5 +1,6 @@
# Ability开发
- [Ability框架概述](ability-brief.md)
+
- FA模型
- [FA模型综述](fa-brief.md)
- [PageAbility开发指导](fa-pageability.md)
@@ -7,12 +8,10 @@
- [DataAbility开发指导](fa-dataability.md)
- [FormAbility开发指导](fa-formability.md)
- Stage模型
- - [Stage模型综述](stage-brief.md)
- [Ability开发指导](stage-ability.md)
- [ServiceExtensionAbility开发指导](stage-serviceextension.md)
- - [FormExtensionAbility开发指导](stage-formextension.md)
- - [应用迁移开发指导](stage-ability-continuation.md)
+ - [跨端迁移开发指导](stage-ability-continuation.md)
- [Call调用开发指导](stage-call.md)
- 其他
- - [WantAgent使用指导](wantagent.md)
- - [Ability助手使用指导](ability-assistant-guidelines.md)
\ No newline at end of file
+ - [Ability助手使用指导](ability-assistant-guidelines.md)
+ - [测试框架使用指导](ability-delegator.md)
\ No newline at end of file
diff --git a/zh-cn/application-dev/ability/ability-delegator.md b/zh-cn/application-dev/ability/ability-delegator.md
new file mode 100755
index 0000000000000000000000000000000000000000..891e6642e5015a6a860d0f1b566003b9cfe4fbfe
--- /dev/null
+++ b/zh-cn/application-dev/ability/ability-delegator.md
@@ -0,0 +1,129 @@
+# 测试框架使用指导
+
+Delegator测试框架是OpenHarmony提供的一套开发者应用自测试框架,旨在为开发者提供针对应用的自测试环境。开发者可以通过delegator类启动对应Ability,并通过Delegator类提供的能力对Ability进行生命周期切换和监听,同时支持shellCMD输入和测试结果打印显示等功能。
+
+## 测试框架启动
+
+测试框架启动有两种方式,方式一:通过aa test命令启动,方式二:通过IDE启动。
+### aa test启动
+
+开发者可通过 aa test 命令启动启动测试框架,开发者可以自行指定使用的runner以及runner所在hap包的package name/module name,具体命令示例如下:
+
+**FA模型:**
+
+```javascript
+aa test -p com.example.myapplicationfaets -s unittest OpenHarmonyTestRunner -s class ActsAbilityTest -w 20
+```
+
+**Stage模型:**
+```javascript
+aa test -m com.example.myapplicationfaets -s unittest OpenHarmonyTestRunner -s class ActsAbilityTest -w 20
+```
+| 参数 | 是否必选 | 参数说明 |
+| --------------- | -------- | ------------------------------------------------------------ |
+| -p | 是 | TestRunner所在hap包的package name,FA模型使用。 |
+| -m | 是 | TestRunner所在hap包的module name,stage模型使用。 |
+| -s unittest | 是 | 启用的TestRunner名称,TestRunner名称和文件名需要保持一致。 |
+| -w | 否 | 测试用例超时时间,如果未指定,测试框架会一直等待测试代码调用finishTest才退出。 |
+| -s | 否 | 支持以key-value的方式输入任何参数,输入的参数可通过AbilityDelegatorArgs.parameters以key-value的方式获取。 |
+
+### IDE启动
+
+IDE文档中介绍,待IDE文档上库补充链接。
+
+## TestRunner介绍
+
+TestRunner是测试框架测试流程入口类,当测试流程启动时,系统会调用TestRunner内相关接口,开发者需要派生该类,并重写onPrepare、onRun方法。IDE在创建应用模板时会初始化一个默认TestRunner,并在onRun方法启动默认的TestAbility。开发者也可以修改TestAbility测试代码内容,也可以修改默认的TestRunner内onPrepare、onRun方法,自行实现测试代码。具体详细内容请参考TestRunnerAPI接口说明[TestRunner](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-testRunner.md)。
+
+## AbilityMonitor介绍
+
+AbilityMonitor是测试框架提供用来绑定并监听Ability类,开发者可以使用AbilityMonitor绑定Ability,并将AbilityMonitor添加到监听列表。绑定后Ability的创建、生命周期变化等会触发AbilityMonitor内相关回调函数,开发者可以在对应回调函数内进行测试验证。具体详细内容请参考AbilityMonitor API接口说明[AbilityMonitor](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-abilityMonitor.md)。
+
+**示例**
+
+```javascript
+import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+
+function onAbilityCreateCallback() {
+ console.info("onAbilityCreateCallback");
+}
+
+var monitor = {
+ abilityName: "abilityname",
+ onAbilityCreate: onAbilityCreateCallback
+}
+
+var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+abilityDelegator.addAbilityMonitor(monitor).then((void) => {
+ console.info("addAbilityMonitor promise");
+});
+```
+
+## AbilityDelegator介绍
+
+AbilityDelegator是测试框架主要功能类,提供了启动Ability、获取Ability示例、调度Ability生命周期、对Ability生命周期进行监听、打印测试结果等功能。
+
+**导入模块**
+
+```javascript
+import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
+```
+
+```javascript
+var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
+```
+
+### 启动Ability并监听Ability状态变化
+
+配合AbilityMonitor使用,可以实现对Ability启动、Ability实例获取、监听状态变化功能。
+
+**示例:**
+
+```javascript
+var abilityDelegator;
+var ability;
+var timeout = 100;
+
+function onAbilityCreateCallback() {
+ console.info("onAbilityCreateCallback");
+}
+
+var monitor = {
+ abilityName: "abilityname",
+ onAbilityCreate: onAbilityCreateCallback
+}
+
+abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+abilityDelegator.waitAbilityMonitor(monitor, timeout, (err, data) => {
+ ability = data;
+ console.info("waitAbilityMonitor callback");
+});
+
+var want = {
+ bundleName: "bundleName",
+ abilityName: "abilityName"
+};
+
+abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+abilityDelegator.startAbility(want, (err, data) => {
+ console.info("startAbility callback");
+});
+```
+
+### 调度Ability生命周期
+
+AbilityDelegator提供对Ability生命周期进行显示调度,支持Foreground、Background,配合AbilityMonitor中对Ability生命周期监听方法,可以完整的测试Ability生命周期变化。具体详细内容请参考AbilityDelegator API接口说明[AbilityDelegator](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-abilityDelegator.md#abilitydelegator)。
+
+### 执行shellCMD命令
+
+AbilityDelegator提供执行shellCMD命令功能,开发者可以在测试代码中执行shell命令,该功能仅在测试环境中生效,非测试环境该接口调用无效果。
+**示例:**
+
+```javascript
+ var abilityDelegator;
+ var cmd = "cmd";
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ abilityDelegator.executeShellCommand(cmd, (err,data) => {
+ console.info("executeShellCommand callback");
+ });
+```
\ No newline at end of file
diff --git a/zh-cn/application-dev/ability/fa-pageability.md b/zh-cn/application-dev/ability/fa-pageability.md
index be05ac164e0c7d39c4f409b122fe5178f07f1a94..0c8426bcc7ff3e2badadc7437ad76b9dc052c5dd 100644
--- a/zh-cn/application-dev/ability/fa-pageability.md
+++ b/zh-cn/application-dev/ability/fa-pageability.md
@@ -1,14 +1,14 @@
# PageAbility开发指导
-## PageAbility介绍
+## 概述
+### 功能简介
+PageAbility是具备ArkUI的Ability,是用户具体可见并可以交互的Ability实例,开发者通过IDE创建Ability时,IDE会自动创建相关模板代码。PageAbility相关能力通过单例featureAbility暴露,生命周期相关回调通过app.js/app.ets中回调函数暴露。
-Page模板(以下简称“Page”)是FA唯一支持的模板,用于提供与用户交互的能力。
-
-## PageAbility的生命周期
+### PageAbility的生命周期
**Ability生命周期介绍**(Ability Life Cycle)是Ability被调度到INACTIVE、ACTIVE、BACKGROUND等各个状态的统称(主要涉及PageAbility类型和ServiceAbility类型的Ability)。
- - **PageAbility类型的Ability生命周期流转如下图所示**
+**PageAbility生命周期流转如下图所示**

@@ -25,76 +25,32 @@ Page模板(以下简称“Page”)是FA唯一支持的模板,用于提供
- **BACKGROUND**: 后台状态,表示当前Ability退到后台,Ability在被销毁后由BACKGROUND状态进入INITIAL状态,或者重新被激活后由BACKGROUND状态进入ACTIVE状态。
-**PageAbility类型Ability生命周期回调如下图所示:**
+**PageAbility生命周期回调如下图所示:**

-PageAbility提供如下生命周期回调,开发者可以在 app.js/app.ets 中重写生相关命周期函数 。
-
-* onShow()
-
- Ability由后台不可见状态切换到前台可见状态调用onShow方法,此时用户在屏幕可以看到该Ability。
-
-* onHide()
-
- Ability由前台切换到后台不可见状态时调用onHide方法,此时用户在屏幕看不到该Ability。
-
-* onDestroy()
-
- 应用退出,销毁Ability对象前调用onDestroy方法,开发者可以在该方法里做一些回收资源、清空缓存等应用退出前的准备工作。
-
-* onCreate()
-
- Ability第一次启动创建Ability时调用onCreate方法,开发者可以在该方法里做一些应用初始化工作。
+PageAbility提供命周期回调,开发者可以在 app.js/app.ets 中重写生相关命周期函数 。
-* onInactive()
+## 开发指导
+### featureAbility接口说明
- Ability失去焦点时调用onInactive方法,Ability在进入后台状态时会先失去焦点,再进入后台。
+**表1** featureAbility接口介绍
-* onActive()
+| 接口名 | 描述 |
+| --------------------------------------------------- | --------------- |
+| void startAbility(parameter: StartAbilityParameter) | 启动Ability |
+| Context getContext(): | 获取应用Context |
+| void terminateSelf() | 结束Ability |
+| bool hasWindowFocus() | 是否获取焦点 |
- Ability切换到前台,并且已经获取焦点时调用onActive方法。
-
-* 示例
-
-```javascript
-export default {
- onCreate() {
- console.info('Application onCreate')
- },
- onDestroy() {
- console.info('Application onDestroy')
- },
- onShow(){
- console.info('Application onShow')
- },
- onHide(){
- console.info('Application onHide')
- },
- onInactive(){
- console.info('Application onInactive')
- },
- onActive(){
- console.info('Application onActive')
- },
-}
-```
-## 启动本地PageAbility
+### 启动本地PageAbility
- * 导入模块
+* 导入模块
```
import featureAbility from '@ohos.ability.featureAbility'
```
-```
- featureAbility.startAbility(parameter: StartAbilityParameter, callback: AsyncCallback)
-```
-
-* 接口说明
-
- 启动新的ability(callback形式)
-
* 示例
```javascript
@@ -158,7 +114,7 @@ featureAbility.startAbility({
},
);
```
-## 启动远程PageAbility
+### 启动远程PageAbility
* 导入模块
@@ -166,14 +122,6 @@ featureAbility.startAbility({
import featureAbility from '@ohos.ability.featureAbility'
```
-```
-featureAbility.startAbility(parameter: StartAbilityParameter)
-```
-* 接口说明
-
- 启动远程的ability(promise形式)
- 前提:通过deviceManager获取远程deviceid
-
* 示例
```javascript
@@ -186,4 +134,46 @@ var promise = await featureAbility.startAbility({
},
}
);
-```
\ No newline at end of file
+```
+### 生命周期接口说明
+**表2** 生命周期回调函数介绍
+
+| 接口名 | 描述 |
+| ------------ | ------------------------------------------------------------ |
+| onShow() | Ability由后台不可见状态切换到前台可见状态调用onShow方法,此时用户在屏幕可以看到该Ability |
+| onHide() | Ability由前台切换到后台不可见状态时调用onHide方法,此时用户在屏幕看不到该Ability。 |
+| onDestroy() | 应用退出,销毁Ability对象前调用onDestroy方法,开发者可以在该方法里做一些回收资源、清空缓存等应用退出前的准备工作。 |
+| onCreate() | Ability第一次启动创建Ability时调用onCreate方法,开发者可以在该方法里做一些应用初始化工作。 |
+| onInactive() | Ability失去焦点时调用onInactive方法,Ability在进入后台状态时会先失去焦点,再进入后台。 |
+| onActive() | Ability切换到前台,并且已经获取焦点时调用onActive方法。 |
+
+* 示例
+开发者需要重写app.js/app.ets 中相关生命周期回调函数,IDE模板默认生成onCreate()和onDestroy()方法,其他方法需要开发者自行实现。
+```javascript
+export default {
+ onCreate() {
+ console.info('Application onCreate')
+ },
+ onDestroy() {
+ console.info('Application onDestroy')
+ },
+ onShow(){
+ console.info('Application onShow')
+ },
+ onHide(){
+ console.info('Application onHide')
+ },
+ onInactive(){
+ console.info('Application onInactive')
+ },
+ onActive(){
+ console.info('Application onActive')
+ },
+}
+```
+### 开发实例
+针对pageAbility开发,有以下示例工程可供参考:
+
+- [DMS](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS)
+
+在本示例中完整展示了启动本地Ability、启动远程Ability的使用方法。
\ No newline at end of file
diff --git a/zh-cn/application-dev/ability/figures/continuation-info.png b/zh-cn/application-dev/ability/figures/continuation-info.png
new file mode 100755
index 0000000000000000000000000000000000000000..69c38949921686520378a118df2e9f82912967a8
Binary files /dev/null and b/zh-cn/application-dev/ability/figures/continuation-info.png differ
diff --git a/zh-cn/application-dev/ability/stage-ability-continuation.md b/zh-cn/application-dev/ability/stage-ability-continuation.md
old mode 100644
new mode 100755
index 1c391834f07554f3744e31e8dff6b02e16d8e83d..b7e67a1b330d7277e522a4cca8038701994e87d6
--- a/zh-cn/application-dev/ability/stage-ability-continuation.md
+++ b/zh-cn/application-dev/ability/stage-ability-continuation.md
@@ -1,178 +1,232 @@
-# 应用迁移开发指导
+# 跨端迁移开发指导
## 场景介绍
-迁移的主要工作是实现将应用当前任务,包括页面部分数据、栈信息等,迁移到远端设备。迁移成功后,本端任务将被清除;若失败则不会,可允许再次迁移。
-
-
+迁移的主要工作是实现将应用当前任务,包括页面控件状态变量、分布式对象等,迁移到远端设备。页面控件状态变量用于同步页面UI数据,分布式对象用于同步内存中的数据。
## 接口说明
-迁移提供的能力如下,具体的API详见接口文档
+迁移提供的能力如下,具体的API详见[接口文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-ability.md)。
**表1** 应用迁移API接口功能介绍
|接口名 | 描述|
|:------ | :------|
-| onContinue(wantParams : {[key: string]: any}) | 迁移发起端在该回调中保存迁移所需要的数据,同时返回是否同意迁移:true表示同意,false表示拒绝。 |
+| onContinue(wantParams : {[key: string]: any}): OnContinueResult | 迁移**发起端**在该回调中保存迁移所需要的数据,同时返回是否同意迁移:0表示同意,拒绝返回相应错误码。 |
+| onCreate(want: Want,param:LaunchParam): void | 迁移**目标端**在该回调中完成数据恢复,并触发页面恢复。 |
+| **enum** OnContinueResult | onContinue的返回值类型:AGREE表示同意;REJECT表示拒绝;MISMATCH表示版本不匹配 |
-## 开发步骤
+**图1** 迁移开发示意图
-### 迁移应用
+
+## 开发步骤
+### 迁移应用
1. 配置
- 配置应用支持迁移
- 在config.json中配置continuable字段:true表示支持迁移,false表示不支持,默认为false.
+ 在module.json5中配置continuable字段:true表示支持迁移,false表示不支持,默认为false。配置为false的应用将被系统识别为无法迁移。
- ```
+ ```javascript
"continuable": true
```
- 配置为false的应用将无法在任务中心进行迁移。
+
* 配置应用启动类型
- 迁移当前只支持多实例应用,需要在在config.json中配置launchType字段为standard
+ 迁移当前只支持多实例应用,需要在在module.json5中配置launchType字段为standard
- ```
+ ```javascript
"launchType": "standard"
```
+
+
+ * 申请分布式权限
+
+ 支持跨端迁移的应用需要在module.json5申请分布式权限 DISTRIBUTED_DATASYNC。
+
+ ```javascript
+ "requestPermissions": [
+ {
+ "name": "ohos.permission.DISTRIBUTED_DATASYNC"
+ },
+ ```
+
+ 这个权限需要在应用首次启动的时候弹窗让用户授予,可以通过在ability的onWindowStageCreate中添加如下代码实现
+
+ ```javascript
+ requestPermissions = async () => {
+ let permissions: Array = [
+ "ohos.permission.DISTRIBUTED_DATASYNC"
+ ];
+ let needGrantPermission = false
+ let accessManger = accessControl.createAtManager()
+ Logger.info("app permission get bundle info")
+ let bundleInfo = await bundle.getApplicationInfo(BUNDLE_NAME, 0, 100)
+ Logger.info(`app permission query permission ${bundleInfo.accessTokenId.toString()}`)
+ for (const permission of permissions) {
+ Logger.info(`app permission query grant status ${permission}`)
+ try {
+ let grantStatus = await accessManger.verifyAccessToken(bundleInfo.accessTokenId, permission)
+ if (grantStatus === PERMISSION_REJECT) {
+ needGrantPermission = true
+ break;
+ }
+ } catch (err) {
+ Logger.error(`app permission query grant status error ${permission} ${JSON.stringify(err)}`)
+ needGrantPermission = true
+ break;
+ }
+ }
+ if (needGrantPermission) {
+ Logger.info("app permission needGrantPermission")
+ try {
+ await this.context.requestPermissionsFromUser(permissions)
+ } catch (err) {
+ Logger.error(`app permission ${JSON.stringify(err)}`)
+ }
+ } else {
+ Logger.info("app permission already granted")
+ }
+ }
+ ```
+
-2. 实现onContinue接口
+2. 实现onContinue接口
- 导入模块
+ onContinue接口在**发起端**被调用,主要用于在迁移发起时,通知开发者保存控件状态变量和内存中数据,准备迁移。当应用准备完成后,需要返回OnContinueResult.AGREE(0)表示同意迁移,否则返回相应的错误码拒绝迁移。如果不实现该接口,系统将默认为拒绝迁移。
- ```
+ 导入模块
+
+ ```javascript
import Ability from '@ohos.application.Ability';
+ import AbilityConstant from '@ohos.application.AbilityConstant';
```
-
- - 要实现迁移,此接口必须实现并返回true,否则默认为拒绝迁移。
+
+ - 要实现迁移,此接口必须实现并返回AGREE,否则默认为拒绝迁移。
- 示例
```javascript
- onContinue(wantParams : {[key: string]: any}) {
- console.log("MainAbility onContinue")
- return true;
- }
+ onContinue(wantParam : {[key: string]: any}) {
+ Logger.info("onContinue using distributedObject")
+ // set user input data into want params
+ wantParam["input"] = AppStorage.Get('ContinueInput');
+ Logger.info(`onContinue input = ${wantParam["input"]}`);
+ return AbilityConstant.OnContinueResult.AGREE
+ }
```
3. 在onCreate接口中实现迁移逻辑
- - 远端设备上,在onCreate中根据launchReason判断该次启动是否为迁移LaunchReason.CONTINUATION(3)
+ onCreate接口在迁移**目标端**被调用,在目标端ability被拉起时,通知开发者同步已保存的内存数据和控件状态,完成后触发页面的恢复。如果不实现该接口中迁移相关逻辑,ability将会作为普通的启动方式拉起,无法恢复页面。
+ - 远端设备上,在onCreate中根据launchReason判断该次启动是否为迁移LaunchReason.CONTINUATION
+
- 完成数据恢复后,开发者需要调用**restoreWindowStage**来触发页面恢复。
-
+
* 示例
```javascript
- onCreate(want , launchParam) {
- // Ability is creating, initialize resources for this ability
- console.log("MainAbility onCreate", launchParam.launchReason);
- if (launchParam.launchReason == LaunchReason.CONTINUATION) {
- this.contentStorage = new ContenStorage();
+ onCreate(want, launchParam) {
+ Logger.info(`MainAbility onCreate ${AbilityConstant.LaunchReason.CONTINUATION}`)
+ globalThis.abilityWant = want;
+ if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) {
+ let input = want.parameters.input // get user data from want params
+ AppStorage.SetOrCreate('ContinueInput', input)
+ Logger.info(`onCreate for continuation sessionId: ${this.sessionId}`)
+
+ this.contentStorage = new ContentStorage();
this.context.restoreWindowStage(this.contentStorage);
}
}
-
```
### 迁移数据
-1. 使用自定义数据
+1. 使用分布式对象
- - wantParams中可以填写key-value形式自定义数据,key类型string,填充的数据将随want被传输到远端,用于携带一些简单、轻量的数据。
+ 分布式数据对象提供了与本地变量类似的操作,实现两个设备的数据同步,当设备1的应用A的分布式数据对象增、删、改数据后,设备2的应用A也可以获取到对应的数据变化,同时还能监听数据变更以及对端数据对象的上下线。用法详见[分布式对象指导文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/database/database-distributedobject-guidelines.md)。
+ 迁移场景中,分布式对象(distributedDataObject)主要用于将本机内存数据同步到目标设备。
- ```javascript
- onContinue(wantParams : {[key: string]: any}) {
- console.log("Continue My Data")
- wantParams["myData"] = "my1234567";
- return true;
- }
- ```
-
- - 同时在远端判断如果是迁移,可以从want.parameters中取出在发起端保存的自定义数据。
+ - 发起端在onContinue中,将待迁移的数据存入分布式对象中,然后设置好session id,并通过wantParams将session id传到远端设备。
- ```javascript
- onCreate(want , launchParam) {
- if (launchParam.launchReason == LaunchReason.CONTINUATION) {
- console.log("onCreate LaunchReason = CONTINUATION",want.parameters["myData"]); // my1234567
- ...
- this.context.restoreWindowStage(this.contentStorage);
- }
+ ```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;
+
+ onContinue(wantParam : {[key: string]: any}) {
+ Logger.info("onContinue using distributedObject")
+ this.sessionId = distributedObject.genSessionId();
+ //set distributed data object session id
+ g_object.setSessionId(this.sessionId);
+ g_object.name = "Amy";
+ // set session id into want params
+ wantParam["session"] = this.sessionId;
+ return AbilityConstant.OnContinueResult.AGREE
}
- ```
+ ```
+ - 目标设备在onCreate中,取出发起端传过来的session id,建立分布式对象并关联该session id,这样就能实现分布式对象的同步。需要注意的是,在调用restoreWindowStage之前,迁移需要的分布式对象必须全部关联完,保证能够获取到正确的数据。
-
-2. 使用分布式对象
-
- 使用分布式对象可以传输更多的数据到远端设备,更多用法详见分布式对象接口文档。
-
- - 发起端在onContinue中,将待迁移的数据存入分布式对象中,然后设置好session id,并通过wantParams将session id传到远端设备。
-
-
- - 远端设备在onCreate中,取出发起端传过来的session id,建立分布式对象并关联该session id,这样就能实现分布式对象的同步。需要注意的是,在调用restoreWindowStage之前,迁移需要的分布式对象必须全部关联完,保证能够获取到正确的数据。
-
-
- * 示例
-
```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"] // 取出session id
-
- function statusCallback(sessionId, networkid, status) {
- console.info("object status change sessionId: " + sessionId + " status: " + status +
- "g_object.name: " + g_object.name); // 回调中可以取到同步过来的分布式对象内容 name = Amy
- }
- g_object.on("status", statusCallback); // 注册分布式对象同步结果的监听
-
- g_object.setSessionId(this.sessionId); // 将本地分布式对象也关联发起端的session id
-
- 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); //1 设置分布式对象的session id
- g_object.name = "Amy"; // 填入数据
- wantParams["session"] = this.sessionId; // 将session id 通过want传到远端
- return true;
- }
+ 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 : ContentStorage
+ sessionId : string;
+
+ statusCallback(sessionId, networkid, status) {
+ Logger.info(`continuation object status change, sessionId: ${sessionId}, status: ${status}, g_object.name: ${g_object.name}`)
+ }
+
+ onCreate(want, launchParam) {
+ Logger.info(`MainAbility onCreate ${AbilityConstant.LaunchReason.CONTINUATION}`)
+ if (launchParam.launchReason == AbilityConstant.LaunchReason.CONTINUATION) {
+ // get distributed data object session id from want params
+ this.sessionId = want.parameters.session
+ Logger.info(`onCreate for continuation sessionId: ${this.sessionId}`)
+
+ g_object.on("status", this.statusCallback);
+ // set session id, so it will sync data from remote device
+ g_object.setSessionId(this.sessionId);
+
+ this.contentStorage = new ContentStorage();
+ this.context.restoreWindowStage(this.contentStorage);
+ }
+ }
+ }
```
-
+
-
+以上完整的示例见sample
diff --git a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
index e042623c8f99ae2f4ae268d3d35513d053e31bc0..aaa75bf9566b287d0bf692e1dc980af75e86de60 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-Bundle.md
@@ -15,11 +15,11 @@ SystemCapability.BundleManager.BundleFramework
## 权限列表
-| 权限 | 权限等级 | 描述 |
-|-------| --------- | ---- |
-| ohos.permission.GET_BUNDLE_INFO | normal | 仅限查询本应用信息 |
+| 权限 | 权限等级 | 描述 |
+| ---------------------------------------- | ------------ | --------- |
+| ohos.permission.GET_BUNDLE_INFO | normal | 仅限查询本应用信息 |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | 可查询所有应用信息 |
-| ohos.permission.INSTALL_BUNDLE | system_core | 可安装、卸载应用 |
+| ohos.permission.INSTALL_BUNDLE | system_core | 可安装、卸载应用 |
## bundle.getApplicationInfo
@@ -37,16 +37,16 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------ | ---- | --------------------------------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
-| 类型 | 说明 |
-| ----------- | -------- |
+| 类型 | 说明 |
+| ------------------------- | ------------------ |
| Promise\ | Promise形式返回应用程序信息。 |
**示例:**
@@ -81,12 +81,12 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------------------------------- | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回应用程序信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------------------------------- | ---- | --------------------------------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回应用程序信息。 |
**示例:**
@@ -120,11 +120,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------------------------------- | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回应用程序信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------------------------------- | ---- | --------------------------------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回应用程序信息。 |
**示例:**
@@ -157,15 +157,15 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | ---------- | ---- | ----------------------------------------------------------- |
-| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | ---------- | ---- | --------------------------------------- |
+| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
-| 类型 | 说明 |
-| --------------------------- | ----------------------------------- |
+| 类型 | 说明 |
+| --------------------------- | -------------------------- |
| Promise> | Promise形式返回所有可用的BundleInfo |
**示例:**
@@ -199,10 +199,10 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | --------------------------------- | ---- | ------------------------------------------------------------ |
-| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。|
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | --------------------------------- | ---- | --------------------------------------- |
+| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
**示例:**
@@ -234,11 +234,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | --------------------------------- | ---- | ------------------------------------------------------------ |
-| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。|
-| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | --------------------------------- | ---- | --------------------------------------- |
+| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
**示例:**
@@ -272,16 +272,16 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 包名 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| options | BundleOptions | 否 | 包含userid。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------------- | ---- | --------------------------------------- |
+| bundleName | string | 是 | 包名 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| options | BundleOptions | 否 | 包含userid。 |
**返回值:**
-| 类型 | 说明 |
-| -------------------- | ------------------------------------------ |
+| 类型 | 说明 |
+| -------------------- | ---------------------------- |
| Promise\ | 返回值为Promise对象,Promise中包含包信息。 |
**示例:**
@@ -318,11 +318,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | -------------------------- | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 包名 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回包信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | -------------------------- | ---- | --------------------------------------- |
+| bundleName | string | 是 | 包名 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回包信息。 |
**示例:**
@@ -355,12 +355,12 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | -------------------------- | ---- | ------------------------------------------------------------ |
-| bundleName | string | 是 | 包名 |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| options | BundleOptions | 是 | 包含userid。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回包信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | -------------------------- | ---- | --------------------------------------- |
+| bundleName | string | 是 | 包名 |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| options | BundleOptions | 是 | 包含userid。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回包信息。 |
**示例:**
@@ -396,15 +396,15 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------------------------------------------------ |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------ | ---- | --------------------------------------- |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
-| 类型 | 说明 |
-| -------------------------------- | ------------------------------------------------ |
+| 类型 | 说明 |
+| -------------------------------- | ------------------------------- |
| Promise> | 返回值为Promise对象,Promise中包含应用信息列表。 |
**示例:**
@@ -438,11 +438,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | -------------------------------------- | ---- | ------------------------------------------------------ |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。|
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | -------------------------------------- | ---- | --------------------------------------- |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
**示例:**
@@ -475,10 +475,10 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | -------------------------------------- | ---- | ------------------------------------------------------ |
-| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。|
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | -------------------------------------- | ---- | --------------------------------------- |
+| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
**示例:**
@@ -509,15 +509,15 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | -------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| abilityName | string | 是 | 表示待查询的Ability名称。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------ | ---- | ---------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| abilityName | string | 是 | 表示待查询的Ability名称。 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ---------------------------- |
+| 类型 | 说明 |
+| --------------------- | --------------------- |
| Promise\ | Promise形式返回Ability信息。 |
**示例:**
@@ -549,11 +549,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | --------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| abilityName | string | 是 | 表示待查询的Ability名称。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回Ability信息。|
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | --------------------------- | ---- | -------------------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| abilityName | string | 是 | 表示待查询的Ability名称。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回Ability信息。 |
**示例:**
@@ -585,15 +585,15 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | -------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| abilityName | string | 是 | 表示待查询的Ability名称。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------ | ---- | ---------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| abilityName | string | 是 | 表示待查询的Ability名称。 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ---------------------------- |
+| 类型 | 说明 |
+| ---------------- | ------------------ |
| Promise\ | Promise形式返回应用名称信息。 |
**示例:**
@@ -625,11 +625,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | --------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| abilityName | string | 是 | 表示待查询的Ability名称。 |
-| callback | AsyncCallback\ | 是 | 返回应用名称信息。|
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ---------------------- | ---- | ---------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| abilityName | string | 是 | 表示待查询的Ability名称。 |
+| callback | AsyncCallback\ | 是 | 返回应用名称信息。 |
**示例:**
@@ -661,14 +661,14 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------ |
-| info | AbilityInfo | 是 | Ability的配置信息 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---- | ----------- | ---- | ------------ |
+| info | AbilityInfo | 是 | Ability的配置信息 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ------------------------|
+| 类型 | 说明 |
+| ----------------- | ------------------------- |
| Promise\ | Promise形式返回boolean代表是否启用。 |
**示例:**
@@ -702,10 +702,10 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | --------------------------------------------------------- |
-| info | AbilityInfo | 是 | Ability的配置信息 |
-| callback | AsyncCallback\ | 是 | 返回boolean代表是否启用 |
+| 名称 | 类型 | 必填 | 描述 |
+| -------- | ----------------------- | ---- | --------------- |
+| info | AbilityInfo | 是 | Ability的配置信息 |
+| callback | AsyncCallback\ | 是 | 返回boolean代表是否启用 |
**示例:**
@@ -739,14 +739,14 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | -------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | ------ | ---- | ------------ |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ------------------------|
+| 类型 | 说明 |
+| ----------------- | ------------------------- |
| Promise\ | Promise形式返回boolean代表是否启用。 |
**示例:**
@@ -777,15 +777,15 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | --------------------------------------------------------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| callback | AsyncCallback\ | 是 | 返回boolean代表是否启用 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | ----------------------- | ---- | --------------- |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| callback | AsyncCallback\ | 是 | 返回boolean代表是否启用 |
**示例:**
```js
-let bundleName : "com.example.myapplication";
+let bundleName = "com.example.myapplication";
bundle.isApplicationEnabled(bundleName, (err, data) => {
if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err));
@@ -811,16 +811,16 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 包含要查询的应用程序包名称的意图。 |
-| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ------ | ---- | ------------------------------------- |
+| want | Want | 是 | 包含要查询的应用程序包名称的意图。 |
+| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ---------------------------- |
+| 类型 | 说明 |
+| ---------------------------- | --------------------- |
| Promise> | Promise形式返回Ability信息。 |
**示例:**
@@ -854,12 +854,12 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ---------------------------------- | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
-| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
-| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回Ability信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ---------------------------------- | ---- | ------------------------------------- |
+| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
+| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
+| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回Ability信息。 |
**示例:**
@@ -891,11 +891,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ---------------------------------- | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
-| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回Ability信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ----------- | ---------------------------------- | ---- | ------------------------------------- |
+| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
+| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回Ability信息。 |
**示例:**
@@ -932,13 +932,13 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | ------ | ---- | -------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | ------ | ---- | ------------ |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
**返回值:**
-| 类型 | 说明 |
-| --------------------- | ------------------------------------------------------------ |
+| 类型 | 说明 |
+| -------------- | -------------------------------------- |
| Promise\ | 返回值为Promise对象,Promise中包含拉起指定应用的Want对象。 |
**示例:**
@@ -969,10 +969,10 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | ------ | ---- | -------- |
-| bundleName | string | 是 | 要查询的应用程序包名称。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回拉起指定应用的want对象。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---------- | -------------------- | ---- | ------------------------------ |
+| bundleName | string | 是 | 要查询的应用程序包名称。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回拉起指定应用的want对象。 |
**示例:**
@@ -1000,13 +1000,13 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | ------ | ---- | -------- |
-| uid | number | 是 | 要查询的uid。 |
+| 名称 | 类型 | 必填 | 描述 |
+| ---- | ------ | ---- | -------- |
+| uid | number | 是 | 要查询的uid。 |
**返回值:**
-| 类型 | 说明 |
-| --------------------- | ------------------------------------------------------------ |
+| 类型 | 说明 |
+| ---------------- | --------------------------------- |
| Promise\ | 返回值为Promise对象,Promise中包含指定uid的包名。 |
**示例:**
@@ -1033,10 +1033,10 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ---------- | ------ | ---- | -------- |
-| uid | number | 是 | 要查询的uid。 |
-| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回指定uid的包名。 |
+| 名称 | 类型 | 必填 | 描述 |
+| -------- | ---------------------- | ---- | ------------------------- |
+| uid | number | 是 | 要查询的uid。 |
+| callback | AsyncCallback\ | 是 | 程序启动作为入参的回调函数,返回指定uid的包名。 |
**示例:**
@@ -1144,16 +1144,16 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ------ | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 包含要查询的应用程序包名称的意图。 |
-| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:大于等于0。 |
-| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
+| 名称 | 类型 | 必填 | 描述 |
+| -------------- | ------ | ---- | ---------------------------------------- |
+| want | Want | 是 | 包含要查询的应用程序包名称的意图。 |
+| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:大于等于0。 |
+| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
**返回值:**
-| 类型 | 说明 |
-| ---------------------------- | ---------------------------- |
+| 类型 | 说明 |
+| ------------------------------------- | ------------------------------ |
| Promise> | Promise形式返回ExtensionAbility信息。 |
**示例:**
@@ -1191,12 +1191,12 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ---------------------------------- | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
-| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:枚举值,大于等于0。 |
-| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回ExtensionAbility信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| -------------- | ---------------------------------------- | ---- | ---------------------------------------- |
+| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
+| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:枚举值,大于等于0。 |
+| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回ExtensionAbility信息。 |
**示例:**
@@ -1232,11 +1232,11 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
-| 名称 | 类型 | 必填 | 描述 |
-| ----------- | ---------------------------------- | ---- | ------------------------------------------------------------ |
-| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
-| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:大于等于0。 |
-| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回ExtensionAbility信息。 |
+| 名称 | 类型 | 必填 | 描述 |
+| -------------- | ---------------------------------------- | ---- | ---------------------------------------- |
+| want | Want | 是 | 指示包含要查询的应用程序包名称的意图。 |
+| extensionFlags | number | 是 | 用于指定返回ExtensionAbilityInfo信息。默认值:0,取值范围:大于等于0。 |
+| callback | AsyncCallback> | 是 | 程序启动作为入参的回调函数,返回ExtensionAbility信息。 |
**示例:**
@@ -1259,40 +1259,40 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 读写属性 | 类型 | 必填 | 描述 |
-| ----------- | -------- | ------ | ---- | ------------------------------------------------------------ |
-| deviceId | 只读 | string | 否 | 表示运行指定Ability的设备ID。 |
-| bundleName | 只读 | string | 是 | 表示包描述。如果在Want中同时指定了BundleName和AbilityName,则Want可以直接匹配到指定的Ability。 |
-| abilityName | 只读 | string | 是 | 表示待启动的Ability名称。如果在Want中同时指定了BundleName和AbilityName,则Want可以直接匹配到指定的Ability。 |
-| uri | 只读 | string | 否 | 资源标识符。 |
-| shortName | 只读 | string | 否 | ElementName的简名。 |
+| 名称 | 读写属性 | 类型 | 必填 | 描述 |
+| ----------- | ---- | ------ | ---- | ---------------------------------------- |
+| deviceId | 只读 | string | 否 | 表示运行指定Ability的设备ID。 |
+| bundleName | 只读 | string | 是 | 表示包描述。如果在Want中同时指定了BundleName和AbilityName,则Want可以直接匹配到指定的Ability。 |
+| abilityName | 只读 | string | 是 | 表示待启动的Ability名称。如果在Want中同时指定了BundleName和AbilityName,则Want可以直接匹配到指定的Ability。 |
+| uri | 只读 | string | 否 | 资源标识符。 |
+| shortName | 只读 | string | 否 | ElementName的简名。 |
## InstallErrorCode
**系统能力:** SystemCapability.BundleManager.BundleFramework
-| 名称 | 默认值 | 说明 |
-| ------ | ------ | ------ |
-| SUCCESS | 0 | 安装成功 |
-| STATUS_INSTALL_FAILURE | 1 | 安装失败(不存在安装的应用) |
-| STATUS_INSTALL_FAILURE_ABORTED | 2 | 安装中止 |
-| STATUS_INSTALL_FAILURE_INVALID | 3 | 安装参数无效 |
-| STATUS_INSTALL_FAILURE_CONFLICT | 4 | 安装冲突 (常见于升级和已有应用基本信息不一致) |
-| STATUS_INSTALL_FAILURE_STORAGE | 5 | 存储包信息失败 |
-| STATUS_INSTALL_FAILURE_INCOMPATIBLE | 6 | 安装不兼容(常见于版本降级安装或者签名信息错误) |
-| STATUS_UNINSTALL_FAILURE | 7 | 卸载失败 (不存在卸载的应用) |
-| STATUS_UNINSTALL_FAILURE_BLOCKED | 8 | 卸载中止 (没有使用) |
-| STATUS_UNINSTALL_FAILURE_ABORTED | 9 | 卸载中止 (参数无效导致) |
-| STATUS_UNINSTALL_FAILURE_CONFLICT | 10 | 卸载冲突 (卸载系统应用失败, 结束应用进程失败) |
-| STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT | 0x0B | 安装失败 (下载超时) |
-| STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED | 0x0C | 安装失败 (下载失败) |
-| STATUS_RECOVER_FAILURE_INVALID8+ | 0x0D | 恢复预置应用失败 |
-| STATUS_ABILITY_NOT_FOUND | 0x40 | Ability未找到 |
-| STATUS_BMS_SERVICE_ERROR | 0x41 | BMS服务错误 |
-| STATUS_FAILED_NO_SPACE_LEFT8+ | 0x42 | 设备空间不足 |
-| STATUS_GRANT_REQUEST_PERMISSIONS_FAILED8+ | 0x43 | 应用授权失败 |
-| STATUS_INSTALL_PERMISSION_DENIED8+ | 0x44 | 安装权限拒绝 |
-| STATUS_UNINSTALL_PERMISSION_DENIED8+ | 0x45 | 卸载权限拒绝 |
+| 名称 | 默认值 | 说明 |
+| ---------------------------------------- | ---- | ------------------------- |
+| SUCCESS | 0 | 安装成功 |
+| STATUS_INSTALL_FAILURE | 1 | 安装失败(不存在安装的应用) |
+| STATUS_INSTALL_FAILURE_ABORTED | 2 | 安装中止 |
+| STATUS_INSTALL_FAILURE_INVALID | 3 | 安装参数无效 |
+| STATUS_INSTALL_FAILURE_CONFLICT | 4 | 安装冲突 (常见于升级和已有应用基本信息不一致) |
+| STATUS_INSTALL_FAILURE_STORAGE | 5 | 存储包信息失败 |
+| STATUS_INSTALL_FAILURE_INCOMPATIBLE | 6 | 安装不兼容(常见于版本降级安装或者签名信息错误) |
+| STATUS_UNINSTALL_FAILURE | 7 | 卸载失败 (不存在卸载的应用) |
+| STATUS_UNINSTALL_FAILURE_BLOCKED | 8 | 卸载中止 (没有使用) |
+| STATUS_UNINSTALL_FAILURE_ABORTED | 9 | 卸载中止 (参数无效导致) |
+| STATUS_UNINSTALL_FAILURE_CONFLICT | 10 | 卸载冲突 (卸载系统应用失败, 结束应用进程失败) |
+| STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT | 0x0B | 安装失败 (下载超时) |
+| STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED | 0x0C | 安装失败 (下载失败) |
+| STATUS_RECOVER_FAILURE_INVALID8+ | 0x0D | 恢复预置应用失败 |
+| STATUS_ABILITY_NOT_FOUND | 0x40 | Ability未找到 |
+| STATUS_BMS_SERVICE_ERROR | 0x41 | BMS服务错误 |
+| STATUS_FAILED_NO_SPACE_LEFT8+ | 0x42 | 设备空间不足 |
+| STATUS_GRANT_REQUEST_PERMISSIONS_FAILED8+ | 0x43 | 应用授权失败 |
+| STATUS_INSTALL_PERMISSION_DENIED8+ | 0x44 | 安装权限拒绝 |
+| STATUS_UNINSTALL_PERMISSION_DENIED8+ | 0x45 | 卸载权限拒绝 |
## BundleFlag
@@ -1300,21 +1300,21 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 默认值 | 说明 |
-| ------ | ------ | ------ |
-| GET_BUNDLE_DEFAULT | 0x00000000 | 获取默认的应用信息 |
-| GET_BUNDLE_WITH_ABILITIES | 0x00000001 | 获取包括Ability信息的包信息 |
-| GET_ABILITY_INFO_WITH_PERMISSION | 0x00000002 | 获取包括权限的Ability信息 |
-| GET_ABILITY_INFO_WITH_APPLICATION | 0x00000004 | 获取包括应用的Ability信息 |
-| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000008 | 获取包括权限的应用信息 |
-| GET_BUNDLE_WITH_REQUESTED_PERMISSION | 0x00000010 | 获取包括所需权限的包信息 |
-| GET_ABILITY_INFO_WITH_METADATA8+ | 0x00000020 | 获取ability的元数据信息 |
+| 名称 | 默认值 | 说明 |
+| ---------------------------------------- | ---------- | ------------------- |
+| GET_BUNDLE_DEFAULT | 0x00000000 | 获取默认的应用信息 |
+| GET_BUNDLE_WITH_ABILITIES | 0x00000001 | 获取包括Ability信息的包信息 |
+| GET_ABILITY_INFO_WITH_PERMISSION | 0x00000002 | 获取包括权限的Ability信息 |
+| GET_ABILITY_INFO_WITH_APPLICATION | 0x00000004 | 获取包括应用的Ability信息 |
+| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000008 | 获取包括权限的应用信息 |
+| GET_BUNDLE_WITH_REQUESTED_PERMISSION | 0x00000010 | 获取包括所需权限的包信息 |
+| GET_ABILITY_INFO_WITH_METADATA8+ | 0x00000020 | 获取ability的元数据信息 |
| GET_BUNDLE_WITH_EXTENSION_ABILITY9+ | 0x00000020 | 获取包括Ability信息的扩展包信息 |
-| GET_APPLICATION_INFO_WITH_METADATA8+ | 0x00000040 | 获取应用的元数据信息 |
+| GET_APPLICATION_INFO_WITH_METADATA8+ | 0x00000040 | 获取应用的元数据信息 |
| GET_ABILITY_INFO_SYSTEMAPP_ONLY8+ | 0x00000080 | 获取仅包括系统应用的ability信息 |
-| GET_ABILITY_INFO_WITH_DISABLE8+ | 0x00000100 | 获取包括被禁用的ability信息 |
-| GET_APPLICATION_INFO_WITH_DISABLE8+ | 0x00000200 | 获取包括被禁用的应用信息 |
-| GET_ALL_APPLICATION_INFO | 0xFFFF0000 | 获取应用所有的信息 |
+| GET_ABILITY_INFO_WITH_DISABLE8+ | 0x00000100 | 获取包括被禁用的ability信息 |
+| GET_APPLICATION_INFO_WITH_DISABLE8+ | 0x00000200 | 获取包括被禁用的应用信息 |
+| GET_ALL_APPLICATION_INFO | 0xFFFF0000 | 获取应用所有的信息 |
## BundleOptions
@@ -1322,9 +1322,9 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| userId | number | 是 | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| ------ | ------ | ---- | ---- | ---------------------------- |
+| userId | number | 是 | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
## BundleInfo
@@ -1332,32 +1332,32 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| name | string | 是 | 否 | 应用包的名称 |
-| type | string | 是 | 否 | 应用包类型 |
-| appId | string | 是 | 否 | 应用包里应用程序的id |
-| uid | number | 是 | 否 | 应用包里应用程序的uid |
-| installTime | number | 是 | 否 | HAP包安装时间 |
-| updateTime | number | 是 | 否 | HAP包更新时间 |
-| appInfo | ApplicationInfo | 是 | 否 | 应用程序的配置信息 |
-| abilityInfos | Array\ | 是 | 否 | Ability的配置信息 |
-| reqPermissions | Array\ | 是 | 否 | 应用运行时需向系统申请的权限集合 |
-| reqPermissionDetails | Array\ | 是 | 否 | 应用运行时需向系统申请的权限集合的详细信息 |
-| vendor | string | 是 | 否 | 应用包的供应商 |
-| versionCode | number | 是 | 否 | 应用包的版本号 |
-| versionName | string | 是 | 否 | 应用包的版本文本描述信息 |
-| compatibleVersion | number | 是 | 否 | 运行应用包所需要最低的SDK版本号 |
-| targetVersion | number | 是 | 否 | 运行应用包所需要最高SDK版本号 |
-| isCompressNativeLibs | boolean | 是 | 否 | 是否压缩应用包的本地库,默认为true |
-| hapModuleInfos | Array\ | 是 | 否 | 模块的配置信息 |
-| entryModuleName | string | 是 | 否 | Entry的模块名称 |
-| cpuAbi | string | 是 | 否 | 应用包的cpuAbi信息 |
-| isSilentInstallation | string | 是 | 否 | 是否通过静默安装 |
-| minCompatibleVersionCode | number | 是 | 否 | 分布式场景下的应用包兼容的最低版本 |
-| entryInstallationFree | boolean | 是 | 否 | Entry是否支持免安装 |
-| reqPermissionStates8+ | Array\ | 是 | 否 | 申请权限的授予状态 |
-| extensionAbilityInfo9+ | Array\ | 是 | 否 | ability的可扩展信息 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| --------------------------------- | ---------------------------- | ---- | ---- | --------------------- |
+| name | string | 是 | 否 | 应用包的名称 |
+| type | string | 是 | 否 | 应用包类型 |
+| appId | string | 是 | 否 | 应用包里应用程序的id |
+| uid | number | 是 | 否 | 应用包里应用程序的uid |
+| installTime | number | 是 | 否 | HAP包安装时间 |
+| updateTime | number | 是 | 否 | HAP包更新时间 |
+| appInfo | ApplicationInfo | 是 | 否 | 应用程序的配置信息 |
+| abilityInfos | Array\ | 是 | 否 | Ability的配置信息 |
+| reqPermissions | Array\ | 是 | 否 | 应用运行时需向系统申请的权限集合 |
+| reqPermissionDetails | Array\ | 是 | 否 | 应用运行时需向系统申请的权限集合的详细信息 |
+| vendor | string | 是 | 否 | 应用包的供应商 |
+| versionCode | number | 是 | 否 | 应用包的版本号 |
+| versionName | string | 是 | 否 | 应用包的版本文本描述信息 |
+| compatibleVersion | number | 是 | 否 | 运行应用包所需要最低的SDK版本号 |
+| targetVersion | number | 是 | 否 | 运行应用包所需要最高SDK版本号 |
+| isCompressNativeLibs | boolean | 是 | 否 | 是否压缩应用包的本地库,默认为true |
+| hapModuleInfos | Array\ | 是 | 否 | 模块的配置信息 |
+| entryModuleName | string | 是 | 否 | Entry的模块名称 |
+| cpuAbi | string | 是 | 否 | 应用包的cpuAbi信息 |
+| isSilentInstallation | string | 是 | 否 | 是否通过静默安装 |
+| minCompatibleVersionCode | number | 是 | 否 | 分布式场景下的应用包兼容的最低版本 |
+| entryInstallationFree | boolean | 是 | 否 | Entry是否支持免安装 |
+| reqPermissionStates8+ | Array\ | 是 | 否 | 申请权限的授予状态 |
+| extensionAbilityInfo9+ | Array\ | 是 | 否 | ability的可扩展信息 |
## ApplicationInfo
@@ -1396,10 +1396,10 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| moduleName | string | 是 | 否 | 模块名称 |
-| moduleSourceDir | string | 是 | 否 | 安装目录 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| --------------- | ------ | ---- | ---- | ---- |
+| moduleName | string | 是 | 否 | 模块名称 |
+| moduleSourceDir | string | 是 | 否 | 安装目录 |
## CustomizeData
@@ -1407,11 +1407,11 @@ bundle.queryExtensionAbilityInfosByWant(want, extensionFlags, (err, data) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ----- | ------ | ---- | ---- | ---------------- |
-| name | string | 是 | 是 | 自定义元数据名称 |
-| value | string | 是 | 是 | 自定义元数据值 |
-| extra8+ | string | 是 | 是 | 自定义资源 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| ------------------ | ------ | ---- | ---- | -------- |
+| name | string | 是 | 是 | 自定义元数据名称 |
+| value | string | 是 | 是 | 自定义元数据值 |
+| extra8+ | string | 是 | 是 | 自定义资源 |
## HapModuleInfo
@@ -1447,11 +1447,11 @@ Hap模块信息
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| name | string | 是 | 是 | 需要使用的权限名称 |
-| reason | string | 是 | 是 | 描述申请权限的原因 |
-| usedScene | UsedScene | 是 | 是 | 权限使用的场景和时机 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| --------- | --------- | ---- | ---- | ---------- |
+| name | string | 是 | 是 | 需要使用的权限名称 |
+| reason | string | 是 | 是 | 描述申请权限的原因 |
+| usedScene | UsedScene | 是 | 是 | 权限使用的场景和时机 |
## UsedScene
@@ -1459,10 +1459,10 @@ Hap模块信息
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| abilities | Array\ | 是 | 是 | 使用到该权限的Ability集合 |
-| when | string | 是 | 是 | 使用该权限的时机 |
+| 名称 | 类型 | 可读 | 可写 | 说明 |
+| --------- | -------------- | ---- | ---- | ---------------- |
+| abilities | Array\ | 是 | 是 | 使用到该权限的Ability集合 |
+| when | string | 是 | 是 | 使用该权限的时机 |
## AbilityInfo
@@ -1471,36 +1471,36 @@ Ability信息
**系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
-| 名称 | 类型 | 可读 | 可写 | 说明 |
-| ------ | ------ | ------ | ------ | ------ |
-| bundleName | string | 是 | 否 | 应用包名 |
-| name | string | 是 | 否 | Ability名称 |
-| label | string | 是 | 否 | Ability对用户显示的名称 |
-| description | string | 是 | 否 | Ability的描述 |
-| icon | string | 是 | 否 | Ability的图标资源文件索引 |
-| descriptionId | number | 是 | 否 | Ability的描述id |
-| iconId | number | 是 | 否 | Ability的图标id |
-| moduleName | string | 是 | 否 | Ability所属的HAP包的名称 |
-| process | string | 是 | 否 | Ability的进程,如果不设置,默认为包的名称 |
-| targetAbility | string | 是 | 否 | 当前Ability重用的目标Ability |
-| backgroundModes | number | 是 | 否 | 表示后台服务的类型 |
-| isVisible | boolean | 是 | 否 | 判断Ability是否可以被其他应用调用 |
-| formEnabled | boolean | 是 | 否 | 判断Ability是否提供卡片能力 |
-| type | AbilityType | 是 | 否 | Ability类型 |
-| orientation | DisplayOrientation | 是 | 否 | Ability的显示模式 |
-| launchMode | LaunchMode | 是 | 否 | Ability的启动模式 |
-| permissions | Array\ | 是 | 否 | 被其他应用Ability调用时需要申请的权限集合 |
-| deviceTypes | Array\ | 是 | 否 | Ability支持的设备类型 |
-| deviceCapabilities | Array\ | 是 | 否 | Ability需要的设备能力 |
-| readPermission | string | 是 | 否 | 读取Ability数据所需的权限 |
-| writePermission | string | 是 | 否 | 向Ability写数据所需的权限 |
-| applicationInfo | ApplicationInfo | 是 | 否 | 应用程序的配置信息 |
-| uri | string | 是 | 否 | 获取Ability的统一资源标识符(URI) |
-| labelId | number | 是 | 否 | Ability的标签id |
-| subType | AbilitySubType | 是 | 否 | Ability中枚举使用的模板的子类型 |
-| metaData