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-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-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 >![](public_sys-resources/icon-note.gif) **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 @@ > ![icon-note.gif](public_sys-resources/icon-note.gif) **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 >![](public_sys-resources/icon-note.gif) **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/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/application-dev/ability/Readme-CN.md b/zh-cn/application-dev/ability/Readme-CN.md index 15e087857a60a6c410cef4e11aff18b298900d91..67afebb60d828b912838a85504884be4f042cd14 100644 --- a/zh-cn/application-dev/ability/Readme-CN.md +++ b/zh-cn/application-dev/ability/Readme-CN.md @@ -1,17 +1,16 @@ # Ability开发 - [Ability框架概述](ability-brief.md) - - FA模型 + - FA模型 - [FA模型综述](fa-brief.md) - [PageAbility开发指导](fa-pageability.md) - [ServiceAbility开发指导](fa-serviceability.md) - [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..47db1b8792b47b81abf0e492529c9d3f337ceea4 100644 --- a/zh-cn/application-dev/ability/fa-pageability.md +++ b/zh-cn/application-dev/ability/fa-pageability.md @@ -186,4 +186,10 @@ var promise = await featureAbility.startAbility({ }, } ); -``` \ No newline at end of file +``` +## 开发实例 +针对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/figures/stage-call.png b/zh-cn/application-dev/ability/figures/stage-call.png new file mode 100644 index 0000000000000000000000000000000000000000..28f2a0f7ea9d86fc81e0c1a37d556384b14a9bdd Binary files /dev/null and b/zh-cn/application-dev/ability/figures/stage-call.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** 迁移开发示意图 -### 迁移应用 +![continuation_dev](figures/continuation-info.png) +## 开发步骤 +### 迁移应用 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/ability/stage-ability.md b/zh-cn/application-dev/ability/stage-ability.md index 1d8a3b410bf951a4be2111cb5b3537d9b9e8fe8a..7356a8bad4c9cda79f4d3df2f4333a7b6875ca97 100644 --- a/zh-cn/application-dev/ability/stage-ability.md +++ b/zh-cn/application-dev/ability/stage-ability.md @@ -1 +1,213 @@ -# Ability开发指导 \ No newline at end of file +# Ability开发指导 +## 场景介绍 +Stage模型是基于API version 9的应用开发模型,对此模型的介绍详见[Stage模型综述](stage-brief.md)。基于Stage模型的Ability应用开发,主要涉及如下功能逻辑: +- 创建Page Ability应用,如视频播放、新闻资讯等,需要通过屏幕进行浏览的应用,以及支持人机交互。 +- 获取Ability的配置信息,如ApplicationInfo、AbilityInfo及HapModuleInfo等。 +- 启动/带参数启动/带返回结果启动/带AccountId启动其他Ability。 +- 应用向用户申请授权。 +- 系统环境变化通知给AbilityStage及Ability。 +- 通用组件Call功能,详见[Call调用开发指导](stage-call.md)。 +- 连接ServiceAbility,与ServiceAbility断开连接,详见[ServiceExtensionAbility开发指导](stage-serviceextension.md)。 +- 应用迁移,详见[应用迁移开发指导](stage-ability-continuation.md)。 + +## 接口说明 +AbilityStage功能如下:AbilityStage类,拥有context属性,具体的API详见[接口文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-abilitystage.md)。 + +**表1** AbilityStage API接口功能介绍 +|接口名|描述| +|:------|:------| +|void onCreate()|AbilityStage初始化时被调用。| +|string onAcceptWant(want: Want)|启动指定Ability时被调用。| +|void onConfigurationUpdated(config: Configuration)|全局配置发生变更时被调用。| + +Ability功能如下:Ability类,具体的API详见[接口文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-ability.md)。 + +**表2** Ability API接口功能介绍 +|接口名|描述| +|:------|:------| +|void onCreate(want: Want, param: AbilityConstant.LaunchParam)|Ability生命周期回调,Ability启动时被调用。| +|void onDestroy()|Ability生命周期回调,Ability销毁时被调用。| +|void onWindowStageCreate(windowStage: window.WindowStage)|Ability生命周期回调,创建window stage时被调用,应用开发者可通过window.WindowStage的接口执行页面加载等操作。| +|void onWindowStageDestroy()|Ability生命周期回调,销毁window stage时被调用。| +|void onForeground()|Ability生命周期回调,Ability切换至前台时被调用。| +|void onBackground()|Ability生命周期回调,Ability切换至后台时被调用。| +|void onNewWant(want: Want)|Ability回调,Ability的启动模式设置为单例时被调用。| +|void onConfigurationUpdated(config: Configuration)|Ability回调,Ability的系统配置更新时被调用。| + +Ability类拥有context属性,context属性为AbilityContext类,AbilityContext类拥有abilityInfo、currentHapModuleInfo等属性,具体的API详见[接口文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-ability-context.md)。 + +**表3** AbilityContext API接口功能介绍 +|接口名|描述| +|:------|:------| +|void startAbility(want: Want, callback: AsyncCallback)|启动Ability。| +|void startAbility(want: Want, options: StartOptions, callback: AsyncCallback)|启动Ability。| +|void startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback)|带AccountId启动Ability。| +|void startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback)|带AccountId启动Ability。| +|void startAbilityForResult(want: Want, callback: AsyncCallback)|带返回结果启动Ability。| +|void startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback)|带返回结果启动Ability。| +|void startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback)|带返回结果及AccountId启动Ability。| +|void startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback)|带返回结果及AccountId启动Ability。| +|void terminateSelf(callback: AsyncCallback)|销毁当前的Page Ability。| +|void terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback)|带返回结果销毁当前的Page Ability。| + +## 开发步骤 +### 创建Page Ability应用 +创建Stage模型的Page Ability应用,需实现AbilityStage接口及Ability生命周期接口,并使用窗口提供的方法设置页面。具体示例代码如下: +1. 导入AbilityStage模块 +``` +import AbilityStage from "@ohos.application.AbilityStage" +``` +2. 实现AbilityStage接口 +```ts +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + } +} +``` +3. 导入Ability模块 +``` +import Ability from '@ohos.application.Ability' +``` +4. 实现Ability生命周期接口 +在`onWindowStageCreate(windowStage)`中通过loadContent接口设置应用要加载的页面,window接口的使用详见[窗口开发指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/windowmanager/window-guidelines.md/)。 +```ts +export default class MainAbility extends Ability { + onCreate(want, launchParam) { + console.log("MainAbility onCreate") + } + + onDestroy() { + console.log("MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + console.log("MainAbility onWindowStageCreate") + + windowStage.loadContent("pages/index").then((data) => { + console.log("MainAbility load content succeed with data: " + JSON.stringify(data)) + }).catch((error) => { + console.error("MainAbility load content failed with error: "+ JSON.stringify(error)) + }) + } + + onWindowStageDestroy() { + console.log("MainAbility onWindowStageDestroy") + } + + onForeground() { + console.log("MainAbility onForeground") + } + + onBackground() { + console.log("MainAbility onBackground") + } +} +``` +### 获取AbilityStage及Ability的配置信息 +AbilityStage类及Ability类均拥有context属性,应用可以通过`this.context`获取Ability实例的上下文,进而获取详细的配置信息。如下示例展示了AbilityStage通过context属性获取包代码路径、hap包名、ability名以及系统语言的方法。具体示例代码如下: +```ts +import AbilityStage from "@ohos.application.AbilityStage" +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + let context = this.context + console.log("MyAbilityStage bundleCodeDir" + context.bundleCodeDir) + + let currentHapModuleInfo = context.currentHapModuleInfo + console.log("MyAbilityStage hap module name" + currentHapModuleInfo.name) + console.log("MyAbilityStage hap module mainAbilityName" + currentHapModuleInfo.mainAbilityName) + + let config = this.context.config + console.log("MyAbilityStage config language" + config.language) + } +} +``` + +如下示例展示了Ability通过context属性获取包代码路径、hap包名、ability名以及系统语言的方法。具体示例代码如下: +```ts +import Ability from '@ohos.application.Ability' +export default class MainAbility extends Ability { + onCreate(want, launchParam) { + console.log("MainAbility onCreate") + let context = this.context + console.log("MainAbility bundleCodeDir" + context.bundleCodeDir) + + let abilityInfo = this.context.abilityInfo; + console.log("MainAbility ability bundleName" + abilityInfo.bundleName) + console.log("MainAbility ability name" + abilityInfo.name) + + let config = this.context.config + console.log("MyAbilityStage config language" + config.language) + } +} +``` + +### 启动Ability +应用可以通过`this.context`获取Ability实例的上下文,进而使用AbilityContext中的StartAbility相关接口启动Ability。启动Ability可指定Want、StartOptions、accountId,通过callback形式或promise形式实现。具体示例代码如下: +```ts +let context = this.context +var want = { + "deviceId": "", + "bundleName": "com.example.MyApplication", + "abilityName": "MainAbility" +}; +var options = { + windowMode: 0, + displayId: 2 +}; +context.startAbility(want, options).then((data) => { + console.log("Succeed to start ability with data: " + JSON.stringify(data)) +}).catch((error) => { + console.error("Failed to start ability with error: "+ JSON.stringify(error)) +}) +``` + +### 应用向用户申请授权 +应用需要某些权限如存储、位置信息、访问日历时,需要向用户申请授权。具体示例代码如下: +```ts +let context = this.context +let permissions = ohos.permission.READ_CALENDAR +context.requestPermissionsFromUser(permissions).then((data) => { + console.log("Succeed to request permission from user with data: "+ JSON.stringify(data)) +}).catch((error) => { + console.log("Failed to request permission from user with error: "+ JSON.stringify(error)) +}) +``` + +### 系统环境变化通知给AbilityStage及Ability +全局配置,比如系统语言和颜色模式发生变化时,通过onConfigurationUpdated接口通知给AbilityStage和Ability。如下示例展示了AbilityStage的onConfigurationUpdated回调实现,系统语言和颜色模式发生变化时触发该回调。具体示例代码如下: +```ts +import Ability from '@ohos.application.Ability' +import ConfigurationConstant from '@ohos.application.ConfigurationConstant' +export default class MyAbilityStage extends AbilityStage { + onConfigurationUpdated(config) { + console.log("MyAbilityStage onConfigurationUpdated") + console.log("MyAbilityStage config language" + config.language) + console.log("MyAbilityStage config colorMode" + config.colorMode) + } +} +``` + +如下示例展示了Ability的onConfigurationUpdated回调实现,系统语言、颜色模式以及Display相关的参数,比如方向、Density,发生变化时触发该回调。具体示例代码如下: +```ts +import Ability from '@ohos.application.Ability' +import ConfigurationConstant from '@ohos.application.ConfigurationConstant' +export default class MainAbility extends Ability { { + onConfigurationUpdated(config) { + console.log("MainAbility onConfigurationUpdated") + console.log("MainAbility config language" + config.language) + console.log("MainAbility config colorMode" + config.colorMode) + console.log("MainAbility config direction" + config.direction) + console.log("MainAbility config screenDensity" + config.screenDensity) + console.log("MainAbility config displayId" + config.displayId) + } +} +``` + +## 开发实例 +针对Stage模型Ability开发,有以下示例工程可供参考: + +[eTSStageCallAbility]() + +本示例eTSStageCallAbility中,在Application目录的AbilityStage.ts中实现AbilityStage的接口,在MainAbility目录实现Ability的接口并设置"pages/index"中的内容为Ability的界面,在SecondAbility目录实现另一个Ability并设置"pages/second"为Ability的界面。支持MainAbility启动SecondAbility。 \ No newline at end of file diff --git a/zh-cn/application-dev/ability/stage-call.md b/zh-cn/application-dev/ability/stage-call.md new file mode 100644 index 0000000000000000000000000000000000000000..f59db4a98c8a4b65fa31d2a7b991bf766b9e7adc --- /dev/null +++ b/zh-cn/application-dev/ability/stage-call.md @@ -0,0 +1,180 @@ +# Call调用开发指导 +## 场景介绍 +Ability Call调用是Ability能力的扩展,它为Ability提供一种能够被外部调用的能力。使Ability既能被拉起到前台展示UI,也支持Ability在后台被创建并运行。应用开发者可通过Call调用,使用IPC通信实现不同Ability之间的数据共享。Call调用的场景主要包括: +- 创建Callee被调用端。 +- 访问Callee被调用端。 + +本文中的Caller和Callee分别表示调用者和被调用者,Call调用流程示意图如下。 + +![stage-call](figures/stage-call.png) + +## 接口说明 +Caller及Callee功能如下:具体的API详见[接口文档](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-application-ability.md#caller)。 + +**表1** Call API接口功能介绍 +|接口名|描述| +|:------|:------| +|Promise startAbilityByCall(want: Want)|获取指定通用组件的Caller通信接口,拉起指定通用组件并将其切换到后台。| +|void on(method: string, callback: CaleeCallBack)|Callee.on,通用组件Callee注册method对应的callback方法。| +|void off(method: string)|Callee.off,通用组件Callee去注册method的callback方法。| +|Promise call(method: string, data: rpc.Sequenceable)|Caller.call,向通用组件Callee发送约定序列化数据。| +|Promise callWithResult(method: string, data: rpc.Sequenceable)|Caller.callWithResult,向通用组件Callee发送约定序列化数据, 并将返回的约定序列化数据带回。| +|void release()|Caller.release,释放通用组件的Caller通信接口。| +|void onRelease(callback: OnReleaseCallBack)|Caller.onRelease,注册通用组件通信断开监听通知。| + +## 开发步骤 +### 创建Callee被调用端 +Callee被调用端,需要实现指定方法的数据接收回调函数、数据的序列化及反序列化方法。在需要接收数据期间,通过on接口注册监听,无需接收数据时通过off接口解除监听。 +1. 配置Ability的启动模式 +配置module.json5,将Callee被调用端所在的Ability配置为单实例"singleton"。 + +|Json字段|字段说明| +|:------|:------| +|"launchType"|Ability的启动模式,设置为"singleton"类型 | + +Ability配置标签示例如下: +```json +"abilities":[{ + "name": ".CalleeAbility", + "srcEntrance": "./ets/CalleeAbility/CalleeAbility.ts", + "launchType": "singleton", + "description": "$string:CalleeAbility_desc", + "icon": "$media:icon", + "label": "$string:CalleeAbility_label", + "visible": true +}] +``` +2. 导入Ability模块 +``` +import Ability from '@ohos.application.Ability' +``` +3. 定义约定的序列化数据 +调用端及被调用端发送接收的数据格式需协商一致,如下示例约定数据由number和string组成。具体示例代码如下: +```ts +export class MySequenceable { + num: number = 0 + str: String = "" + + constructor(num, string) { + this.num = num + this.str = string + } + + marshalling(messageParcel) { + messageParcel.writeInt(this.num) + messageParcel.writeString(this.str) + return true + } + + unmarshalling(messageParcel) { + this.num = messageParcel.readInt() + this.str = messageParcel.readString() + return true + } +} +``` +4. 实现Callee.on监听及Callee.off解除监听 +被调用端Callee的监听函数注册时机, 取决于应用开发者。注册监听之前的数据不会被处理,取消监听之后的数据不会被处理。如下示例在Ability的onCreate注册'CalleeSortMethod'监听,在onDestroy取消监听,收到序列化数据后对字符串排序后返回,应用开发者根据实际需要做相应处理。具体示例代码如下: +```ts +let TAG = '[CalleeAbility] ' +let method = 'CalleeSortMethod' + +function CalleeSortFunc(data) { + let receiveData = new MySequenceable(0, '') + data.readSequenceable(receiveData) + console.log(TAG + 'receiveData[' + receiveData.num + ',' + receiveData.str + ']') + return new MySequenceable(receiveData.num + 1, Array.from(receiveData.str).sort().join('')) +} + +export default class CalleeAbility extends Ability { + onCreate(want, launchParam) { + try { + this.callee.on(method, CalleeSortFunc) + } catch (error) { + console.error(TAG + method + 'register failed with error: ' + JSON.stringify(error)) + } + } + + onDestroy() { + try { + this.callee.off(method) + } catch (error) { + console.error(TAG + method + 'unregister failed with error: ' + JSON.stringify(error)) + } + } +} +``` + +### 访问Callee被调用端 +1. 导入Ability模块 +``` +import Ability from '@ohos.application.Ability' +``` +2. 获取Caller通信接口 +Ability的context属性实现了startAbilityByCall方法,用于获取指定通用组件的Caller通信接口。如下示例通过`this.context`获取Ability实例的context属性,使用startAbilityByCall拉起Callee被调用端并获取Caller通信接口,注册Caller的onRelease监听。应用开发者根据实际需要做相应处理。具体示例代码如下: +```ts +let TAG = '[MainAbility] ' +var caller = undefined +let context = this.context + +context.startAbilityByCall({ + bundleName: 'com.samples.CallApplication', + abilityName: 'CalleeAbility' +}).then((data) => { + if (data != null) { + caller = data + console.log(TAG + 'get caller success') + // 注册caller的release监听 + caller.onRelease((msg) => { + console.log(TAG + 'caller onRelease is called ' + msg) + }) + console.log(TAG + 'caller register OnRelease succeed') + } +}).catch((error) => { + console.error(TAG + 'get caller failed with ' + error) +}) +``` +3. 发送约定序列化数据 +向被调用端发送Sequenceable数据有两种方式,一种是不带返回值,一种是获取被调用端返回的数据,method以及序列化数据需要与被调用端协商一致。如下示例调用Call接口,向Calee被调用端发送数据。具体示例代码如下: +```ts +let method = 'CalleeSortMethod' +let msg = new MySequenceable(1, 'call_str') +caller.call(method, msg).then(() => { + console.log(TAG + 'caller call succeed') + }).catch((error) => { + console.error(TAG + 'caller call failed with ' + error) +}) +``` + +如下示例调用CallWithResult接口,向Calee被调用端发送待处理的数据,并将method方法处理完毕的数据赋值给callback。具体示例代码如下: +```ts +let method = 'CalleeSortMethod' +let msg = new MySequenceable(1, sortString) +caller.callWithResult(method, msg) + .then((data) => { + let resultMsg = new MySequenceable(0, '') + data.readSequenceable(resultMsg) + callback(resultMsg.str) + console.log(TAG + 'caller result is [' + resultMsg.num + ',' + resultMsg.str + ']') + }).catch((error) => { + console.error(TAG + 'caller callWithResult failed with ' + error) +}) +``` +4. 释放Caller通信接口 +Caller不再使用后,应用开发者可以通过release接口释放Caller。具体示例代码如下: +```ts +try { + caller.release() + caller = undefined + console.log(TAG + 'caller release succeed') +} catch (error) { + console.error(TAG + 'caller release failed with ' + error) +} +``` + +## 开发实例 +针对Stage模型本地Call功能开发,有以下示例工程可供参考: + +[eTSStageCallAbility]() + +本示例eTSStageCallAbility中,在Application目录的AbilityStage.ts中实现AbilityStage的接口,在MainAbility目录实现Ability的接口并设置"pages/index"为应用的界面,在CaleeAbility目录实现Callee被调用端。MainAbility获取Caller通信接口后,支持用户输入字符串,做序列化处理后传递给CaleeAbility被调用端处理,Calee将字符串排序,返回序列化数据并将排序结果显示在页面上。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md b/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md index 95d0cebfeb3662907a6143e1542e9efe41b51453..9f94916032a8000ea9d5eeda565dfc2ff1fd2bee 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md +++ b/zh-cn/application-dev/reference/apis/js-apis-basic-features-animator.md @@ -6,191 +6,31 @@ ## 导入模块 -requestAnimationFrame:无需导入 - -cancelAnimationFrame:无需导入 - -createAnimator: - ``` import animator from '@ohos.animator'; ``` -## 权限列表 - -无 +## createAnimator -## requestAnimationFrame +createAnimator(options: AnimatorOptions): AnimatorResult -requestAnimationFrame(handler[, [ ...args]]): number +定义Animator类。 -请求动画帧,逐帧回调JS函数。 +**系统能力:** SystemCapability.ArkUI.ArkUI.Full -- 参数 +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | - | handler | Function | 是 | 表示要逐帧回调的函数。requestAnimationFrame函数回调handler函数时会在第一个参数位置传入timestamp时间戳。它表示requestAnimationFrame开始去执行回调函数的时刻。 | - | ...args | Array<any> | 否 | 附加参数,函数回调时,他们会作为参数传递给handler。 | + | options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项,详细请参考AnimatorOptions。| -- 返回值 +**返回值:** | 类型 | 说明 | | -------- | -------- | - | number | requestID请求的ID。 | - -- 示例 - ``` - -
- -
- ``` - - ``` - /* xxx.css */ - .container { - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - } - .btn{ - width: 300px; - margin-top: 40px; - } - ``` - - ``` - /* xxx.js */ - export default { - data: { - requestId: 0, - startTime: 0, - }, - beginAnimation() { - cancelAnimationFrame(this.requestId); - this.requestId = requestAnimationFrame(this.runAnimation); - }, - runAnimation(timestamp) { - if (this.startTime == 0) { - this.startTime = timestamp; - } - var elapsed = timestamp - this.startTime; - if (elapsed < 500) { - console.log('callback handler timestamp: ' + timestamp); - this.requestId = requestAnimationFrame(this.runAnimation); - } - } - } - ``` - - -## cancelAnimationFrame - -cancelAnimationFrame(requestId: number): void - -取消动画帧,取消逐帧回调请求。 - -- 参数 - | 参数名 | 类型 | 必填 | 说明 | - | -------- | -------- | -------- | -------- | - | requestId | number | 是 | 逐帧回调函数的标识id。 | - -- 示例 - ``` - -
- - -
- ``` + | [AnimatorResult](#animatorresult) | Animator结果接口。 | - ``` - /* xxx.css */ - .container { - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - } - .btn{ - width: 300px; - margin-top: 40px; - } - ``` +**示例:** - ``` - /* xxx.js */ - export default { - data: { - requestId: 0, - startTime: 0, - }, - beginAnimation() { - cancelAnimationFrame(this.requestId); - this.requestId = requestAnimationFrame(this.runAnimation); - }, - runAnimation(timestamp) { - if (this.startTime == 0) { - this.startTime = timestamp; - } - var elapsed = timestamp - this.startTime; - if (elapsed < 500) { - console.log('callback handler timestamp: ' + timestamp); - this.requestId = requestAnimationFrame(this.runAnimation); - } - }, - stopAnimation() { - cancelAnimationFrame(this.requestId); - } - } - ``` - - -## createAnimator - -createAnimator(options[...]): void - -创建动画对象。 - -- 参数 - | 参数名 | 类型 | 必填 | 说明 | - | -------- | -------- | -------- | -------- | - | options | Object | 是 | 表示待创建Animator对象的属性,详情见下表options说明。 | - -- options说明 - | 参数名 | 类型 | 必填 | 说明 | - | -------- | -------- | -------- | -------- | - | duration | number | 否 | 动画播放的时长,单位毫秒,默认为0。 | - | easing | string | 否 | 动画插值曲线,默认为' ease '。 | - | delay | number | 否 | 动画延时播放时长,单位毫秒,默认为0,即不延时。 | - | fill | string | 否 | 动画启停模式,默认值none,详情见:[animation-fill-mode](../arkui-js/js-components-common-animation.md) | - | direction | string | 否 | 动画播放模式,默认值normal,详情见:[animation-direction](../arkui-js/js-components-common-animation.md) | - | iterations | number | 否 | 动画播放次数,默认值1,设置为0时不播放,设置为-1时无限次播放。 | - | begin | number | 否 | 动画插值起点,不设置时默认为0。 | - | end | number | 否 | 动画插值终点,不设置时默认为1。 | - -- animator支持的接口 - | 参数名 | 类型 | 说明 | - | -------- | -------- | -------- | - | update | options | 过程中可以使用这个接口更新动画参数,入参与createAnimator一致。 | - | play | - | 开始动画。 | - | finish | - | 结束动画。 | - | pause | - | 暂停动画。 | - | cancel | - | 取消动画。 | - | reverse | - | 倒播动画。 | - -- animator支持的事件: - | 参数名 | 类型 | 说明 | - | -------- | -------- | -------- | - | frame | number | 逐帧插值回调事件,入参为当前帧的插值 | - | cancel | - | 动画被强制取消 | - | finish | - | 动画播放完成 | - | repeat | - | 动画重新播放 | - -- 示例 ```
@@ -237,3 +77,164 @@ createAnimator(options[...]): void } } ``` + +## AnimatorResult + +定义Animator结果接口。 + +### update + +update(options: AnimatorOptions): void + +更新当前动画器。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [AnimatorOptions](#animatoroptions) | 是 | 定义动画选项。| + +**示例:** +``` +animator.update(options); +``` + +### play + +play(): void + +启动动画。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.play(); +``` + +### finish + +finish(): void + +结束动画。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.finish(); +``` + +### pause + +pause(): void + +暂停动画。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.pause(); +``` + +### cancel + +cancel(): void + +删除动画。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.cancel(); +``` + +### reverse + +reverse(): void + +以相反的顺序播放动画。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.reverse(); +``` + +### onframe + +onframe: (progress: number) => void + +回调时触发。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | progress | number | 是 | 动画的当前进度。| + +**示例:** +``` +animator.onframe(); +``` + +### onfinish + +onfinish: () => void + +动画完成。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.onfinish(); +``` + +### oncancel + +oncancel: () => void + +动画被取消。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.oncancel(); +``` + +### onrepeat + +onrepeat: () => void + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** +``` +animator.onrepeat(); +``` + +动画将重复。 + +## AnimatorOptions + +定义动画选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| duration | number | 是 | 动画播放的时长,单位毫秒,默认为0。 | +| easing | string | 是 | 动画插值曲线,默认为ease'。 | +| delay | number | 是 | 动画延时播放时长,单位毫秒,默认为0,即不延时。 | +| fill | "none" \| "forwards" \| "backwards" \| "both" | 是 | 动画执行后是否恢复到初始状态,默认值为"none"。动画执行后,动画结束时的状态(在最后一个关键帧中定义)将保留。 | +| direction | "normal" \| "reverse" \| "alternate" \| "alternate-reverse" | 是 | 动画播放模式,默认值"normal"。| +| iterations | number | 是 | 动画播放次数,默认值1。设置为0时不播放,设置为-1时无限次播放。 | +| begin | number | 是 | 动画插值起点,不设置时默认为0。 | +| end | number | 是 | 动画插值终点,不设置时默认为1。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-prompt.md b/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-prompt.md new file mode 100644 index 0000000000000000000000000000000000000000..b843237d0cdd8a3e5ecd9db7630de3ea4c533d85 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-prompt.md @@ -0,0 +1,273 @@ +# 弹窗 + +> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明** +> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + +## 导入模块 + +``` +import prompt from '@ohos.prompt' +``` +## 权限列表 + +无 + +## prompt.showToast + +showToast(options: ShowToastOptions): void + +创建并显示文本提示框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [ShowToastOptions](#ShowToastOptions) | 是 | 文本弹窗选项。 | + +**示例:** + ``` + export default { + showToast() { + prompt.showToast({ + message: 'Message Info', + duration: 2000, + }); + } + } + ``` +## ShowToastOptions + +文本提示框的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| message | string | 是 | 显示的文本信息。 | +| duration | number | 否 | 默认值1500ms,建议区间:1500ms-10000ms。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 若小于1500ms则取默认值,最大取值为10000ms。 | +| bottom | <length> | 否 | 设置弹窗边框距离屏幕底部的位置。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 仅手机和平板设备支持。 | + +## prompt.showDialog + +showDialog(options: ShowDialogOptions): Promise<ShowDialogSuccessResponse> + +创建并显示对话框,对话框响应后同步返回结果。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [ShowDialogOptions](#ShowDialogOptions) | 是 | 对话框选项。| + +**返回值:** + + | 类型 | 说明 | + | -------- | -------- | + | Promise<[ShowDialogSuccessResponse](#ShowDialogSuccessResponse)> | 对话框响应结果。| + +**示例:** + + ``` + export default { + showDialog() { + prompt.showDialog({ + title: 'Title Info', + message: 'Message Info', + buttons: [ + { + text: 'button1', + color: '#000000', + }, + { + text: 'button2', + color: '#000000', + } + ], + }) + .then(data => { + console.info('showDialog success, click button: ' + data.index); + }) + .catch(err => { + console.info('showDialog error: ' + err); + }) + } + } + ``` + +## prompt.showDialog + +showDialog(options: ShowDialogOptions, callback: AsyncCallback<ShowDialogSuccessResponse>):void + +创建并显示对话框,对话框响应结果异步返回。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [ShowDialogOptions](#ShowDialogOptions) | 是 | 页面显示对话框信息描述。| + | callback | AsyncCallback<[ShowDialogSuccessResponse](#ShowDialogSuccessResponse)> | 是 | 对话框响应结果回调。 | + +**示例:** + ``` + export default { + callback(err, data) { + if(err) { + console.info('showDialog err: ' + err); + return; + } + console.info('showDialog success callback, click button: ' + data.index); + }, + showDialog() { + prompt.showDialog({ + title: 'showDialog Title Info', + message: 'Message Info', + buttons: [ + { + text: 'button1', + color: '#000000', + }, + { + text: 'button2', + color: '#000000', + } + ] + }, this.callback); + } + } + ``` + +## ShowDialogOptions + +对话框的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| title | string | 否 | 标题文本。 | +| message | string | 否 | 内容文本。 | +| buttons | Array | 否 | 对话框中按钮的数组,结构为:{text:'button', color: '\#666666'},支持1-3个按钮。其中第一个为positiveButton;第二个为negativeButton;第三个为neutralButton。 | + +## ShowDialogSuccessResponse + +对话框的响应结果。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +| 名称 | 类型 | 说明 | +| -------- | -------- | -------- | +| index | number | 选中按钮在buttons数组中的索引。 | + + +## prompt.showActionMenu + +showActionMenu(options: ActionMenuOptions, callback: AsyncCallback<ActionMenuSuccessResponse>):void + +创建并显示操作菜单,菜单响应结果异步返回。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [ActionMenuOptions](#ActionMenuOptions) | 是 | 操作菜单选项。 | + | callback | AsyncCallback<[ActionMenuSuccessResponse](#ActionMenuSuccessResponse)> | 是 | 菜单响应结果回调。 | + + +**示例:** + ``` + export default { + callback(err, data) { + if(err) { + console.info('showActionMenu err: ' + err); + return; + } + console.info('showActionMenu success callback, click button: ' + data.index); + }, + showActionMenu() { + prompt.showActionMenu({ + title: 'Title Info', + buttons: [ + { + text: 'item1', + color: '#666666', + }, + { + text: 'item2', + color: '#000000', + }, + ] + }, this.callback) + } + } + ``` + +## prompt.showActionMenu + +showActionMenu(options: ActionMenuOptions): Promise + +创建并显示操作菜单,菜单响应后同步返回结果。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [ActionMenuOptions](#ActionMenuOptions) | 是 | 操作菜单选项。 | + +**返回值:** + | 类型 | 说明 | + | -------- | -------- | + | Promise<[ActionMenuSuccessResponse](#ActionMenuSuccessResponse)> | 菜单响应结果。| + +**示例:** + ``` + export default { + showActionMenu() { + prompt.showActionMenu({ + title: 'showActionMenu Title Info', + buttons: [ + { + text: 'item1', + color: '#666666', + }, + { + text: 'item2', + color: '#000000', + }, + ] + }) + .then(data => { + console.info('showActionMenu success, click button: ' + data.index); + }) + .catch(err => { + console.info('showActionMenu error: ' + err); + }) + } + } + ``` +## ActionMenuOptions + +操作菜单的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| title | string | 否 | 标题文本。 | +| buttons | Array | 是 | 菜单中菜单项按钮的数组,结构为:{text:'button', color: '\#666666'},支持1-6个按钮。大于6个按钮时弹窗不显示。 | + +## ActionMenuSuccessResponse + +操作菜单的响应结果。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| index | number | 否 | 选中按钮在buttons数组中的索引,从0开始。 | + diff --git a/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-router.md b/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-router.md new file mode 100644 index 0000000000000000000000000000000000000000..a23600c396045139e7b0a8fcf1049e0d632c2273 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-basic-features-ohos-router.md @@ -0,0 +1,434 @@ +# 页面路由 + +> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明** +> +> - 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> - 页面路由需要在页面渲染完成之后才能调用,在onInit和onReady生命周期中页面还处于渲染阶段,禁止调用页面路由方法。 + +## 导入模块 + +``` +import router from '@ohos.router' +``` + +## 权限列表 + +无 + +## router.push + +push(options: RouterOptions): void + +跳转到应用内的指定页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [RouterOptions](#RouterOptions) | 是 | 跳转页面描述信息。 | + + +**示例:** + ``` + // 在当前页面中 + export default { + pushPage() { + router.push({ + url: 'pages/routerpage2/routerpage2', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + }, + }, + }); + } + } + ``` + ``` + // 在routerpage2页面中 + export default { + data: { + data1: 'default', + data2: { + data3: [1, 2, 3] + } + }, + onInit() { + console.info('showData1:' + this.data1); + console.info('showData3:' + this.data2.data3); + } + } + ``` + + +## router.replace + +replace(options: RouterOptions): void + +用应用内的某个页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [RouterOptions](#RouterOptions) | 是 | 替换页面描述信息。 | + +**示例:** + ``` + // 在当前页面中 + export default { + replacePage() { + router.replace({ + url: 'pages/detail/detail', + params: { + data1: 'message', + }, + }); + } + } + ``` + + ``` + // 在detail页面中 + export default { + data: { + data1: 'default' + }, + onInit() { + console.info('showData1:' + this.data1) + } + } + ``` + +## router.back + +back(options?: RouterOptions ): void + +返回上一页面或指定的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [RouterOptions](#RouterOptions) | 是 | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页。 | + +**示例:** + ``` + // index页面 + export default { + indexPushPage() { + router.push({ + url: 'pages/detail/detail', + }); + } + } + ``` + + ``` + // detail页面 + export default { + detailPushPage() { + router.push({ + url: 'pages/mall/mall', + }); + } + } + ``` + + ``` + // mall页面通过back,将返回detail页面 + export default { + mallBackPage() { + router.back(); + } + } + ``` + + ``` + // detail页面通过back,将返回index页面 + export default { + defaultBack() { + router.back(); + } + } + ``` + + ``` + // 通过back,返回到detail页面 + export default { + backToDetail() { + router.back({uri:'pages/detail/detail'}); + } + } + ``` + +## router.clear + +clear(): void + +清空页面栈中的所有历史页面,仅保留当前页面作为栈顶页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** + ``` + export default { + clearPage() { + router.clear(); + } + } + ``` + +## router.getLength + +getLength(): string + +获取当前在页面栈内的页面数量。 + +**返回值:** + | 类型 | 说明 | + | -------- | -------- | + | string | 页面数量,页面栈支持最大数值是32。 | + +**示例:** + ``` + export default { + getLength() { + var size = router.getLength(); + console.log('pages stack size = ' + size); + } + } + ``` + +## router.getState + +getState(): RouterState + +获取当前页面的状态信息。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| --------------------------- | -------------- | +| [RouterState](#RouterState) | 页面状态信息。 | +## RouterState +页面状态信息。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full。 + + | 名称 | 类型 | 说明 | + | -------- | -------- | -------- | + | index | number | 表示当前页面在页面栈中的索引。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 从栈底到栈顶,index从1开始递增。 | + | name | string | 表示当前页面的名称,即对应文件名。 | + | path | string | 表示当前页面的路径。 | + +**示例:** + ``` + export default { + getState() { + var page = router.getState(); + console.log('current index = ' + page.index); + console.log('current name = ' + page.name); + console.log('current path = ' + page.path); + } + } + ``` + +## router.enableAlertBeforeBackPage + +enableAlertBeforeBackPage(options: EnableAlertOptions): void + +开启页面返回询问对话框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + | 参数名 | 类型 | 必填 | 说明 | + | -------- | -------- | -------- | -------- | + | options | [EnableAlertOptions](#EnableAlertOptions) | 是 | 文本弹窗信息描述。 | + +**示例:** + + ``` + export default { + enableAlertBeforeBackPage() { + router.enableAlertBeforeBackPage({ + message: 'Message Info', + success: function() { + console.log('success'); + }, + fail: function() { + console.log('fail'); + }, + }); + } + } + ``` +## EnableAlertOptions + +页面返回询问对话框选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Lite。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| message | string | 是 | 询问对话框内容。 | + +## router.disableAlertBeforeBackPage + +disableAlertBeforeBackPage(): void + +禁用页面返回询问对话框。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**示例:** + ``` + export default { + disableAlertBeforeBackPage() { + router.disableAlertBeforeBackPage(); + } + } + ``` + +## router.getParams + +getParams(): Object + +获取发起跳转的页面往当前页传入的参数。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------------------------------- | +| Object | 发起跳转的页面往当前页传入的参数。 | +**示例:** + +- 类Web范示例 + ``` + // 在当前页面中 + export default { + pushPage() { + router.push({ + url: 'pages/detail/detail', + params: { + data1: 'message', + }, + }); + } + } + ``` + ``` + // 在detail页面中 + export default { + onInit() { + console.info('showData1:' + router.getParams().data1); + } + } + ``` + +- 声明式示例 + + ``` + //通过router.push跳转至目标页携带params参数 + import router from '@ohos.router' + + @Entry + @Component + struct Index { + async routePage() { + let options = { + url: 'pages/second', + params: { + text: '这是第一页的值', + data: { + array: [12, 45, 78] + }, + } + } + try { + await router.push(options) + } catch (err) { + console.info(` fail callback, code: ${err.code}, msg: ${err.msg}`) + } + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('这是第一页') + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(25) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ top: 20 }) + .backgroundColor('#ccc') + .onClick(() => { + this.routePage() + }) + } + .width('100%') + .height('100%') + } + } + ``` + + ``` + //在second页面中接收传递过来的参数 + import router from '@ohos.router' + + @Entry + @Component + struct Second { + private content: string = "这是第二页" + @State text: string = router.getParams().text + @State data: any = router.getParams().data + @State secondData : string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Text(this.text) + .fontSize(30) + .onClick(()=>{ + this.secondData = (this.data.array[1]).toString() + }) + .margin({top:20}) + Text('第一页传来的数值' + ' ' + this.secondData) + .fontSize(20) + .margin({top:20}) + .backgroundColor('red') + } + .width('100%') + .height('100%') + } + } + ``` + +## RouterOptions + +路由跳转选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Lite。 + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| url | string | 是 | 表示目标页面的uri,可以用以下两种格式:
- 页面绝对路径,由配置文件中pages列表提供,例如:
  - pages/index/index
  - pages/detail/detail
- 特殊值,如果uri的值是"/",则跳转到首页。 | +| params | Object | 否 | 跳转时要同时传递到目标页面的数据,跳转到目标页面后,参数可以在页面中直接使用,如this.data1(data1为跳转时params参数中的key值)。如果目标页面中已有该字段,则其值会被传入的字段值覆盖。 | + + + > ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** + > 页面路由栈支持的最大Page数量为32。 + diff --git a/zh-cn/application-dev/reference/apis/js-apis-hashmap.md b/zh-cn/application-dev/reference/apis/js-apis-hashmap.md index cffd137ac8152bcdad774d7135a2cdb23f22ddc0..ed609c72be5bc7b3556a759c78d8e3dd67b32c96 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hashmap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hashmap.md @@ -351,7 +351,7 @@ hashMap.forEach((value, key) => { ### entries -entries(): IterableIterator<[K, V]> +entries(): IterableIterator<[K, V]> 返回包含此映射中包含的键值对的新迭代器对象。 @@ -359,7 +359,7 @@ entries(): IterableIterator<[K, V]> | 类型 | 说明 | | -------- | -------- | -| IterableIterator<[K, V]> | 返回一个迭代器。 | +| IterableIterator<[K, V]> | 返回一个迭代器。 | **示例:** @@ -387,7 +387,7 @@ while(temp != undefined) { | 类型 | 说明 | | -------- | -------- | -| IterableIterator<[K, V]> | 返回一个迭代器。 | +| IterableIterator<[K, V]> | 返回一个迭代器。 | **示例:** ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-list.md b/zh-cn/application-dev/reference/apis/js-apis-list.md index 4caf882c015ee5feb18226bdc5ed4a552a693526..4a986350a38174f2f037b84ecdec23921972a95a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-list.md +++ b/zh-cn/application-dev/reference/apis/js-apis-list.md @@ -578,7 +578,7 @@ getLast(): T **示例:** ``` -let list = new Vector(); +let list = new List(); list.add(2); list.add(4); list.add(5); diff --git a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md index be8fbccd2715f4acdd8d7febbd4f1479f95dbe48..498e53cbf54f3b9ee2838b9eb7b2d02f6e28d0c4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md +++ b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md @@ -416,7 +416,7 @@ plainArray.clear(); ### forEach -forEach(callbackfn: (value: T, index?: number, PlainArray?: PlainArray) => void, thisArg?: Object): void +forEach(callbackfn: (value: T, index?: number, PlainArray?: PlainArray<T>) => void, thisArg?: Object): void 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 @@ -432,7 +432,7 @@ callbackfn的参数说明: | -------- | -------- | -------- | -------- | | value | T | 是 | 当前遍历到的元素键值对的值。 | | index | number | 否 | 当前遍历到的元素键值对的键。 | -| plainArray | PlainArray | 否 | 当前调用forEach方法的实例对象。 | +| PlainArray | PlainArray<T>| 否 | 当前调用forEach方法的实例对象。 | **示例:** @@ -456,7 +456,7 @@ plainArray.forEach((value, key) => { | 类型 | 说明 | | -------- | -------- | -| IterableIterator<[number, T]> | 返回一个迭代器。 | +| IterableIterator<[number, T]> | 返回一个迭代器。 | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-app.md b/zh-cn/application-dev/reference/apis/js-apis-system-app.md index 6ceb384650f9b4c8bd8526fb198bc86788f36474..85cd58a7311f9c95214cb7661442f95220c87723 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-app.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-app.md @@ -16,21 +16,17 @@ import app from '@system.app'; ## app.getInfo -getInfo(): <AppResponse> +getInfo(): AppResponse 获取当前应用配置文件中声明的信息。 **系统能力:** SystemCapability.ArkUI.ArkUI.Lite **返回值:** -**表1** AppResponse -| 参数名 | 类型 | 说明 | -| -------- | -------- | -------- | -| appID6+ | string | 表示应用的包名,用于标识应用的唯一性。 | -| appName | string | 表示应用的名称。 | -| versionName | string | 表示应用的版本名称。 | -| versionCode | number | 表示应用的版本号。 | +| 参数类型 | 说明 | +| -------- | -------- | +| [AppResponse](#appresponse) | 定义AppResponse信息。 | **示例:** @@ -43,41 +39,6 @@ getInfo(): <AppResponse> } ``` -## app.screenOnVisible - -screenOnVisible(Object): void - -应用申请息屏不返回主表盘,再次亮屏依旧显示应用界面。 - -**系统能力:** SystemCapability.ArkUI.ArkUI.Full - -**参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------- | -------- | -------- | -| visible | boolean | 否 | 是否启动保活,默认值false。 | -| success | Function | 否 | 接口调用成功的回调函数。 | -| fail | Function | 否 | 接口调用失败的回调函数。 | -| complete | Function | 否 | 接口调用结束的回调函数。 | - -**示例:** - - ``` - export default { - screenOnVisible(){ - app.screenOnVisible({ - visible: true, - success() { - console.log('call app.keepVisible success'); - }, - fail(data, code) { - console.log('call app.keepVisible fail'); - }, - }); - } - } - ``` - - ## app.terminate terminate(): void @@ -94,10 +55,9 @@ terminate(): void app.terminate(); }} ``` - ## app.requestFullWindow -requestFullWindow(duration: number): void +requestFullWindow(options?: RequestFullWindowOptions): void 请求应用以全窗口运行,FA在某些场景下(如半模态FA)会以非全窗口运行,调用该接口会从非全窗口切换为全窗口运行,如果已经以全窗口运行则该接口调用无效。 @@ -108,7 +68,7 @@ requestFullWindow(duration: number): void **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| duration | number | 否 | 请求全屏时,设定非全屏到全屏的过渡时间,单位为毫秒,默认时间与非全屏到全屏的距离成正比。 | +| options | [RequestFullWindowOptions](#requestfullwindowoptions) | 否 | 请求全屏时,设定非全屏到全屏的过渡时间,单位为毫秒,默认时间与非全屏到全屏的距离成正比。 | **示例:** @@ -119,4 +79,81 @@ requestFullWindow(duration: number): void duration: 200}); } } - ``` + ``` + +## app.setImageCacheCount + +setImageCacheCount(value: number): void + +设置解码图像计数的图像缓存容量。如果未设置,应用程序将不会缓存任何解码图像。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| value | number | 否 | 解码图像计数的值容量。 | + +## app.setImageRawDataCacheSize + +setImageRawDataCacheSize(value: number): void + +在解码前设置原始图像数据大小的图像缓存容量(以字节为单位)。如果未设置,应用程序将不会缓存任何原始图像数据。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| value | number | 否 | 原始图像数据大小的值容量(以字节为单位)。 | + + +## app.setImageFileCacheSize + +setImageFileCacheSize(value: number): void + +在解码前设置磁盘上的图像文件缓存大小(以字节为单位)。如果未设置,应用程序将在磁盘上缓存100MB图像文件。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| value | number | 否 | 原始图像数据大小的值容量(以字节为单位)。 | + +## AppResponse + +定义AppResponse信息。 + +**系统能力:** 以下各项对应的系统能力有所不同,详见下表。 + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- |-------- | +| appID6+ | string | 是 | 表示应用的包名,用于标识应用的唯一性。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full| +| appName | string | 是 | 表示应用的名称。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite| +| versionName | string | 是 | 表示应用的版本名称。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite| +| versionCode | number | 是 | 表示应用的版本号。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite| + +## ScreenOnVisibleOptions + +定义屏幕上可见接口的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| visible | boolean | 否 | 是否启动保活,默认值false。 | +| success | () => void | 否 | 接口调用成功的回调函数。 | +| fail | (data: string, code: number) => void | 否 | 接口调用失败的回调函数。 | +| complete | () => void | 否 | 接口调用结束的回调函数。 | + +## RequestFullWindowOptions + +定义RequestFullWindow接口的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| duration | number | 是 | 定义动画选项的数量。 | + diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-mediaquery.md b/zh-cn/application-dev/reference/apis/js-apis-system-mediaquery.md index 08ca1c593baa21327cd0ce4bf589c16fe1413025..29a7a02c3d111dc386a769351083af1b6a9b8b50 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-mediaquery.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-mediaquery.md @@ -15,7 +15,7 @@ import mediaquery from '@system.mediaquery'; ## mediaquery.matchMedia -matchMedia(condition: string): <MediaQueryList> +matchMedia(condition: string): MediaQueryList 根据媒体查询条件,创建MediaQueryList对象。 @@ -28,11 +28,10 @@ matchMedia(condition: string): <MediaQueryList> | condition | string | 是 | 用于查询的条件。 | **返回值:** -**表1** MediaQueryList -| 参数名 | 类型 | 说明 | -| -------- | -------- | -------- | -| MediaQueryList | Object | 表示创建MediaQueryList对象的属性,详情见下表 MediaQueryList说明。 | +| 参数类型 | 说明 | +| -------- | -------- | +| MediaQueryList | 表示创建MediaQueryList对象的属性,详情见下表 MediaQueryList说明。 | **示例:** @@ -44,18 +43,47 @@ export default { } ``` - **表2** MediaQueryList说明 +## MediaQueryEvent -| 参数名 | 类型 | 说明 | -| -------- | -------- | -------- | -| matches | boolean | 如果查询条件匹配成功则返回true,否则返回值为false。只读。 | -| media | string | 序列化的媒体查询条件,只读。 | -| onchange | Function | matches状态变化时的执行函数。 | +定义MediaQuery事件。 +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| matches | boolean | 是 | 匹配结果。 | + +## MediaQueryList + +定义MediaQuery列表信息。 + +### 属性 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full -## MediaQueryList.addListener +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| media | string | 否 | 序列化媒体查询条件,该参数为只读。 | +| matches | boolean | 是 | 匹配结果。 | + +### onchange + +onchange?: (matches: boolean) => void + +matches状态变化时的执行函数。 -addListener(Object): void +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| matches | boolean | 是 | matches状态变化时值。 | + + +### MediaQueryList.addListener + +addListener(callback: (event: MediaQueryEvent) => void): void 给MediaQueryList添加回调函数,回调函数应在onShow生命周期之前添加,即需要在onInit或onReady生命周期里添加。 @@ -65,28 +93,18 @@ addListener(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| callback | Function | 是 | 匹配条件发生变化的响应函数。 | +| callback | (event: MediaQueryEvent) => void | 是 | 匹配条件发生变化的响应函数。 | **示例:** ``` -export default { - onReady() { - var mMediaQueryList = mediaquery.matchMedia('(max-width: 466)'); - function maxWidthMatch(e) { - if (e.matches) { - // do something - } - } - mMediaQueryList.addListener(maxWidthMatch); - }, -} +mMediaQueryList.addListener(maxWidthMatch); ``` -## MediaQueryList.removeListener +### MediaQueryList.removeListener -removeListener(Object): void +removeListener(callback: (event: MediaQueryEvent) => void): void 移除MediaQueryList中的回调函数。 @@ -96,10 +114,14 @@ removeListener(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| callback | Function | 是 | 匹配条件发生变化的响应函数。 | +| callback | (event: MediaQueryEvent) => void) | 是 | 匹配条件发生变化的响应函数。 | **示例:** ``` -query.removeListener(minWidthMatch); -``` \ No newline at end of file +mMediaQueryList.removeListener(maxWidthMatch); +``` + + + + diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-router.md b/zh-cn/application-dev/reference/apis/js-apis-system-router.md index a6264dc54e263d4a3f1223736463d624c95d31de..db092ade8ea510636bfc4f3695c6a89b51b87401 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-router.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-router.md @@ -13,7 +13,7 @@ import router from '@system.router'; ## router.push -push(Object): void +push(options: RouterOptions): void 跳转到应用内的指定页面。 @@ -23,8 +23,7 @@ push(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| uri | string | 是 | 表示目标页面的uri,可以用以下两种格式:
- 页面绝对路径,由配置文件中pages列表提供,例如:
  - pages/index/index
  - pages/detail/detail
- 特殊值,如果uri的值是"/",则跳转到首页。 | -| params | Object | 否 | 跳转时要同时传递到目标页面的数据,跳转到目标页面后,参数可以在页面中直接使用,如this.data1(data1为跳转时params参数中的key值)。如果目标页面中已有该字段,则其值会被传入的字段值覆盖。 | +| options | [RouterOptions](#routeroptions) | 是 | 页面路由参数,详细请参考RouterOptions。| **示例:** @@ -68,7 +67,7 @@ export default { ## router.replace -replace(Object): void +replace(options: RouterOptions): void 用应用内的某个页面替换当前页面,并销毁被替换的页面。 @@ -78,8 +77,7 @@ replace(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| uri | string | 是 | 目标页面的uri,可以是以下的两种格式:
- 页面绝对路径,由配置文件中pages列表提供,例如:
  - pages/index/index
  - pages/detail/detail
- 特殊值,如果uri的值是"/",则跳转到首页。 | -| params | Object | 否 | 跳转时要同时传递到目标页面的数据,跳转到目标页面后,参数可以在页面中直接使用,如this.data1(data1为跳转时params参数中的key值)。如果目标页面中已有该字段,则其值会被传入的字段值覆盖。 | +| options | [RouterOptions](#routeroptions) | 是 | 页面路由参数,详细请参考RouterOptions。| **示例:** @@ -112,7 +110,7 @@ export default { ## router.back -back(Object): void +back(options?: BackRouterOptions): void 返回上一页面或指定的页面。 @@ -122,8 +120,7 @@ back(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| uri | string | 否 | 返回到指定uri的界面,如果页面栈上没有uri页面,则不响应该情况。如果uri未设置,则返回上一页。 | -| params | Object | 否 | 跳转时要同时传递到目标页面的数据 | +| options | [BackRouterOptions](#backrouteroptions) | 是 | 详细请参考BackRouterOptions。| **示例:** @@ -183,6 +180,20 @@ export default { > ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** > 示例中的uri字段是页面路由,由配置文件中的pages列表指定。 +## router.getParams + +getParams(): ParamsInterface + +获取当前页面的参数信息。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| -------- | -------- | +| [ParamsInterface](#paramsinterface) | 详细请参见ParamsInterface。| + ## router.clear clear(): void @@ -228,20 +239,17 @@ export default { ## router.getState -getState(): <RouterState> +getState(): RouterState 获取当前页面的状态信息。 **系统能力:** SystemCapability.ArkUI.ArkUI.Full **返回值:** -**表1** RouterState -| 参数名 | 类型 | 说明 | -| -------- | -------- | -------- | -| index | number | 表示当前页面在页面栈中的索引。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 从栈底到栈顶,index从1开始递增。 | -| name | string | 表示当前页面的名称,即对应文件名。 | -| path | string | 表示当前页面的路径。 | +| 参数类型 | 说明 | +| -------- | -------- | +| [RouterState](#routerstate) | 详细请参见RouterState。| **示例:** @@ -258,7 +266,7 @@ export default { ## router.enableAlertBeforeBackPage6+ -enableAlertBeforeBackPage(Object): void +enableAlertBeforeBackPage(options: EnableAlertBeforeBackPageOptions): void 开启页面返回询问对话框。 @@ -268,10 +276,7 @@ enableAlertBeforeBackPage(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| message | string | 是 | 询问对话框内容。 | -| success | () => void | 否 | 接口调用成功的回调函数。 | -| fail | () => void | 否 | 接口调用失败的回调函数。 | -| complete | () => void | 否 | 接口调用结束的回调函数。 | +| options | [EnableAlertBeforeBackPageOptions](#EnableAlertbeforebackpageoptions) | 是 | 详细请参见EnableAlertBeforeBackPageOptions。 | **示例:** @@ -293,7 +298,7 @@ export default { ## router.disableAlertBeforeBackPage6+ -disableAlertBeforeBackPage(Object): void +disableAlertBeforeBackPage(options?: DisableAlertBeforeBackPageOptions): void 禁用页面返回询问对话框。 @@ -303,9 +308,7 @@ disableAlertBeforeBackPage(Object): void | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | -| success | () => void | 否 | 接口调用成功的回调函数。 | -| fail | () => void | 否 | 接口调用失败的回调函数。 | -| complete | () => void | 否 | 接口调用结束的回调函数。 | +| options | [DisableAlertBeforeBackPageOptions](#disablealertbeforebackpageoptions)| 否 | 详细请参见DisableAlertBeforeBackPageOptions。 | **示例:** @@ -324,3 +327,68 @@ export default { } ``` +## RouterOptions + +定义路由器的选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Lite + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| uri | string | 是 | 目标页面的uri,可以是以下的两种格式:
1. 页面的绝对路径,由config.json文件中的页面列表提供。例如:
- pages/index/index
-pages/detail/detail
2. 特定路径。如果URI为斜杠(/),则显示主页。 | +| params | Object | 否 | 跳转时要同时传递到目标页面的数据,跳转到目标页面后,参数可以在页面中直接使用,如this.data1(data1为跳转时params参数中的key值)。如果目标页面中已有该字段,则其值会被传入的字段值覆盖。 | + + +## BackRouterOptions + +定义路由器返回的选项。 + +**系统能力:** 以下各项对应的系统能力有所不同,详见下表。 + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| uri | string | 否 | 返回到指定uri的界面,如果页面栈上没有uri页面,则不响应该情况。如果uri未设置,则返回上一页。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full| +| params | Object | 否 | 跳转时要同时传递到目标页面的数据。
**系统能力:** SystemCapability.ArkUI.ArkUI.Lite| + +## RouterState + +定义路由器的状态。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- |-------- | +| index | number | 是 | 表示当前页面在页面栈中的索引。从栈底到栈顶,index从1开始递增。 | +| name | string | 是 | 表示当前页面的名称,即对应文件名。 | +| path | string | 是 | 表示当前页面的路径。 | + +## EnableAlertBeforeBackPageOptions6+ + +定义EnableAlertBe beforeBackPage选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| message | string | 是 | 询问对话框内容。 | +| success | (errMsg: string) => void | 否 | 弹出对话框时调用,errMsg表示返回信息。 | +| fail | (errMsg: string) => void | 否 | 接口调用失败的回调函数,errMsg表示返回信息。 | +| complete | () => void | 否 | 接口调用结束的回调函数。 | + +## DisableAlertBeforeBackPageOptions6+ + +定义DisableAlertBeforeBackPage参数选项。 + +**系统能力:** 以下各项对应的系统能力均为SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 参数类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +| success | (errMsg: string) => void | 否 | 弹出对话框时调用,errMsg表示返回信息。 | +| fail | (errMsg: string) => void | 否 | 接口调用失败的回调函数,errMsg表示返回信息。| +| complete | () => void | 否 | 接口调用结束的回调函数。 | + +## ParamsInterface + +| 名称 | 参数类型 | 说明 | +| -------- | -------- | -------- | +| [key: string] | Object| 路由参数列表。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-treemap.md b/zh-cn/application-dev/reference/apis/js-apis-treemap.md index d49b3e210e250dac04158bf37f36622d79885db5..2af66500fe33f80c927be0ce08e8b8b0a5bff44d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treemap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treemap.md @@ -195,7 +195,7 @@ let result = treeMap.getLastKey(); setAll(map: TreeMap): void -将一个treemap中的所有元素组添加到另一个treeMap中。 +将一个TreeMap中的所有元素组添加到另一个TreeMap中。 **参数:** @@ -218,7 +218,7 @@ treeMap.setAll(map); set(key: K, value: V): Object -向treemap中添加一组数据。 +向容器中添加一组数据。 **参数:** @@ -330,7 +330,7 @@ let result = treeMap.getHigherKey("sdfs"); replace(key: K, newValue: V): boolean -对TreeMap中一组数据进行更新(替换)。 +对容器中一组数据进行更新(替换)。 **参数:** @@ -358,7 +358,7 @@ let result = treeMap.replace("sdfs", 357); clear(): void -清除TreeMap中的所有元素,并把length置为0。 +清除容器中的所有元素,并把length置为0。 **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-treeset.md b/zh-cn/application-dev/reference/apis/js-apis-treeset.md index 473db461ba74cc8b961402595ee66d9abea2c3d7..b55013bd1deb75c13f43b13028724d54f25d2cc4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treeset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treeset.md @@ -139,7 +139,7 @@ let result = treeSet.getLastValue(); add(value: T): boolean -向TreeSet中添加一组数据。 +向容器中添加一组数据。 **参数:** diff --git a/zh-cn/application-dev/website.md b/zh-cn/application-dev/website.md index 207bf47591d88f88ddf0a5f7fe0d3ee0a6f174e2..a723fb9ccdacc5ed95a57600b68269c2497c59d3 100644 --- a/zh-cn/application-dev/website.md +++ b/zh-cn/application-dev/website.md @@ -18,7 +18,7 @@ - [应用开发包结构说明](quick-start/package-structure.md) - [资源文件的分类](quick-start/basic-resource-file-categories.md) - 开发 - - [Ability开发](ability/Readme-CN.md) + - Ability开发 - [Ability框架概述](ability/ability-brief.md) - FA模型 - [FA模型综述](ability/fa-brief.md) @@ -35,7 +35,7 @@ - 其他 - [WantAgent使用指导](ability/wantagent.md) - [Ability助手使用指导](ability/ability-assistant-guidelines.md) - - [UI开发](ui/Readme-CN.md) + - UI开发 - [方舟开发框架(ArkUI)概述](ui/arkui-overview.md) - 基于JS扩展的类Web开发范式 - [概述](ui/ui-js-overview.md) diff --git a/zh-cn/device-dev/driver/driver-peripherals-light-des.md b/zh-cn/device-dev/driver/driver-peripherals-light-des.md index 2e0ba1e5c9cdbf36e5eb07d1e83e241d463aed35..eea5df18f69350273e96ed602b35ce8e764d4d24 100644 --- a/zh-cn/device-dev/driver/driver-peripherals-light-des.md +++ b/zh-cn/device-dev/driver/driver-peripherals-light-des.md @@ -1,17 +1,5 @@ # LIGHT -- [概述](##概述) - - [功能简介](###功能简介) - - [运作机制](###运作机制) - -- [开发指导](##开发指导) - - - [场景介绍](###场景介绍) - - - [接口说明](###接口说明) - - [开发步骤](###开发步骤) - - [调测验证](###调测验证) - ## 概述 @@ -21,7 +9,7 @@ **图 1** Light驱动模型图 -![Light驱动模型图](figures/Light%E9%A9%B1%E5%8A%A8%E6%A8%A1%E5%9E%8B%E5%9B%BE.png) +![Light驱动模型图](figures/Light驱动模型图.png) ### 运作机制 @@ -29,7 +17,7 @@ **图 2** Light驱动运行图 -![Light驱动运行图](figures/Light%E9%A9%B1%E5%8A%A8%E8%BF%90%E8%A1%8C%E5%9B%BE.png) +![Light驱动运行图](figures/Light驱动运行图.png) Light驱动模型以标准系统Hi3516DV300为例,介绍整个驱动加载及运行流程: diff --git a/zh-cn/device-dev/driver/driver-platform-pin-develop.md b/zh-cn/device-dev/driver/driver-platform-pin-develop.md index 3e098c1fd43fb59d5a347958817e681e76ede03b..890e385759a8fc987a2ec306b07f8375ecf373c5 100755 --- a/zh-cn/device-dev/driver/driver-platform-pin-develop.md +++ b/zh-cn/device-dev/driver/driver-platform-pin-develop.md @@ -1,21 +1,12 @@ -# PIN +# PIN -- [概述](#section1_PinDevelop) - - [功能简介](#section2_PinDevelop) - - [基本概念](#section3_PinDevelop) - - [运作机制](#section4_PinDevelop) - - [约束与限制](#section5_PinDevelop) -- [使用指导](#section6_PinDevelop) - - [场景介绍](#section7_PinDevelop) - - [接口说明](#section8_PinDevelop) - - [开发步骤](#section9_PinDevelop) -## 概述 +## 概述 -### 功能简介 +### 功能简介 PIN即管脚控制器,用于统一管理各SoC厂商管脚资源,对外提供管脚复用功能。 -### 基本概念 +### 基本概念 PIN是一个软件层面的概念,目的是为了统一各SoC厂商PIN管脚管理,对外提供管脚复用功能,配置PIN管脚的电气特性。 @@ -27,26 +18,26 @@ PIN是一个软件层面的概念,目的是为了统一各SoC厂商PIN管脚 由于芯片自身的引脚数量有限,无法满足日益增多的外接需求。此时可以通过软件层面的寄存器设置,让引脚工作在不同的状态,从而实现相同引脚完成不同功能的目的。 -### 运作机制 +### 运作机制 -在HDF框架中,PIN模块暂不支持用户态,所以不需要发布服务,接口适配模式采用无服务模式(如图1所示),用于不需要在用户态提供API的设备类型,或者没有用户态和内核区分的OS系统,其关联方式是DevHandle直接指向设备对象内核态地址(DevHandle是一个void类型指针)。 +在HDF框架中,PIN模块暂不支持用户态,所以不需要发布服务,接口适配模式采用无服务模式(如[图1](#无服务模式结构图)所示),用于不需要在用户态提供API的设备类型,或者没有用户态和内核区分的OS系统,其关联方式是DevHandle直接指向设备对象内核态地址(DevHandle是一个void类型指针)。 PIN模块各分层作用:接口层提供获取PIN管脚、设置PIN管脚推拉方式、获取PIN管脚推拉方式、设置PIN管脚推拉强度、获取PIN管脚推拉强度、设置PIN管脚功能、获取PIN管脚功能、释放PIN管脚的接口。核心层主要提供PIN管脚资源匹配,PIN管脚控制器的添加、移除以及管理的能力,通过钩子函数与适配层交互。适配层主要是将钩子函数的功能实例化,实现具体的功能。 **图 1** 无服务模式结构图 -![image1](figures/无服务模式结构图.png) +![无服务模式结构图](figures/无服务模式结构图.png) -### 约束与限制 +### 约束与限制 - PIN模块目前仅支持轻量和小型系统内核(LiteOS)。 +PIN模块目前仅支持轻量和小型系统内核(LiteOS)。 -## 开发指导 +## 开发指导 -### 场景介绍 +### 场景介绍 PIN模块主要用于管脚资源管理。在各SoC厂商对接HDF框架时,需要来适配PIN驱动。 -### 接口说明 +### 接口说明 通过以下PinCntlrMethod中的函数调用PIN驱动对应的函数。 PinCntlrMethod定义: @@ -73,7 +64,7 @@ struct PinCntlrMethod { | SetPinFunc | **cntlr**:结构体指针,核心层Pin控制器;
**index**:uint32_t变量,管脚索引号;
**funcName**:char指针常量,传入Pin管脚功能; | 无 | HDF_STATUS相关状态 | PIN设置管脚功能 | | GetPinFunc | **cntlr**:结构体指针,核心层Pin控制器;
**index**:uint32_t变量,管脚索引号; | **funcName**:char双重指针常量,传出Pin管脚功能; | HDF_STATUS相关状态 | PIN获取管脚功能 | -### 开发步骤 +### 开发步骤 PIN模块适配包含以下四个步骤: @@ -85,7 +76,7 @@ PIN模块适配包含以下四个步骤: 1. **实例化驱动入口:** - 实例化HdfDriverEntry结构体成员。 - 驱动开发首先需要实例化驱动入口,驱动入口必须为HdfDriverEntry(在 hdf_device_desc.h 中定义)类型的全局变量,且moduleName要和device_info.hcs中保持一致。 + 驱动开发首先需要实例化驱动入口,驱动入口必须为HdfDriverEntry(在 hdf_device_desc.h 中定义)类型的全局变量,且moduleName要和device_info.hcs中保持一致。 - 调用HDF_INIT将HdfDriverEntry实例化对象注册到HDF框架中。 一般在加载驱动时HDF会先调用Init函数加载该驱动。当Init调用异常时,HDF框架会调用Release释放驱动资源并退出。 @@ -292,7 +283,7 @@ PIN模块适配包含以下四个步骤: HdfDeviceObject这个是整个驱动对外暴露的接口参数,具备HCS配置文件的信息。 返回值: - HDF\_STATUS相关状态 (下表为部分展示,如需使用其他状态,可见/drivers/framework/include/utils/hdf\_base.h中HDF\_STATUS 定义)。 + HDF\_STATUS相关状态(下表为部分展示,如需使用其他状态,可见/drivers/framework/include/utils/hdf\_base.h中HDF\_STATUS 定义)。 | **状态(值)** | **问题描述** | | ---------------------- | -------------- | diff --git a/zh-cn/device-dev/porting/Readme-CN.md b/zh-cn/device-dev/porting/Readme-CN.md index 8154f0b712fd9c0823295e897d14b69a796d61e0..014cfa66bcf060783e552542de6a7f9f859dee8b 100755 --- a/zh-cn/device-dev/porting/Readme-CN.md +++ b/zh-cn/device-dev/porting/Readme-CN.md @@ -52,7 +52,7 @@ repo init -u https://gitee.com/openharmony-sig/manifest.git -b master -m devboar - [标准系统芯片移植指导](standard-system-porting-guide.md) - [标准系统移植指南](standard-system-porting-guide.md) - [一种快速移植OpenHarmony Linux内核的方法](porting-linux-kernel.md) -- [轻量和小型系统三方库移植指导]( porting-thirdparty.md) +- [轻量和小型系统三方库移植指导](porting-thirdparty.md) - [概述](porting-thirdparty-overview.md) - [CMake方式组织编译的库移植](porting-thirdparty-cmake.md) - [Makefile方式组织编译的库移植](porting-thirdparty-makefile.md) diff --git a/zh-cn/device-dev/porting/porting-linux-kernel.md b/zh-cn/device-dev/porting/porting-linux-kernel.md index 1139514ab02e862a9d5e2a59ff9bcecab4c640c1..f54b3a7b8d3ebb42b858459d7783f44e0423f85b 100644 --- a/zh-cn/device-dev/porting/porting-linux-kernel.md +++ b/zh-cn/device-dev/porting/porting-linux-kernel.md @@ -1,16 +1,5 @@ # 一种快速移植OpenHarmony Linux内核的方法 -- [移植概述](#移植概述) -- [移植到三方芯片平台的整体思路](#移植到三方芯片平台的整体思路) - - [内核态层和用户态层](#内核态层和用户态层) - - [获得内核态层的两种方法](#获得内核态层的两种方法) - - [借助已有Linux内核来移植OpenHarmony的流程](#section1233187263176) -- [移植到三方芯片平台的步骤](#移植到三方芯片平台的步骤) - - [整体构建环境的准备](#整体构建环境的准备) - - [内核态基础代码的移植](#内核态基础代码的移植) - - [内核态必选特性HDF的移植](#内核态必选特性hdf的移植) - - [编译Image](#编译image) - - [编译和运行HDF测试用例(可选)](#编译和运行hdf测试用例-可选-) ## 移植概述 diff --git a/zh-cn/device-dev/quick-start/quickstart-lite-package-environment.md b/zh-cn/device-dev/quick-start/quickstart-lite-package-environment.md index 38f2e8b970ae52e01a372a44dd8607184bf46003..42c4c162fb6fd745b154dff2ac71c98e27f04eb5 100644 --- a/zh-cn/device-dev/quick-start/quickstart-lite-package-environment.md +++ b/zh-cn/device-dev/quick-start/quickstart-lite-package-environment.md @@ -1,8 +1,5 @@ # 使用安装包方式搭建编译环境 -- [安装必要的库和工具](#section108201740181219) -- [安装hb](#section15794154618411) -- [安装LLVM\(仅OpenHarmony\_v1.x分支/标签需要\)](#section711117144296) 使用安装包方式搭建Ubuntu编译环境步骤如下: diff --git a/zh-cn/device-dev/subsystems/subsys-toolchain-hiperf.md b/zh-cn/device-dev/subsystems/subsys-toolchain-hiperf.md index f90216596234bac89303afbc7053b4b5b6988544..8a5476185d5eed517aeff04f49d4efc3e4f3f710 100644 --- a/zh-cn/device-dev/subsystems/subsys-toolchain-hiperf.md +++ b/zh-cn/device-dev/subsystems/subsys-toolchain-hiperf.md @@ -1,17 +1,6 @@ # hiperf 使用指南 -- [list 命令](#list-命令) - - [参数说明](#参数说明) - - [使用示例](#使用示例) -- [stat 命令](#stat-命令) - - [参数说明](#参数说明) - - [使用示例](#使用示例) - - [字段说明](#字段说明) -- [record 命令](#record-命令) - - [参数说明](#参数说明) - - [使用示例](#使用示例) -- [report 命令](#report-命令) -- [使用示例](#使用示例) + hiperf是为开发人员提供性能采样分析的工具,基于内核perf机制进行的用户态能力的扩展,可以对指定的程序或者整个系统进行性能采样。 diff --git a/zh-cn/device-dev/website.md b/zh-cn/device-dev/website.md index 586eb494bbed246fdd0feb2e51bc1bfd313e0e66..d0b44faff3234d77c7397add1d1db00087f98068 100644 --- a/zh-cn/device-dev/website.md +++ b/zh-cn/device-dev/website.md @@ -362,7 +362,7 @@ - [DFX](subsystems/subsys-dfx.md) - 专题 - - [HPM Part](hpm-part/Readme-CN.md) + - HPM Part - [HPM Part介绍](hpm-part/hpm-part-about.md) - [HPM Part开发指导](hpm-part/hpm-part-development.md) - [HPM Part参考](hpm-part/hpm-part-reference.md) @@ -388,7 +388,7 @@ - 参考 - - [常见问题-设备开发](faqs/Readme-CN.md) + - 常见问题-设备开发 - [常见问题概述](faqs/faqs-overview.md) - [环境搭建常见问题](faqs/faqs-environment-setup.md) - [编译构建子系统常见问题](faqs/faqs-building.md) diff --git a/zh-cn/release-notes/api-change/v3.1-Release/changelog-v3.1-release.md b/zh-cn/release-notes/api-change/v3.1-Release/changelog-v3.1-release.md new file mode 100644 index 0000000000000000000000000000000000000000..570a1c598c434e7aed19caab163158370a293eb3 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/changelog-v3.1-release.md @@ -0,0 +1,16 @@ +# ChangeLog +**关键的接口/组件变更** +## XXX子系统 +### cl.rpc.1 sendRequest返回值类型变更 + +#### 变更影响 +…… + +#### 关键的接口/组件变更 +**模块** +**接口** +**变更后接口** +…… + +#### 适配指导 +…… diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ability.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ability.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-access-control.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-access-control.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-access-control.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-accessibility.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-accessibility.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-accessibility.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-account.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-account.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-account.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ace.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ace.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-ace.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-battery.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-battery.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-battery.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-bundle.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-bundle.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-bundle.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-communicate.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-communicate.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-communicate.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-complier-and-runtime.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-complier-and-runtime.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-complier-and-runtime.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-config-policy.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-config-policy.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-config-policy.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-dfx.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-dfx.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-dfx.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-distributed-data.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-distributed-data.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-distributed-data.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-LTS/js-apidiff-v3.1-LTS.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-distributed-hardware.md similarity index 100% rename from zh-cn/release-notes/api-change/v3.1-LTS/js-apidiff-v3.1-LTS.md rename to zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-distributed-hardware.md diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-event-and-notification.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-event-and-notification.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-event-and-notification.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-file-management.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-file-management.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-file-management.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-geolocation.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-geolocation.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-geolocation.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-global.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-global.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-global.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-graphic.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-graphic.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-graphic.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-misc.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-misc.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-misc.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multi-modal-input.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multi-modal-input.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multi-modal-input.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multimedia.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multimedia.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-multimedia.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-network.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-network.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-network.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-recovery.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-recovery.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-recovery.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-resource-scheduler.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-resource-scheduler.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-resource-scheduler.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-security.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-security.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-security.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-sensor.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-sensor.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-sensor.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-settings.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-settings.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-settings.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-soft-bus.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-soft-bus.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-soft-bus.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-telephony.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-telephony.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-telephony.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-update.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-update.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-update.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-usb.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-usb.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-usb.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-user-authentication.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-user-authentication.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-user-authentication.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-v3.1-release.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-v3.1-release.md new file mode 100644 index 0000000000000000000000000000000000000000..4c655b742d78cf5c842eb8c132e3352e2fc8fbef --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-v3.1-release.md @@ -0,0 +1,37 @@ +# JS API Diff + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本的JS API变更,参见各子系统的详细记录: +- [元能力](js-apidiff-ability.md) +- [程序访问控制](js-apidiff-access-control.md) +- [无障碍](js-apidiff-accessibility.md) +- [帐号](js-apidiff-account.md) +- [ArkUI开发框架](js-apidiff-ace.md) +- [电源服务](js-apidiff-battery.md) +- [包管理](js-apidiff-bundle.md) +- [基础通信](js-apidiff-communicate.md) +- [语言编译器运行时](js-apidiff-complier-and-runtime.md) +- [定制](js-apidiff-config-policy.md) +- [DFX](js-apidiff-dfx.md) +- [分布式数据管理](js-apidiff-distributed-data.md) +- [分布式硬件](js-apidiff-distributed-hardware.md) +- [事件通知](js-apidiff-event-and-notification.md) +- [文件管理](js-apidiff-file-management.md) +- [位置服务](js-apidiff-geolocation.md) +- [全球化](js-apidiff-global.md) +- [图形图像](js-apidiff-graphic.md) +- [Misc软件服务](js-apidiff-misc.md) +- [多模输入](js-apidiff-multi-modal-input.md) +- [OS媒体软件](js-apidiff-multimedia.md) +- [网络管理](js-apidiff-network.md) +- [启动恢复](js-apidiff-recovery.md) +- [资源调度](js-apidiff-resource-scheduler.md) +- [安全基础能力](js-apidiff-security.md) +- [泛Sensor服务](js-apidiff-sensor.md) +- [应用](js-apidiff-settings.md) +- [软总线](js-apidiff-soft-bus.md) +- [电话服务](js-apidiff-telephony.md) +- [升级服务](js-apidiff-update.md) +- [USB服务](js-apidiff-usb.md) +- [用户IAM](js-apidiff-user-authentication.md) +- [窗口管理](js-apidiff-window.md) + diff --git a/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-window.md b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-window.md new file mode 100644 index 0000000000000000000000000000000000000000..dce4c7f9e083fd237d29ff4bc4ff0ca53ba0c2f4 --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/js-apidiff-window.md @@ -0,0 +1,14 @@ +# xxx子系统JS API变更 + +OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,XXX子系统的API变更如下: + +## 接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/native-apidiff-v3.1-release.md b/zh-cn/release-notes/api-change/v3.1-Release/native-apidiff-v3.1-release.md new file mode 100644 index 0000000000000000000000000000000000000000..a9dcb0efdc5d35935032b5fef431320686d37fab --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/native-apidiff-v3.1-release.md @@ -0,0 +1,16 @@ +# Native API 差异报告 + +OpenHarmony 3.1 Release相较于OpenHarmony 3.0 LTS版本的API变更如下: + +## 标准系统接口变更 + +| 模块名称 | 接口名称 | 变更类型 | 变更说明 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | +| | | | | \ No newline at end of file diff --git a/zh-cn/release-notes/api-change/v3.1-Release/readme.md b/zh-cn/release-notes/api-change/v3.1-Release/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..9f21003ae9cee469038dd19302d295d56cb8389a --- /dev/null +++ b/zh-cn/release-notes/api-change/v3.1-Release/readme.md @@ -0,0 +1,11 @@ +# Readme + +本目录记录了OpenHarmony 3.1 Release版本相较OpenHarmony 3.0 LTS版本的API变化。 + +API详细变更记录如下: +- API差异报告 + API差异报告记录了API的变更情况,包括新增、变更、废弃、删除。 + - [JS API差异报告](js-apidiff-v3.1-release.md) + - [Native API差异报告](native-apidiff-v3.1-release.md) +- [变更说明](changelog-v3.1-release.md) + 变更说明重点记录因API变更对开发者调用API的行为产生的影响,并针对变更影响提供适配指导。