diff --git a/en/application-dev/quick-start/resource-categories-and-access.md b/en/application-dev/quick-start/resource-categories-and-access.md index d1d342fe74eaed80516a7ca554cbe84f84ad927c..b79359a99ee1f7ecf434a7858a7ee1999b9af5d5 100644 --- a/en/application-dev/quick-start/resource-categories-and-access.md +++ b/en/application-dev/quick-start/resource-categories-and-access.md @@ -230,27 +230,27 @@ When referencing resources in the **rawfile** subdirectory, use the **"$rawfile( > > The return value of **$r** is a **Resource** object. You can obtain the corresponding string by using the [getStringValue](../reference/apis/js-apis-resource-manager.md) API. -In the **.ets** file, you can use the resources defined in the **resources** directory. +In the **.ets** file, you can use the resources defined in the **resources** directory. The following is a resource usage example based on the resource file examples in [Resource Group Sub-directories](#resource-group-subdirectories): ```ts Text($r('app.string.string_hello')) - .fontColor($r('app.color.color_hello')) - .fontSize($r('app.float.font_hello')) -} + .fontColor($r('app.color.color_hello')) + .fontSize($r('app.float.font_hello')) Text($r('app.string.string_world')) - .fontColor($r('app.color.color_world')) - .fontSize($r('app.float.font_world')) -} - -Text($r('app.string.message_arrive', "five of the clock")) // Reference string resources. The second parameter of $r is used to replace %s. - .fontColor($r('app.color.color_hello')) - .fontSize($r('app.float.font_hello')) -} - -Text($r('app.plural.eat_apple', 5, 5)) // Reference plural resources. The first parameter indicates the plural resource, the second parameter indicates the number of plural resources, and the third parameter indicates the substitute of %d. - .fontColor($r('app.color.color_world')) - .fontSize($r('app.float.font_world')) + .fontColor($r('app.color.color_world')) + .fontSize($r('app.float.font_world')) + +// Reference string resources. The second parameter of $r is used to replace %s, and value is "We will arrive at five'o clock". +Text($r('app.string.message_arrive', "five'o clock")) + .fontColor($r('app.color.color_hello')) + .fontSize($r('app.float.font_hello')) + +// Reference plural resources. The first parameter indicates the plural resource, the second parameter indicates the number of plural resources, and the third parameter indicates the substitute of %d. +// The value is "5 apple" in singular form and "5 apples" in plural form. +Text($r('app.plural.eat_apple', 5, 5)) + .fontColor($r('app.color.color_world')) + .fontSize($r('app.float.font_world')) } Image($r('app.media.my_background_image')) // Reference media resources. @@ -274,14 +274,20 @@ To reference a system resource, use the **"$r('sys.type.resource_id')"** format. ```ts Text('Hello') - .fontColor($r('sys.color.ohos_id_color_emphasize')) - .fontSize($r('sys.float.ohos_id_text_size_headline1')) - .fontFamily($r('sys.string.ohos_id_text_font_family_medium')) - .backgroundColor($r('sys.color.ohos_id_color_palette_aux1')) + .fontColor($r('sys.color.ohos_id_color_emphasize')) + .fontSize($r('sys.float.ohos_id_text_size_headline1')) + .fontFamily($r('sys.string.ohos_id_text_font_family_medium')) + .backgroundColor($r('sys.color.ohos_id_color_palette_aux1')) + Image($r('sys.media.ohos_app_icon')) - .border({color: $r('sys.color.ohos_id_color_palette_aux1'), radius: $r('sys.float.ohos_id_corner_radius_button'), width: 2}) - .margin({top: $r('sys.float.ohos_id_elements_margin_horizontal_m'), bottom: $r('sys.float.ohos_id_elements_margin_horizontal_l')}) - .height(200) - .width(300) + .border({ + color: $r('sys.color.ohos_id_color_palette_aux1'), + radius: $r('sys.float.ohos_id_corner_radius_button'), width: 2 + }) + .margin({ + top: $r('sys.float.ohos_id_elements_margin_horizontal_m'), + bottom: $r('sys.float.ohos_id_elements_margin_horizontal_l') + }) + .height(200) + .width(300) ``` - diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 56596e1ffdb8e011627fa026240375ce1094d9ea..82741c1432d9d4fd9c5babef17548bb643cf2dd9 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -55,7 +55,7 @@ Initiates a call based on the specified options. This API uses an asynchronous c | Name | Type | Mandatory | Description | | ----------- | ---------------------------- | ---- | --------------------------------------- | | phoneNumber | string | Yes | Phone number. | -| options | [DialOptions](#dialoptions) | Yes | Call option, which indicates whether the call is a voice call or video call. | +| options | [DialOptions](#dialoptions) | No | Call option, which indicates whether the call is a voice call or video call. | | callback | AsyncCallback<boolean> | Yes | Callback used to return the result.
- **true**: success
- **false**: failure | **Example** @@ -313,7 +313,7 @@ Checks whether the called number is an emergency number based on the specified p | Name | Type | Mandatory | Description | | ----------- | -------------------------------------------------- | ---- | -------------------------------------------- | | phoneNumber | string | Yes | Phone number. | -| options | [EmergencyNumberOptions](#emergencynumberoptions7) | Yes | Phone number options. | +| options | [EmergencyNumberOptions](#emergencynumberoptions7) | No | Phone number options. | | 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** @@ -397,7 +397,7 @@ A formatted phone number is a standard numeric string, for example, 555 0100. | Name | Type | Mandatory | Description | | ----------- | -------------------------------------------- | ---- | ------------------------------------ | | phoneNumber | string | Yes | Phone number. | -| options | [NumberFormatOptions](#numberformatoptions7) | Yes | Number formatting options, for example, country code. | +| options | [NumberFormatOptions](#numberformatoptions7) | No | Number formatting options, for example, country code. | | callback | AsyncCallback<string> | Yes | Callback used to return the result. | **Example** @@ -566,33 +566,6 @@ promise.then(data => { }); ``` -## call.answer7+ - -answer\(callback: AsyncCallback\): void - -Answers a call. This API uses an asynchronous callback to return the result. - -This is a system API. - -**Required permission**: ohos.permission.ANSWER_CALL - -**System capability**: SystemCapability.Telephony.CallManager - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ------------------------- | ---- | ---------- | -| callback | AsyncCallback<void> | Yes | Callback used to return the result.| - -**Example** - -```js -call.answer((err, data) => { - console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); -}); -``` - - ## call.answer7+ answer\(callId: number, callback: AsyncCallback\): void @@ -658,7 +631,7 @@ promise.then(data => { ## call.hangup7+ -hangup\(callback: AsyncCallback\): void +hangup\(callId: number, callback: AsyncCallback\): void Ends a call. This API uses an asynchronous callback to return the result. @@ -672,22 +645,23 @@ This is a system API. | Name | Type | Mandatory| Description | | -------- | ------------------------- | ---- | ---------- | +| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| | callback | AsyncCallback<void> | Yes | Callback used to return the result.| **Example** ```js -call.hangup((err, data) => { +call.hangup(1, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` -## call.hangup7+ +## call.answer9+ -hangup\(callId: number, callback: AsyncCallback\): void +answer\(callback: AsyncCallback\): void -Ends a call based on the specified call ID. This API uses an asynchronous callback to return the result. +Answers a call.This API uses an asynchronous callback to return the result. This is a system API. @@ -699,13 +673,12 @@ This is a system API. | Name | Type | Mandatory| Description | | -------- | ------------------------- | ---- | ----------------------------------------------- | -| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Example** ```js -call.hangup(1, (err, data) => { +call.answer((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` @@ -746,11 +719,11 @@ promise.then(data => { }); ``` -## call.reject7+ +## call.hangup9+ -reject\(callback: AsyncCallback\): void +hangup\(callback: AsyncCallback\): void -Rejects a call. This API uses an asynchronous callback to return the result. +Ends a call. This API uses an asynchronous callback to return the result. This is a system API. @@ -767,38 +740,7 @@ This is a system API. **Example** ```js -call.reject((err, data) => { - console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); -}); -``` - - -## call.reject7+ - -reject\(options: RejectMessageOptions, callback: AsyncCallback\): void - -Rejects a call based on the specified options. This API uses an asynchronous callback to return the result. - -This is a system API. - -**Required permission**: ohos.permission.ANSWER_CALL - -**System capability**: SystemCapability.Telephony.CallManager - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------------------- | ---- | -------------- | -| options | [RejectMessageOptions](#rejectmessageoptions7) | Yes | Options for the call rejection message.| -| callback | AsyncCallback<void> | Yes | Callback used to return the result. | - -**Example** - -```js -let rejectMessageOptions={ - messageContent: "Unknown number blocked" -} -call.reject(rejectMessageOptions, (err, data) => { +call.hangup((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` @@ -903,6 +845,65 @@ promise.then(data => { }); ``` + +## call.reject9+ + +reject\(callback: AsyncCallback\): void + +Rejects a call. This API uses an asynchronous callback to return the result. + +This is a system API. + +**Required permission**: ohos.permission.ANSWER_CALL + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------- | ---- | ---------- | +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| + +**Example:** + +```js +call.reject((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## call.reject9+ + +reject\(options: RejectMessageOptions, callback: AsyncCallback\): void + +Rejects a call. This API uses an asynchronous callback to return the result. + +This is a system API. + +**Required permission**: ohos.permission.ANSWER_CALL + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ---------------------------------------------- | ---- | -------------- | +| options | [RejectMessageOptions](#rejectmessageoptions7) | Yes | Options for the call rejection message.| +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Example:** + +```js +let rejectMessageOptions={ + messageContent: "Unknown number blocked" +} +call.reject(rejectMessageOptions, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + ## call.holdCall7+ holdCall\(callId: number, callback: AsyncCallback\): void @@ -1344,8 +1345,8 @@ This is a system API. | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | -| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | -| callback | AsyncCallback<[CallWaitingStatus](#callwaitingstatus7)\> | Yes | Callback used to return the result.

- **0**: Call waiting is disabled.
- **1**: Call waiting is enabled.| +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| callback | AsyncCallback<[CallWaitingStatus](#callwaitingstatus7)\> | Yes | Callback used to return the result.
- **0**: Call waiting is disabled.
- **1**: Call waiting is enabled.| **Example** @@ -2399,7 +2400,7 @@ promise.then(data => { }); ``` -## call.setAudioDevice8+ +## call.setAudioDevice9+ setAudioDevice\(device: AudioDevice, callback: AsyncCallback\): void @@ -2425,7 +2426,7 @@ call.setAudioDevice(1, (err, data) => { ``` -## call.setAudioDevice8+ +## call.setAudioDevice9+ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback\): void diff --git a/en/application-dev/reference/apis/js-apis-i18n.md b/en/application-dev/reference/apis/js-apis-i18n.md index e990ecf8126054b0de5ad52308c4f83843782d97..08bf0cfe66b40f46262765048463081b9c1a66a6 100644 --- a/en/application-dev/reference/apis/js-apis-i18n.md +++ b/en/application-dev/reference/apis/js-apis-i18n.md @@ -1,13 +1,10 @@ # Internationalization – I18N - This module provides system-related or enhanced I18N capabilities, such as locale management, phone number formatting, and calendar, through supplementary I18N APIs that are not defined in ECMA 402. +The I18N module provides system-related or enhanced I18N capabilities, such as locale management, phone number formatting, and calendar, through supplementary I18N APIs that are not defined in ECMA 402. The [Intl](js-apis-intl.md) module provides basic I18N capabilities through the standard I18N APIs defined in ECMA 402. It works with the I18N module to provide a complete suite of I18N capabilities. > **NOTE** -> - The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. -> -> - This module provides system-related or enhanced I18N capabilities, such as locale management, phone number formatting, and calendar, through supplementary I18N APIs that are not defined in ECMA 402. For details about the basic I18N capabilities, see [Intl](js-apis-intl.md). - +> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import @@ -247,9 +244,9 @@ This is a system API. **Parameters** -| Name | Type | Description | -| -------- | ------ | ----- | -| language | string | Language ID.| +| Name | Type | Mandatory | Description | +| -------- | ------ | ----- | ----- | +| language | string | Yes | Language ID.| **Error codes** @@ -313,9 +310,9 @@ This is a system API. **Parameters** -| Name | Type | Description | -| ------ | ------ | ----- | -| region | string | Region ID.| +| Name | Type | Mandatory | Description | +| -------- | ------ | ----- | ----- | +| region | string | Yes | Region ID.| **Error codes** @@ -379,9 +376,9 @@ This is a system API. **Parameters** -| Name | Type | Description | -| ------ | ------ | --------------- | -| locale | string | System locale ID, for example, **zh-CN**.| +| Name | Type | Mandatory | Description | +| -------- | ------ | ----- | ----- | +| locale | string | Yes | System locale ID, for example, **zh-CN**.| **Error codes** @@ -713,9 +710,9 @@ Checks whether the localized script for the specified language is displayed from **Parameters** -| Name | Type | Description | -| ------ | ------ | ------- | -| locale | string | Locale ID.| +| Name | Type | Mandatory | Description | +| -------- | ------ | ----- | ----- | +| locale | string | Yes | Locale ID.| **Return value** @@ -905,7 +902,7 @@ Sets the start day of a week for this **Calendar** object. | Name | Type | Mandatory | Description | | ----- | ------ | ---- | --------------------- | -| value | number | No | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.| +| value | number | Yes | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.| **Example** ```js @@ -947,7 +944,7 @@ Sets the minimum number of days in the first week of a year. | Name | Type | Mandatory | Description | | ----- | ------ | ---- | ------------ | -| value | number | No | Minimum number of days in the first week of a year.| +| value | number | Yes | Minimum number of days in the first week of a year.| **Example** ```js diff --git a/en/application-dev/reference/apis/js-apis-intl.md b/en/application-dev/reference/apis/js-apis-intl.md index 79cdf3ac5627984eba2f03e7eb37b9cc7137de4a..e3cb7bbfd684ae315d6d54363183401442f5167a 100644 --- a/en/application-dev/reference/apis/js-apis-intl.md +++ b/en/application-dev/reference/apis/js-apis-intl.md @@ -1,6 +1,6 @@ # Internationalization – Intl -This module provides basic I18N capabilities, such as time and date formatting, number formatting, and string sorting, through the standard I18N APIs defined in ECMA 402. +The Intl module provides basic I18N capabilities, such as time and date formatting, number formatting, and string sorting, through the standard I18N APIs defined in ECMA 402. The [I18N](js-apis-i18n.md) module provides enhanced I18N capabilities through supplementary APIs that are not defined in ECMA 402. It works with the Intl module to provide a complete suite of I18N capabilities. 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 31414ab325572d7ed25a31b1b3a78a725dce39e6..eab804c642f60fd0159b61e9a1bae4d0efd17417 100644 --- a/en/application-dev/reference/apis/js-apis-net-connection.md +++ b/en/application-dev/reference/apis/js-apis-net-connection.md @@ -825,7 +825,7 @@ Before invoking NetHandle APIs, call **getNetHandle** to obtain a **NetHandle** | Name| Type | Description | | ------ | ------ | ------------------------- | -| netId | number | Network ID. The value must be greater than or equal to 100.| +| netId | number | Network ID. The value **0** indicates no default network. Any other value must be greater than or equal to 100.| ### bindSocket diff --git a/en/application-dev/reference/apis/js-apis-net-sharing.md b/en/application-dev/reference/apis/js-apis-net-sharing.md index 23284aeb1715a3f8aed9ec7b2d79ad55d1408319..3c654bbbc7b9e3cca73f385ea5af025d2072b75d 100644 --- a/en/application-dev/reference/apis/js-apis-net-sharing.md +++ b/en/application-dev/reference/apis/js-apis-net-sharing.md @@ -1,6 +1,6 @@ # Network Sharing Management -The Network Sharing Management module allows you to share your device's Internet connection with other connected devices by means of Wi-Fi hotspot, Bluetooth, and USB sharing. It also allows you to query the network sharing state and shared mobile data volume. +The Network Sharing Management module allows you to share your device's Internet connection with other connected devices by means of Wi-Fi hotspot, and Bluetooth sharing. It also allows you to query the network sharing state and shared mobile data volume. > **NOTE** > @@ -735,12 +735,12 @@ Enumerates the network sharing states of an NIC. ## SharingIfaceType -Enumerates the network sharing types of an NIC. +Enumerates the network sharing types of an NIC. **System capability**: SystemCapability.Communication.NetManager.Core | Name | Value | Description | | ------------------------ | ---- | ---------------------- | | SHARING_WIFI | 0 | Wi-Fi hotspot sharing.| -| SHARING_USB | 1 | USB sharing.| +| SHARING_USB | 1 | USB sharing (not supported currently).| | SHARING_BLUETOOTH | 2 | Bluetooth sharing.| diff --git a/en/application-dev/reference/apis/js-apis-observer.md b/en/application-dev/reference/apis/js-apis-observer.md index a6fcacc4333ab0aa48dae7cd8b629e1e77bb399f..ad7d19b4ab7a3cfa6593c81f2c70b52f403aa4d1 100644 --- a/en/application-dev/reference/apis/js-apis-observer.md +++ b/en/application-dev/reference/apis/js-apis-observer.md @@ -531,8 +531,8 @@ Enumerates SIM card types and states. **System capability**: SystemCapability.Telephony.StateRegistry -| Name | Type | Description | -| ----------------- | --------------------- | ------------------------------------------------------------ | -| type | [CardType](js-apis-sim.md#cardtype) | SIM card type. For details, see [CardType](js-apis-sim.md#cardtype).| -| state | [SimState](js-apis-sim.md#simstate) | SIM card status. For details, see [SimState](js-apis-sim.md#simstate).| -| reason8+ | [LockReason](#lockreason8) | SIM card lock type.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| type | [CardType](js-apis-sim.md#cardtype) | Yes| SIM card type. For details, see [CardType](js-apis-sim.md#cardtype).| +| state | [SimState](js-apis-sim.md#simstate) | Yes| SIM card status. For details, see [SimState](js-apis-sim.md#simstate).| +| reason8+ | [LockReason](#lockreason8) | Yes| SIM card lock type.| diff --git a/en/application-dev/reference/apis/js-apis-pointer.md b/en/application-dev/reference/apis/js-apis-pointer.md index 06bb32eecce0d9b40133160a8689c6b80c27ad61..ed71da2336509844e7baa5eea49f8a026e969eba 100644 --- a/en/application-dev/reference/apis/js-apis-pointer.md +++ b/en/application-dev/reference/apis/js-apis-pointer.md @@ -142,7 +142,7 @@ Sets the mouse movement speed. This API uses an asynchronous callback to return | Name | Type | Mandatory | Description | | -------- | ------------------------- | ---- | ------------------------------------- | | speed | number | Yes | Mouse movement speed. The value ranges from **1** to **11**. The default value is **5**. | -| callback | AysncCallback<void> | Yes | Callback used to return the result.| +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| **Example** @@ -349,7 +349,7 @@ Sets the mouse pointer style. This API uses an asynchronous callback to return t | ------------ | ------------------------------ | ---- | ----------------------------------- | | windowId | number | Yes | Window ID. | | pointerStyle | [PointerStyle](#pointerstyle9) | Yes | Mouse pointer style ID. | -| callback | AysncCallback<void> | Yes | Callback used to return the result.| +| callback | AsyncCallback<void> | Yes | Callback used to return the result.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-radio.md b/en/application-dev/reference/apis/js-apis-radio.md index 01d439fd2e3e9d1202aa6969cb15fda67fa9059d..40051c22a874d420c4773c53142597eab952aa09 100644 --- a/en/application-dev/reference/apis/js-apis-radio.md +++ b/en/application-dev/reference/apis/js-apis-radio.md @@ -1797,10 +1797,10 @@ Defines the signal strength. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ----------- | --------------------------- | ------------------ | -| signalType | [NetworkType](#networktype) | Signal strength type.| -| signalLevel | number | Signal strength level.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| signalType | [NetworkType](#networktype) | Yes| Signal strength type.| +| signalLevel | number | Yes| Signal strength level.| ## NetworkType @@ -1825,17 +1825,17 @@ Defines the network status. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ----------------- | --------------------- | ------------------------------------------------------------ | -| longOperatorName | string | Long carrier name of the registered network.| -| shortOperatorName | string | Short carrier name of the registered network.| -| plmnNumeric | string | PLMN code of the registered network.| -| isRoaming | boolean | Whether the user is roaming.| -| regState | [RegState](#regstate) | Network registration status of the device.| -| cfgTech8+ | [RadioTechnology](#radiotechnology) | RAT of the device.| -| nsaState | [NsaState](#nsastate) | NSA network registration status of the device.| -| isCaActive | boolean | CA status.| -| isEmergency | boolean | Whether only emergency calls are allowed.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| longOperatorName | string | Yes | Long carrier name of the registered network.| +| shortOperatorName | string | Yes | Short carrier name of the registered network.| +| plmnNumeric | string | Yes | PLMN code of the registered network.| +| isRoaming | boolean | Yes | Whether the user is roaming.| +| regState | [RegState](#regstate) | Yes | Network registration status of the device.| +| cfgTech8+ | [RadioTechnology](#radiotechnology) | Yes | RAT of the device.| +| nsaState | [NsaState](#nsastate) | Yes | NSA network registration status of the device.| +| isCaActive | boolean | Yes | CA status.| +| isEmergency | boolean | Yes | Whether only emergency calls are allowed.| ## RegState @@ -1933,13 +1933,13 @@ Defines the cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| networkType | [NetworkType](#networktype) | Network type of the cell. | -| isCamped | boolean | Status of the cell. | -| timeStamp | number | Timestamp when cell information is obtained. | -| signalInformation | [SignalInformation](#signalinformation) | Signal information. | -| data | [CdmaCellInformation](#cdmacellinformation8) \| [GsmCellInformation](#gsmcellinformation8) \| [LteCellInformation](#ltecellinformation8) \| [NrCellInformation](#nrcellinformation8) \| [TdscdmaCellInformation](#tdscdmacellinformation8) | CDMA cell information \|GSM cell information \|LTE cell information \|NR cell information \|TD-SCDMA cell information| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| networkType | [NetworkType](#networktype) | Yes | Network type of the cell. | +| isCamped | boolean | Yes | Status of the cell. | +| timeStamp | number | Yes | Timestamp when cell information is obtained. | +| signalInformation | [SignalInformation](#signalinformation) | Yes | Signal information. | +| data | [CdmaCellInformation](#cdmacellinformation8) \| [GsmCellInformation](#gsmcellinformation8) \| [LteCellInformation](#ltecellinformation8) \| [NrCellInformation](#nrcellinformation8) \| [TdscdmaCellInformation](#tdscdmacellinformation8) | Yes | CDMA cell information \|GSM cell information \|LTE cell information \|NR cell information \|TD-SCDMA cell information| ## CdmaCellInformation8+ @@ -1949,13 +1949,13 @@ Defines the CDMA cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| --------- | ------ | ------------ | -| baseId | number | Base station ID. | -| latitude | number | Longitude. | -| longitude | number | Latitude. | -| nid | number | Network ID.| -| sid | number | System ID.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| baseId | number | Yes | Base station ID. | +| latitude | number | Yes | Longitude. | +| longitude | number | Yes | Latitude. | +| nid | number | Yes | Network ID.| +| sid | number | Yes | System ID.| ## GsmCellInformation8+ @@ -1965,14 +1965,14 @@ Defines the GSM cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------ | ------ | -------------------- | -| lac | number | Location area code. | -| cellId | number | Cell ID. | -| arfcn | number | Absolute radio frequency channel number.| -| bsic | number | Base station ID. | -| mcc | string | Mobile country code. | -| mnc | string | Mobile network code. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| lac | number | Yes | Location area code. | +| cellId | number | Yes | Cell ID. | +| arfcn | number | Yes | Absolute radio frequency channel number.| +| bsic | number | Yes | Base station ID. | +| mcc | string | Yes | Mobile country code. | +| mnc | string | Yes | Mobile network code. | ## LteCellInformation8+ @@ -1982,16 +1982,16 @@ Defines the LTE cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------------- | ------- | ----------------------- | -| cgi | number | Cell global identification. | -| pci | number | Physical cell ID. | -| tac | number | Tracking area code. | -| earfcn | number | Absolute radio frequency channel number. | -| bandwidth | number | Bandwidth. | -| mcc | string | Mobile country code. | -| mnc | string | Mobile network code. | -| isSupportEndc | boolean | Support New Radio_Dual Connectivity| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| cgi | number | Yes | Cell global identification. | +| pci | number | Yes | Physical cell ID. | +| tac | number | Yes | Tracking area code. | +| earfcn | number | Yes | Absolute radio frequency channel number. | +| bandwidth | number | Yes | Bandwidth. | +| mcc | string | Yes | Mobile country code. | +| mnc | string | Yes | Mobile network code. | +| isSupportEndc | boolean | Yes | Support for New Radio_Dual Connectivity. | ## NrCellInformation8+ @@ -2001,14 +2001,14 @@ Defines the NR cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------- | ------ | ---------------- | -| nrArfcn | number | 5G frequency number. | -| pci | number | Physical cell ID. | -| tac | number | Tracking area code. | -| nci | number | 5G network cell ID.| -| mcc | string | Mobile country code. | -| mnc | string | Mobile network code. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| nrArfcn | number | Yes | 5G frequency number. | +| pci | number | Yes | Physical cell ID. | +| tac | number | Yes | Tracking area code. | +| nci | number | Yes | 5G network cell ID.| +| mcc | string | Yes | Mobile country code. | +| mnc | string | Yes | Mobile network code. | ## TdscdmaCellInformation8+ @@ -2018,14 +2018,14 @@ Defines the TD-SCDMA cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------ | ------ | ------------ | -| lac | number | Location area code.| -| cellId | number | Cell ID. | -| cpid | number | Cell parameter ID.| -| uarfcn | number | Absolute radio frequency number.| -| mcc | string | Mobile country code.| -| mnc | string | Mobile network code. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| lac | number | Yes | Location area code.| +| cellId | number | Yes | Cell ID. | +| cpid | number | Yes | Cell parameter ID.| +| uarfcn | number | Yes | Absolute radio frequency number.| +| mcc | string | Yes | Mobile country code.| +| mnc | string | Yes | Mobile network code. | ## WcdmaCellInformation8+ @@ -2035,14 +2035,14 @@ Defines the WCDMA cell information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------ | ------ | ------------ | -| lac | number | Location area code.| -| cellId | number | Cell ID. | -| psc | number | Primary scrambling code. | -| uarfcn | number | Absolute radio frequency number.| -| mcc | string | Mobile country code.| -| mnc | string | Mobile network code. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| lac | number | Yes | Location area code.| +| cellId | number | Yes | Cell ID. | +| psc | number | Yes | Primary scrambling code. | +| uarfcn | number | Yes | Absolute radio frequency number.| +| mcc | string | Yes | Mobile country code.| +| mnc | string | Yes | Mobile network code. | ## NrOptionMode8+ @@ -2067,10 +2067,10 @@ Defines the network search result. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ---------------------- | ------------------------------------------------- | -------------- | -| isNetworkSearchSuccess | boolean | Successful network search.| -| networkSearchResult | Array<[NetworkInformation](#networkinformation)\> | Network search result.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| isNetworkSearchSuccess | boolean | Yes | Successful network search.| +| networkSearchResult | Array<[NetworkInformation](#networkinformation)\> | Yes | Network search result.| ## NetworkInformation @@ -2080,12 +2080,12 @@ Defines the network information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| --------------- | ----------------------------------------- | -------------- | -| operatorName | string | Carrier name.| -| operatorNumeric | string | Carrier number. | -| state | [NetworkInformation](#networkinformationstate) | Network information status.| -| radioTech | string | Radio technology. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| operatorName | string | Yes | Carrier name.| +| operatorNumeric | string | Yes | Carrier number. | +| state | [NetworkInformation](#networkinformationstate) | Yes | Network information status.| +| radioTech | string | Yes | Radio technology. | ## NetworkInformationState @@ -2110,12 +2110,12 @@ Defines the network selection mode. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------------------ | --------------------------------------------- | -------------------------------------- | -| slotId | number | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| -| selectMode | [NetworkSelectionMode](#networkselectionmode) | Network selection mode. | -| networkInformation | [NetworkInformation](#networkinformation) | Network information. | -| resumeSelection | boolean | Whether to resume selection. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| +| selectMode | [NetworkSelectionMode](#networkselectionmode) | Yes | Network selection mode. | +| networkInformation | [NetworkInformation](#networkinformation) | Yes | Network information. | +| resumeSelection | boolean | Yes | Whether to resume selection. | ## ImsRegState9+ @@ -2153,10 +2153,10 @@ Defines the IMS registration information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ----------- | ---------------------------- | ------------- | -| imsRegState | [ImsRegState](#imsregstate9) | IMS registration state.| -| imsRegTech | [ImsRegTech](#imsregtech9) | IMS registration technology.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| imsRegState | [ImsRegState](#imsregstate9) | Yes | IMS registration state.| +| imsRegTech | [ImsRegTech](#imsregtech9) | Yes | IMS registration technology.| ## ImsServiceType9+ diff --git a/en/application-dev/reference/apis/js-apis-resource-manager.md b/en/application-dev/reference/apis/js-apis-resource-manager.md index 8117cdd44862dc934a4022b6b701b9551cd6d25e..865f1104386664ce5b4cafede20ec54ffab711a6 100644 --- a/en/application-dev/reference/apis/js-apis-resource-manager.md +++ b/en/application-dev/reference/apis/js-apis-resource-manager.md @@ -15,8 +15,10 @@ import resourceManager from '@ohos.resourceManager'; ## Instruction -Since API version 9, the stage model allows an application to obtain a **ResourceManager** object based on **context** and call its resource management APIs without first importing the required bundle. This approach, however, is not applicable to the FA model. -For details about how to reference **context** in the stage model, see [Context in the Stage Model]. +Since API version 9, the stage model allows an application to obtain a **ResourceManager** object based on **context** and call its resource management APIs without first importing the required bundle. This approach, however, is not applicable to the FA model. For the FA model, you need to import the required bundle and then call the [getResourceManager](#resourcemanagergetresourcemanager) API to obtain a **ResourceManager** object. + +For details about how to reference **context** in the stage model, see Context in the Stage Model. + ```ts import Ability from '@ohos.application.Ability'; @@ -97,6 +99,7 @@ Obtains the **ResourceManager** object of this application. This API uses a prom **System capability**: SystemCapability.Global.ResourceManager **Return value** + | Type | Description | | ---------------------------------------- | ----------------- | | Promise<[ResourceManager](#resourcemanager)> | Promise used to return the result.| @@ -134,6 +137,7 @@ Obtains the **ResourceManager** object of an application based on the specified | bundleName | string | Yes | Bundle name of the application.| **Return value** + | Type | Description | | ---------------------------------------- | ------------------ | | Promise<[ResourceManager](#resourcemanager)> | Promise used to return the result.| @@ -305,7 +309,7 @@ For details about the error codes, see [Resource Manager Error Codes](../errorco **Example (stage)** ```ts try { - this.context.getStringValue($r('app.string.test').id, (error, value) => { + this.context.resourceManager.getStringValue($r('app.string.test').id, (error, value) => { if (error != null) { console.log("error is " + error); } else { @@ -333,6 +337,7 @@ Obtains the string corresponding to the specified resource ID. This API uses a p | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | --------------------- | ----------- | | Promise<string> | Promise used to return the result.| @@ -423,6 +428,7 @@ Obtains the string corresponding to the specified resource object. This API uses | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | --------------------- | ---------------- | | Promise<string> | Promise used to return the result.| @@ -512,6 +518,7 @@ Obtains the string array corresponding to the specified resource ID. This API us | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ---------------------------------- | ------------- | | Promise<Array<string>> | Promise used to return the result.| @@ -599,6 +606,7 @@ Obtains the string array corresponding to the specified resource object. This AP | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | ---------------------------------- | ------------------ | | Promise<Array<string>> | Promise used to return the result.| @@ -687,6 +695,7 @@ Obtains the content of the media file corresponding to the specified resource ID | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ------------------------- | -------------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -772,6 +781,7 @@ Obtains the content of the media file corresponding to the specified resource ob | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | ------------------------- | ------------------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -859,6 +869,7 @@ Obtains the Base64 code of the image corresponding to the specified resource ID. | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | --------------------- | -------------------- | | Promise<string> | Promise used to return the result.| @@ -944,6 +955,7 @@ Obtains the Base64 code of the image corresponding to the specified resource obj | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | --------------------- | ------------------------- | | Promise<string> | Promise used to return the result.| @@ -1014,6 +1026,7 @@ Obtains the device configuration. This API uses a promise to return the result. **System capability**: SystemCapability.Global.ResourceManager **Return value** + | Type | Description | | ---------------------------------------- | ---------------- | | Promise<[Configuration](#configuration)> | Promise used to return the result.| @@ -1069,6 +1082,7 @@ Obtains the device capability. This API uses a promise to return the result. **System capability**: SystemCapability.Global.ResourceManager **Return value** + | Type | Description | | ---------------------------------------- | ------------------- | | Promise<[DeviceCapability](#devicecapability)> | Promise used to return the result.| @@ -1144,6 +1158,7 @@ Obtains the singular-plural string corresponding to the specified resource ID ba | num | number | Yes | Number. | **Return value** + | Type | Description | | --------------------- | ------------------------- | | Promise<string> | Promise used to return the result.| @@ -1234,6 +1249,7 @@ Obtains the singular-plural string corresponding to the specified resource objec | num | number | Yes | Number. | **Return value** + | Type | Description | | --------------------- | ------------------------------ | | Promise<string> | Promise used to return the result.| @@ -1321,6 +1337,7 @@ Obtains the content of the raw file in the **resources/rawfile** directory. This | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ------------------------- | ----------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -1402,6 +1419,7 @@ Obtains the descriptor of the raw file in the **resources/rawfile** directory. T | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ---------------------------------------- | ------------------- | | Promise<[RawFileDescriptor](#rawfiledescriptor8)> | Promise used to return the result.| @@ -1470,6 +1488,7 @@ Closes the descriptor of the raw file in the **resources/rawfile** directory. Th | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ------------------- | ---- | | Promise<void> | Promise that returns no value.| @@ -1538,6 +1557,7 @@ Closes the descriptor of the raw file in the **resources/rawfile** directory. Th | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ------------------- | ---- | | Promise<void> | Promise that returns no value.| @@ -1634,6 +1654,7 @@ Obtains the string corresponding to the specified resource name. This API uses a | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | --------------------- | ---------- | | Promise<string> | String corresponding to the resource name.| @@ -1716,6 +1737,7 @@ Obtains the string array corresponding to the specified resource name. This API | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | ---------------------------------- | ------------ | | Promise<Array<string>> | Promise used to return the result.| @@ -1798,6 +1820,7 @@ Obtains the content of the media file corresponding to the specified resource na | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | ------------------------- | ------------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -1880,6 +1903,7 @@ Obtains the Base64 code of the image corresponding to the specified resource nam | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | --------------------- | ------------------- | | Promise<string> | Promise used to return the result.| @@ -1965,6 +1989,7 @@ Obtains the plural string corresponding to the specified resource name based on | num | number | Yes | Number. | **Return value** + | Type | Description | | --------------------- | ---------------------- | | Promise<string> | Promise used to return the result.| @@ -2007,6 +2032,7 @@ Obtains the string corresponding to the specified resource ID. This API returns | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ------ | ----------- | | string | Promise used to return the result.| @@ -2045,6 +2071,7 @@ Obtains the string corresponding to the specified resource object. This API retu | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | ------ | ---------------- | | string | Promise used to return the result.| @@ -2088,6 +2115,7 @@ Obtains the string corresponding to the specified resource name. This API return | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | ------ | ---------- | | string | String corresponding to the specified resource name.| @@ -2126,6 +2154,7 @@ Obtains the Boolean result corresponding to the specified resource ID. This API | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ------- | ------------ | | boolean | Boolean result corresponding to the specified resource ID.| @@ -2163,6 +2192,7 @@ Obtains the Boolean result corresponding to the specified resource object. This | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | ------- | ----------------- | | boolean | Boolean result corresponding to the specified resource object.| @@ -2206,6 +2236,7 @@ Obtains the Boolean result corresponding to the specified resource name. This AP | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | ------- | ----------- | | boolean | Boolean result corresponding to the specified resource name.| @@ -2244,6 +2275,7 @@ Obtains the integer or float value corresponding to the specified resource ID. T | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ------ | ---------- | | number | Integer or float value corresponding to the specified resource ID.| @@ -2288,6 +2320,7 @@ Obtains the integer or float value corresponding to the specified resource objec | resource | [Resource](#resource9) | Yes | Resource object.| **Return value** + | Type | Description | | ------ | --------------- | | number | Integer or float value corresponding to the specified resource object.| @@ -2331,6 +2364,7 @@ Obtains the integer or float value corresponding to the specified resource name. | resName | string | Yes | Resource name.| **Return value** + | Type | Description | | ------ | --------- | | number | Integer or float value corresponding to the specified resource name.| @@ -2409,6 +2443,7 @@ This API is deprecated since API version 9. You are advised to use [getStringVal | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | --------------------- | ----------- | | Promise<string> | Promise used to return the result.| @@ -2473,6 +2508,7 @@ This API is deprecated since API version 9. You are advised to use [getStringArr | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ---------------------------------- | ------------- | | Promise<Array<string>> | Promise used to return the result.| @@ -2495,7 +2531,7 @@ getMedia(resId: number, callback: AsyncCallback<Uint8Array>): void Obtains the content of the media file corresponding to the specified resource ID. This API uses an asynchronous callback to return the result. -This API is deprecated since API version 9. You are advised to use [getMediaContent](#getmediacontent) instead. +This API is deprecated since API version 9. You are advised to use [getMediaContent](#getmediacontent9) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2526,7 +2562,7 @@ getMedia(resId: number): Promise<Uint8Array> Obtains the content of the media file corresponding to the specified resource ID. This API uses a promise to return the result. -This API is deprecated since API version 9. You are advised to use [getMediaContent](#getmediacontent-1) instead. +This API is deprecated since API version 9. You are advised to use [getMediaContent](#getmediacontent9-1) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2537,6 +2573,7 @@ This API is deprecated since API version 9. You are advised to use [getMediaCont | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | ------------------------- | -------------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -2559,7 +2596,7 @@ getMediaBase64(resId: number, callback: AsyncCallback<string>): void Obtains the Base64 code of the image corresponding to the specified resource ID. This API uses an asynchronous callback to return the result. -This API is deprecated since API version 9. You are advised to use [getMediaContentBase64](#getmediacontentbase64) instead. +This API is deprecated since API version 9. You are advised to use [getMediaContentBase64](#getmediacontentbase649) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2590,7 +2627,7 @@ getMediaBase64(resId: number): Promise<string> Obtains the Base64 code of the image corresponding to the specified resource ID. This API uses a promise to return the result. -This API is deprecated since API version 9. You are advised to use [getMediaContentBase64](#getmediacontentbase64-1) instead. +This API is deprecated since API version 9. You are advised to use [getMediaContentBase64](#getmediacontentbase649-1) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2601,6 +2638,7 @@ This API is deprecated since API version 9. You are advised to use [getMediaCont | resId | number | Yes | Resource ID.| **Return value** + | Type | Description | | --------------------- | -------------------- | | Promise<string> | Promise used to return the result.| @@ -2623,7 +2661,7 @@ getPluralString(resId: number, num: number): Promise<string> Obtains the singular-plural string corresponding to the specified resource ID based on the specified number. This API uses a promise to return the result. -This API is deprecated since API version 9. You are advised to use [getPluralStringValue](#getpluralstringvalue) instead. +This API is deprecated since API version 9. You are advised to use [getPluralStringValue](#getpluralstringvalue9) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2635,6 +2673,7 @@ This API is deprecated since API version 9. You are advised to use [getPluralStr | num | number | Yes | Number. | **Return value** + | Type | Description | | --------------------- | ------------------------- | | Promise<string> | Promise used to return the result.| @@ -2657,7 +2696,7 @@ getPluralString(resId: number, num: number, callback: AsyncCallback<string> Obtains the singular-plural string corresponding to the specified resource ID based on the specified number. This API uses an asynchronous callback to return the result. -This API is deprecated since API version 9. You are advised to use [getPluralStringValue](#getpluralstringvalue-1) instead. +This API is deprecated since API version 9. You are advised to use [getPluralStringValue](#getpluralstringvalue9-1) instead. **System capability**: SystemCapability.Global.ResourceManager @@ -2731,6 +2770,7 @@ This API is deprecated since API version 9. You are advised to use [getRawFileCo | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ------------------------- | ----------- | | Promise<Uint8Array> | Promise used to return the result.| @@ -2796,6 +2836,7 @@ This API is deprecated since API version 9. You are advised to use [getRawFd](#g | path | string | Yes | Path of the raw file.| **Return value** + | Type | Description | | ---------------------------------------- | ------------------- | | Promise<[RawFileDescriptor](#rawfiledescriptor8)> | Promise used to return the result.| diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md index b0915951260105661f35dcad54468e2417962e89..7c415cc718aa72b7d1d098483a73399fc431d7af 100644 --- a/en/application-dev/reference/apis/js-apis-sim.md +++ b/en/application-dev/reference/apis/js-apis-sim.md @@ -2847,10 +2847,10 @@ Defines the lock status response. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| --------------- | ------ | ------------------ | -| result | number | Operation result. | -| remain?: number | number | Remaining attempts (can be null).| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| result | number | Yes | Operation result. | +| remain?: number | number | Yes | Remaining attempts (can be null).| ## LockInfo8+ @@ -2860,11 +2860,11 @@ Defines the lock information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| -------- | ------------------------ | ------ | -| lockType | [LockType](#locktype8) | Lock type.| -| password | string | Password. | -| state | [LockState](#lockstate8) | Lock state.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| lockType | [LockType](#locktype8) | Yes | Lock type.| +| password | string | Yes | Password. | +| state | [LockState](#lockstate8) | Yes | Lock state.| ## PersoLockInfo8+ @@ -2874,10 +2874,10 @@ Defines the personalized lock information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| -------- | -------------------------------- | ------------ | -| lockType | [PersoLockType](#persolocktype8) | Personalized lock type.| -| password | string | Password. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| lockType | [PersoLockType](#persolocktype8) | Yes | Personalized lock type.| +| password | string | Yes | Password. | ## IccAccountInfo7+ @@ -2887,15 +2887,15 @@ Defines the ICC account information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ---------- | ------- | ---------------- | -| simId | number | SIM card ID. | -| slotIndex | number | Card slot ID. | -| isEsim | boolean | Whether the SIM card is an eSim card.| -| isActive | boolean | Whether the card is activated. | -| iccId | string | ICCID number. | -| showName | string | SIM card display name. | -| showNumber | string | SIM card display number. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| simId | number | Yes | SIM card ID. | +| slotIndex | number | Yes | Card slot ID. | +| isEsim | boolean | Yes | Whether the SIM card is an eSim card.| +| isActive | boolean | Yes | Whether the card is activated. | +| iccId | string | Yes | ICCID number. | +| showName | string | Yes | SIM card display name. | +| showNumber | string | Yes | SIM card display number. | ## OperatorConfig8+ @@ -2905,10 +2905,10 @@ Defines the carrier configuration. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description| -| ----- | ------ | ---- | -| field | string | Field| -| value | string | Value | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| field | string | Yes | Field. | +| value | string | Yes | Value. | ## DiallingNumbersInfo8+ @@ -2918,12 +2918,12 @@ Defines the contact number information. **System capability**: SystemCapability.Telephony.CoreService -| Name | Type | Description | -| ------------ | ------ | -------- | -| alphaTag | string | Alpha tag. | -| number | string | Contact number. | -| recordNumber | number | Record number.| -| pin2 | string | PIN 2.| +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| alphaTag | string | Yes | Alpha tag. | +| number | string | Yes | Contact number. | +| recordNumber | number | Yes | Record number.| +| pin2 | string | Yes | PIN 2.| ## ContactType8+ diff --git a/en/application-dev/reference/apis/js-apis-sms.md b/en/application-dev/reference/apis/js-apis-sms.md index 7d372978202503f6ed0a0517fa69f85ae5dfcf44..e9e32416426bf852590ed7d7a7f9c5e086a89480 100644 --- a/en/application-dev/reference/apis/js-apis-sms.md +++ b/en/application-dev/reference/apis/js-apis-sms.md @@ -1116,19 +1116,19 @@ Defines an SMS message instance. **System capability**: SystemCapability.Telephony.SmsMms -| Name | Type | Description | -| ------------------------ | --------------------------------------- | ------------------------------------------------------------ | -| hasReplyPath | boolean | Whether the received SMS contains **TP-Reply-Path**. The default value is **false**.
**TP-Reply-Path**: The device returns a response based on the SMSC that sends the SMS message.| -| 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) | Enumerates SMS message types. | -| pdu | Array<number> | PDU in the SMS message. | -| protocolId | number | Protocol identifier used for delivering the SMS message. | -| scAddress | string | SMSC address. | -| scTimestamp | number | SMSC timestamp. | -| status | number | SMS message status sent by the SMSC in the **SMS-STATUS-REPORT** message.| -| visibleMessageBody | string | SMS message body. | -| visibleRawAddress | string | Sender address. | +| Name | Type | Mandatory | Description | +| -------- | ------- | --------- | ----------- | +| hasReplyPath | boolean | Yes |Whether the received SMS contains **TP-Reply-Path**. The default value is **false**.
**TP-Reply-Path**: The device returns a response based on the SMSC that sends the SMS message.| +| isReplaceMessage | boolean | Yes |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 | Yes |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) | Yes | SMS message type. | +| pdu | Array<number> | Yes | PDU in the SMS message. | +| protocolId | number | Yes | Protocol identifier used for delivering the SMS message. | +| scAddress | string | Yes | SMSC address. | +| scTimestamp | number | Yes | SMSC timestamp. | +| status | number | Yes | SMS message status sent by the SMSC in the **SMS-STATUS-REPORT** message.| +| visibleMessageBody | string | Yes | SMS message body. | +| visibleRawAddress | string | Yes | Sender address. | ## ShortMessageClass diff --git a/en/application-dev/reference/apis/js-apis-touchevent.md b/en/application-dev/reference/apis/js-apis-touchevent.md index 05a6e52c9d6f1e402dc9a7e3d8d4a19c9a117ec3..404a78973a81b9604fd3e7644bca5d61d8773a49 100644 --- a/en/application-dev/reference/apis/js-apis-touchevent.md +++ b/en/application-dev/reference/apis/js-apis-touchevent.md @@ -70,7 +70,7 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput | toolHeight | number | Yes| No| Height of the tool area.| | rawX | number | Yes| No| X coordinate of the input device.| | rawY | number | Yes| No| Y coordinate of the input device.| -| toolType | number | Yes| No| Tool type.| +| toolType | ToolType | Yes| No| Tool type.| ## TouchEvent