diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 381796969cdc260896b9ea4857d0461eebf7d519..79ad744268f719cf6c9c24310e27e91c00ae9630 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -1327,7 +1327,7 @@ 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.| +| callback | AsyncCallback<[CallWaitingStatus](#callwaitingstatus7)\> | Yes | Callback used to return the result.

- **0**: Call waiting is disabled.
- **1**: Call waiting is enabled.| **Example** @@ -2743,13 +2743,13 @@ Defines the dialup options. **System capability**: SystemCapability.Telephony.CallManager -| Name | Type | Mandatory| Description | -| ---------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| extras | boolean | No | Indication of a video call.
- **true**: video call
- **false** (default): voice call| -| accountId | number | No | Account ID. This API is supported since API version 8. It is a system API. | -| videoState | [VideoStateType](#videostatetype7) | No | Video state type. This API is supported since API version 8. It is a system API. | -| dialScene | [DialScene](#dialscene8) | No | Dialup scenario. This API is supported since API version 8. It is a system API. | -| dialType | [DialType](#dialtype8) | No | Dialup type. This API is supported since API version 8. It is a system API. | +| Name | Type | Mandatory| Description | +| ------------------------ | ---------------------------------- | ---- | ------------------------------------------------------------ | +| extras | boolean | No | Indication of a video call.
- **true**: video call
- **false** (default): voice call| +| accountId 8+ | number | No | Account ID. This is a system API. | +| videoState 8+ | [VideoStateType](#videostatetype7) | No | Video state type. This is a system API. | +| dialScene 8+ | [DialScene](#dialscene8) | No | Dialup scenario. This is a system API. | +| dialType 8+ | [DialType](#dialtype8) | No | Dialup type. This is a system API. | ## CallState diff --git a/en/application-dev/reference/apis/js-apis-radio.md b/en/application-dev/reference/apis/js-apis-radio.md index 16da2e93685e99d26b9af2040af3f294ce68bd08..6e3ee3ab521fd77e73a8085002296cd6b5883430 100644 --- a/en/application-dev/reference/apis/js-apis-radio.md +++ b/en/application-dev/reference/apis/js-apis-radio.md @@ -1588,6 +1588,128 @@ promise.then(data => { }); ``` +## radio.getImsRegInfo9+ + +getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback): void + +Obtains the IMS registration status of the specified IMS service type. This API uses an asynchronous callback to return the result. + +This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CoreService + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------------------------ | ---- | -------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| +| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | +| callback | AsyncCallback<[ImsRegInfo](#imsreginfo9)\> | Yes | Callback used to return the result. | + +**Example** + +```js +radio.getImsRegInfo(0, 1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + +## radio.getImsRegInfo9+ + +getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise + +Obtains the IMS registration status of the specified IMS service type. This API uses a promise to return the result. + +This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CoreService + +**Parameters** + +| Name | Type | Mandatory| Description | +| ------- | ---------------------------------- | ---- | -------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| +| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | + +**Return value** + +| Type | Description | +| ------------------------------------- | ----------------------- | +| Promise\<[ImsRegInfo](#imsreginfo9)\> | Promise used to return the result.| + +**Example** + +```js +let promise = radio.getImsRegInfo(0, 1); +promise.then(data => { + console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.log(`getImsRegInfo fail, promise: err->${JSON.stringify(err)}`); +}); +``` + +## radio.on('imsRegStateChange')9+ + +on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback): void + +Enables listening for **imsRegStateChange** events. This API uses an asynchronous callback to return the result. + +This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CoreService + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------------------ | ---- | -------------------------------------- | +| type | string | Yes | IMS registration status changes. | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| +| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | +| callback | Callback<[ImsRegInfo](#imsreginfo9)> | Yes | Callback used to return the result. | + +**Example** + +```js +radio.on('imsRegStateChange', 0, 1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + +## radio.off('imsRegStateChange')9+ + +off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback): void + +Disables listening for **imsRegStateChange** events. This API uses an asynchronous callback to return the result. + +This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CoreService + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------------------ | ---- | -------------------------------------- | +| type | string | Yes | IMS registration status changes. | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| +| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | +| callback | Callback<[ImsRegInfo](#imsreginfo9)> | No | Callback used to return the result. | + +**Example** + +```js +radio.off('imsRegStateChange', 0, 1, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + ## RadioTechnology Enumerates radio access technologies. @@ -1755,11 +1877,11 @@ This is a system API. | Name | Type | Description | | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| networkType | [NetworkType](#networkType) | Network type of the cell. | +| 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](#cdmacellinformation) \| [GsmCellInformation](#gsmcellinformation) \| [LteCellInformation](#ltecellinformation) \| [NrCellInformation](#nrcellinformation) \| [TdscdmaCellInformation](#tdscdmacellinformation) | CDMA cell information \| GSM cell information \| LTE cell information \| NR cell information \| TD-SCDMA cell 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| ## CdmaCellInformation8+ @@ -1883,6 +2005,8 @@ This is a system API. Defines the network search result. +This is a system API. + **System capability**: SystemCapability.Telephony.CoreService | Name | Type | Description | @@ -1934,3 +2058,59 @@ This is a system API. | selectMode | [NetworkSelectionMode](#networkselectionmode) | Network selection mode. | | networkInformation | [NetworkInformation](#networkinformation) | Network information. | | resumeSelection | boolean | Whether to resume selection. | + +## ImsRegState9+ + +Enumerates IMS registration states. + +This is a system API. + +**System capability**: SystemCapability.Telephony.CoreService + +| Name | Value | Description | +| ---------------- | ---- | -------- | +| IMS_UNREGISTERED | 0 | Not registered.| +| IMS_REGISTERED | 1 | Registered.| + +## ImsRegTech9+ + +Enumerates IMS registration technologies. + +This is a system API. + +**System capability**: SystemCapability.Telephony.CoreService + +| Name | Value | Description | +| ----------------------- | ---- | --------------- | +| REGISTRATION_TECH_NONE | 0 | None. | +| REGISTRATION_TECH_LTE | 1 | LTE. | +| REGISTRATION_TECH_IWLAN | 2 | I-WLAN.| +| REGISTRATION_TECH_NR | 3 | NR. | + +## ImsRegInfo9+ + +Defines the IMS registration information. + +This is a system API. + +**System capability**: SystemCapability.Telephony.CoreService + +| Name | Type | Description | +| ----------- | ---------------------------- | ------------- | +| imsRegState | [ImsRegState](#imsregstate9) | IMS registration state.| +| imsRegTech | [ImsRegTech](#imsregtech9) | IMS registration technology.| + +## ImsServiceType9+ + +Enumerates IMS service types. + +This is a system API. + +**System capability**: SystemCapability.Telephony.CoreService + +| Name | Value | Description | +| ---------- | ---- | ---------- | +| TYPE_VOICE | 0 | Voice service.| +| TYPE_VIDEO | 1 | Video service.| +| TYPE_UT | 2 | UT service. | +| TYPE_SMS | 3 | SMS service.| diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md index 958de3d7d1bb9d7295bedac1c844867160d687ca..681e5cdc6ac3dea7924feb25752e017052bef23e 100644 --- a/en/application-dev/reference/apis/js-apis-sim.md +++ b/en/application-dev/reference/apis/js-apis-sim.md @@ -1482,7 +1482,7 @@ promise.then(data => { ## sim.**unlockPin**28+ -****unlockPin2****(slotId: number,pin2: string ,callback: AsyncCallback): void +unlockPin2(slotId: number,pin2: string ,callback: AsyncCallback): void Unlocks PIN 2 of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. @@ -1549,7 +1549,7 @@ promise.then(data => { ## sim.**unlockPuk**28+ -unlockPuk2(slotId: number,newPin2: string,puk2: string ,callback: AsyncCallback): void +unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback): void Unlocks PUK 2 of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. @@ -1581,7 +1581,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => { ## sim.**unlockPuk2**8+ -unlockPuk2slotId: number,newPin2: string,puk2: string): Promise<LockStatusResponse\> +unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise<LockStatusResponse\> Unlocks PUK 2 of the SIM card in the specified slot. This API uses a promise to return the result. @@ -2653,7 +2653,7 @@ promise.then(data => { ## sim.getOpKey9+ -getOpKey(slotId: number, callback: AsyncCallback): void +getOpKey(slotId: number, callback: AsyncCallback): void Obtains the opkey of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. @@ -2666,7 +2666,7 @@ 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 | Yes | Callback used to return the result. | +| callback | AsyncCallback | Yes | Callback used to return the result. | **Example** @@ -2679,7 +2679,7 @@ sim.getOpKey(0, (err, data) => { ## sim.getOpKey9+ -getOpKey(slotId: number): Promise +getOpKey(slotId: number): Promise Obtains the opkey of the SIM card in the specified slot. This API uses a promise to return the result. @@ -2697,7 +2697,7 @@ This is a system API. | Type | Description | | ---------------- | ----------------------------------------- | -| Promise | Promise used to return the result.| +| Promise | Promise used to return the result.| **Example** diff --git a/en/application-dev/reference/apis/js-apis-sms.md b/en/application-dev/reference/apis/js-apis-sms.md index fa226f072e2a1c4aa568937455e7ee78e3513469..9039fb774527e9ed6bbd43c95b0996afdc94780d 100644 --- a/en/application-dev/reference/apis/js-apis-sms.md +++ b/en/application-dev/reference/apis/js-apis-sms.md @@ -678,7 +678,7 @@ This is a system API. | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------------- | ---- | ----------------------------------------- | | slotId | number | Yes | SIM card slot ID.
- **0**: card slot 1
- **1**: card slot 2| -| callback | AsyncCallback> | Yes | Callback used to return the result. | +| callback | AsyncCallback> | Yes | Callback used to return the result. | **Example** @@ -712,7 +712,7 @@ This is a system API. | Type | Description | | ------------------------------------------------------- | ---------------------------------- | -| PromiseArray<[SimShortMessage](#simshortmessage8)\>> | Promise used to return the result.| +| PromiseArray<[SimShortMessage](#simshortmessage7)\>> | Promise used to return the result.| **Example** @@ -742,7 +742,7 @@ This is a system API. | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------ | -| options | [CBConfigOptions](#cbconfigoptions8) | Yes | Cell broadcast configuration options.| +| options | [CBConfigOptions](#cbconfigoptions7) | Yes | Cell broadcast configuration options.| | callback | AsyncCallback<void> | Yes | Callback used to return the result. | **Example** @@ -776,7 +776,7 @@ This is a system API. | Name | Type | Mandatory| Description | | ------- | ------------------------------------ | ---- | ------------ | -| options | [CBConfigOptions](#cbconfigoptions8) | Yes | Cell broadcast configuration options.| +| options | [CBConfigOptions](#cbconfigoptions7) | Yes | Cell broadcast configuration options.| **Return value** @@ -818,7 +818,7 @@ This is a system API. | slotId | number | Yes | SIM card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | message | string | Yes | SMS message. | | force7bit | boolean | Yes | Whether to use 7-bit coding. | -| callback | AsyncCallback<[SmsSegmentsInfo](#8+ + +Defines the MMS message reading index. + +This is a system API. + +**System capability**: SystemCapability.Telephony.SmsMms + +| Name | Type | Mandatory| Description | +| ---------- | ---------------------------------- | ---- | -------- | +| version | [MmsVersionType](#mmsversiontype8) | Yes | Version | +| messageId | string | Yes | Message ID. | +| to | Array<[MmsAddress](#mmsaddress8)\> | Yes | Destination. | +| from | [MmsAddress](#mmsaddress8) | Yes | Source. | +| readStatus | number | Yes | Read state.| +| date | number | No | Date. | + + ## MmsAttachment8+ Defines the attachment of an MMS message. @@ -1466,7 +1485,7 @@ This is a system API. | MMS_YES | 128 | YES | | MMS_NO | 129 | NO | -## CBConfigOptions8+ +## CBConfigOptions7+ Defines the cell broadcast configuration options. @@ -1557,7 +1576,7 @@ This is a system API. | pdu | string | Yes | Protocol data unit. | | smsc | string | Yes | Short message service center.| -## SimShortMessage8+ +## SimShortMessage7+ Defines a SIM message.