提交 b63d25d6 编写于 作者: S shawn_he

update doc

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 1d092815
......@@ -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-sub-directories):
```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)
```
......@@ -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&lt;boolean&gt; | Yes | Callback used to return the result.<br>- **true**: success<br>- **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&lt;boolean&gt; | Yes | Callback used to return the result.<br> - **true**: The called number is an emergency number.<br>- **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&lt;string&gt; | Yes | Callback used to return the result. |
**Example**
......@@ -566,33 +566,6 @@ promise.then(data => {
});
```
## call.answer<sup>7+</sup>
answer\(callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.answer<sup>7+</sup>
answer\(callId: number, callback: AsyncCallback<void\>\): void
......@@ -658,7 +631,7 @@ promise.then(data => {
## call.hangup<sup>7+</sup>
hangup\(callback: AsyncCallback<void\>\): void
hangup\(callId: number, callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.hangup<sup>7+</sup>
## call.answer<sup>9+</sup>
hangup\(callId: number, callback: AsyncCallback<void\>\): void
answer\(callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.reject<sup>7+</sup>
## call.hangup<sup>9+</sup>
reject\(callback: AsyncCallback<void\>\): void
hangup\(callback: AsyncCallback<void\>\): 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.reject<sup>7+</sup>
reject\(options: RejectMessageOptions, callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.reject<sup>9+</sup>
reject\(callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.reject<sup>9+</sup>
reject\(options: RejectMessageOptions, callback: AsyncCallback<void\>\): 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&lt;void&gt; | 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.holdCall<sup>7+</sup>
holdCall\(callId: number, callback: AsyncCallback<void\>\): void
......@@ -2399,7 +2400,7 @@ promise.then(data => {
});
```
## call.setAudioDevice<sup>8+</sup>
## call.setAudioDevice<sup>9+</sup>
setAudioDevice\(device: AudioDevice, callback: AsyncCallback<void\>\): void
......@@ -2425,7 +2426,7 @@ call.setAudioDevice(1, (err, data) => {
```
## call.setAudioDevice<sup>8+</sup>
## call.setAudioDevice<sup>9+</sup>
setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback<void\>\): void
......
......@@ -247,9 +247,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 +313,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 +379,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 +713,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 +905,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 +947,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
......
# 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.
......
......@@ -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
......
# 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.|
......@@ -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).|
| reason<sup>8+</sup> | [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).|
| reason<sup>8+</sup> | [LockReason](#lockreason8) | Yes| SIM card lock type.|
......@@ -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&lt;void&gt; | Yes | Callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | 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&lt;void&gt; | Yes | Callback used to return the result.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.|
**Example**
......
......@@ -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.|
| cfgTech<sup>8+</sup> | [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.|
| cfgTech<sup>8+</sup> | [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|
## CdmaCellInformation<sup>8+</sup>
......@@ -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.|
## GsmCellInformation<sup>8+</sup>
......@@ -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. |
## LteCellInformation<sup>8+</sup>
......@@ -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. |
## NrCellInformation<sup>8+</sup>
......@@ -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. |
## TdscdmaCellInformation<sup>8+</sup>
......@@ -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. |
## WcdmaCellInformation<sup>8+</sup>
......@@ -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. |
## NrOptionMode<sup>8+</sup>
......@@ -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.<br>- **0**: card slot 1<br>- **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.<br>- **0**: card slot 1<br>- **1**: card slot 2|
| selectMode | [NetworkSelectionMode](#networkselectionmode) | Yes | Network selection mode. |
| networkInformation | [NetworkInformation](#networkinformation) | Yes | Network information. |
| resumeSelection | boolean | Yes | Whether to resume selection. |
## ImsRegState<sup>9+</sup>
......@@ -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.|
## ImsServiceType<sup>9+</sup>
......
......@@ -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&lt;[ResourceManager](#resourcemanager)&gt; | 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&lt;[ResourceManager](#resourcemanager)&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;Array&lt;string&gt;&gt; | 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&lt;Array&lt;string&gt;&gt; | 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&lt;Uint8Array&gt; | 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&lt;Uint8Array&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;[Configuration](#configuration)&gt; | 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&lt;[DeviceCapability](#devicecapability)&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;Uint8Array&gt; | 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&lt;[RawFileDescriptor](#rawfiledescriptor8)&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;string&gt; | 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&lt;Array&lt;string&gt;&gt; | 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&lt;Uint8Array&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;Array&lt;string&gt;&gt; | Promise used to return the result.|
......@@ -2495,7 +2531,7 @@ getMedia(resId: number, callback: AsyncCallback&lt;Uint8Array&gt;): 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&lt;Uint8Array&gt;
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&lt;Uint8Array&gt; | Promise used to return the result.|
......@@ -2559,7 +2596,7 @@ getMediaBase64(resId: number, callback: AsyncCallback&lt;string&gt;): 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&lt;string&gt;
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&lt;string&gt; | Promise used to return the result.|
......@@ -2623,7 +2661,7 @@ getPluralString(resId: number, num: number): Promise&lt;string&gt;
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&lt;string&gt; | Promise used to return the result.|
......@@ -2657,7 +2696,7 @@ getPluralString(resId: number, num: number, callback: AsyncCallback&lt;string&gt
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&lt;Uint8Array&gt; | 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&lt;[RawFileDescriptor](#rawfiledescriptor8)&gt; | Promise used to return the result.|
......
......@@ -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).|
## LockInfo<sup>8+</sup>
......@@ -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.|
## PersoLockInfo<sup>8+</sup>
......@@ -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. |
## IccAccountInfo<sup>7+</sup>
......@@ -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. |
## OperatorConfig<sup>8+</sup>
......@@ -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. |
## DiallingNumbersInfo<sup>8+</sup>
......@@ -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.|
## ContactType<sup>8+</sup>
......
......@@ -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**.<br>**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**.<br>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**.<br>**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&lt;number&gt; | 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**.<br>**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**.<br>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**.<br>**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&lt;number&gt; | 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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册