# Radio The radio module provides basic network search management functions. You can obtain the radio access technology (RAT) used in the CS and PS domains, network status, current network selection mode, ISO country code of the registered network, ID of the slot in which the primary card is located, list of signal strengths of the registered network, carrier name, and IMEI, MEID, and unique device ID of the SIM card in the specified slot. Besides, you can check whether the current device supports 5G\(NR\) and whether the radio service is enabled on the primary SIM card. >**NOTE** > >The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import ``` import radio from '@ohos.telephony.radio' ``` ## radio.getRadioTech getRadioTech\(slotId: number, callback: AsyncCallback<\{psRadioTech: RadioTechnology, csRadioTech: RadioTechnology\}\>\): void Obtains the RAT used in the CS and PS domains for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | callback | AsyncCallback\<{psRadioTech: [RadioTechnology](#radiotechnology), csRadioTech:[RadioTechnology](#radiotechnology)}\> | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getRadioTech(slotId, (err, data) =>{ console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getRadioTech getRadioTech\(slotId: number\): Promise<\{psRadioTech: RadioTechnology, csRadioTech: RadioTechnology\}\> Obtains the RAT used in the CS and PS domains for the SIM card in the specified slot. This API uses a promise to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ------------------------------------------------------------ | ----------------------------------------------- | | Promise<{psRadioTech: [RadioTechnology](#radiotechnology), csRadioTech: [RadioTechnology](#radiotechnology)}> | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getRadioTech(slotId); promise.then(data => { console.log(`getRadioTech success, data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getRadioTech fail, err->${JSON.stringify(err)}`); }); ``` ## radio.getNetworkState getNetworkState\(callback: AsyncCallback\): void Obtains the network status. This API uses an asynchronous callback to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ---------------------------------------------- | ---- | ---------- | | callback | AsyncCallback\<[NetworkState](#networkstate)\> | Yes | Callback used to return the result.| **Example** ```js radio.getNetworkState((err, data) =>{ console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNetworkState getNetworkState\(slotId: number, callback: AsyncCallback\): void Obtains the network status of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ---------------------------------------------- | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | callback | AsyncCallback\<[NetworkState](#networkstate)\> | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getNetworkState(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNetworkState getNetworkState\(slotId?: number\): Promise Obtains the network status of the SIM card in the specified slot. This API uses a promise to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ---------------------------------------- | --------------------------- | | Promise\<[NetworkState](#networkstate)\> | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getNetworkState(slotId); promise.then(data => { console.log(`getNetworkState success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getNetworkState fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getNetworkSelectionMode getNetworkSelectionMode\(slotId: number, callback: AsyncCallback\): void Obtains the network selection mode of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | callback | AsyncCallback\<[NetworkSelectionMode](#networkselectionmode)\> | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getNetworkSelectionMode(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNetworkSelectionMode getNetworkSelectionMode\(slotId: number\): Promise Obtains the network selection mode of the SIM card in the specified slot. This API uses a promise to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | -------------------------------------------------------- | ------------------------------- | | Promise\<[NetworkSelectionMode](#networkselectionmode)\> | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getNetworkSelectionMode(slotId); promise.then(data => { console.log(`getNetworkSelectionMode success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getNetworkSelectionMode fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getISOCountryCodeForNetwork7+ getISOCountryCodeForNetwork\(slotId: number, callback: AsyncCallback\): void Obtains the ISO country code of the network with which the SIM card in the specified slot is registered. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | 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, which is an ISO country code, for example, **CN** (China).| **Example** ```js let slotId = 0; radio.getISOCountryCodeForNetwork(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getISOCountryCodeForNetwork7+ getISOCountryCodeForNetwork\(slotId: number\): Promise Obtains the ISO country code of the network with which the SIM card in the specified slot is registered. This API uses a promise to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------- | ------------------------------------------------------------ | | Promise\ | Promise used to return the result, which is an ISO country code, for example, **CN** (China).| **Example** ```js let slotId = 0; let promise = radio.getISOCountryCodeForNetwork(slotId); promise.then(data => { console.log(`getISOCountryCodeForNetwork success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getISOCountryCodeForNetwork fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getPrimarySlotId7+ getPrimarySlotId\(callback: AsyncCallback\\): void Obtains the ID of the slot in which the primary card is located. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.getPrimarySlotId((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getPrimarySlotId7+ getPrimarySlotId\(\): Promise\ Obtains the ID of the slot in which the primary card is located. This API uses a promise to return the result. **System capability**: SystemCapability.Telephony.CoreService **Return value** | Type | Description | | ----------------------------------------------------------- | ------------------------------------------------------------ | | Promise\ | Promise used to return the result.| **Example** ```js let promise = radio.getPrimarySlotId(); promise.then(data => { console.log(`getPrimarySlotId success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getPrimarySlotId fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getSignalInformation7+ getSignalInformation\(slotId: number, callback: AsyncCallback\>\): void Obtains a list of signal strengths of the network with which the SIM card in the specified slot is registered. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | 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, which is a list of [SignalInformation](#signalinformation) objects.| **Example** ```js let slotId = 0; radio.getSignalInformation(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getSignalInformation7+ getSignalInformation\(slotId: number\): Promise\> Obtains a list of signal strengths of the network with which the SIM card in the specified slot is registered. This API uses a promise to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------------------------------------------------- | ------------------------------------------------------------ | | Promise\\> | Promise used to return the result, which is a list of [SignalInformation](#signalinformation) objects.| **Example** ```js let slotId = 0; let promise = radio.getSignalInformation(slotId); promise.then(data => { console.log(`getSignalInformation success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getSignalInformation fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.isNrSupported8+ isNrSupported\(slotId: number\): boolean Checks whether the current device supports 5G \(NR\). **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ------------------ | ------------------------------------------------------------ | | boolean | - **true**: The current device supports 5G \(NR\).
- **false**: The current device does not support 5G \(NR\).| **Example** ```js let slotId = 0; let result = radio.isNrSupported(slotId); console.log("Result: "+ result); ``` ## radio.isRadioOn7+ isRadioOn\(callback: AsyncCallback\): void Checks whether the radio service is enabled on the primary SIM card. This API uses an asynchronous callback to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------ | ---- | ------------------------------------------------------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.
- **true**: The radio service is enabled.
- **false**: The radio service is disabled.| **Example** ```js radio.isRadioOn((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.isRadioOn7+ isRadioOn\(slotId: number, callback: AsyncCallback\): void Checks whether the radio service is enabled on the SIM card in the specified slot. This API uses an asynchronous callback to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | 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.
- **true**: The radio service is enabled.
- **false**: The radio service is disabled.| **Example** ```js let slotId = 0; radio.isRadioOn(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.isRadioOn7+ isRadioOn\(slotId?: number\): Promise Checks whether the radio service is enabled. This API uses a promise to return the result. **Required permission**: ohos.permission.GET_NETWORK_INFO **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2
If the slot ID is not specified, this API is defaulted to check whether the radio service is enabled on the primary SIM card.| **Return value** | Type | Description | | ------------------ | ------------------------------------------------------------ | | Promise\ | Promise used to return the result.
- **true**: The radio service is enabled.
- **false**: The radio service is disabled.| **Example** ```js let slotId = 0; let promise = radio.isRadioOn(slotId); promise.then(data => { console.log(`isRadioOn success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`isRadioOn fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getOperatorName7+ getOperatorName\(slotId: number, callback: AsyncCallback\): void Obtains the carrier name. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | 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, which is the carrier name, for example, China Mobile.| **Example** ```js let slotId = 0; radio.getOperatorName(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getOperatorName7+ getOperatorName\(slotId: number\): Promise Obtains the carrier name. This API uses a promise to return the result. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------- | ------------------------------------------------------------ | | Promise\ | Promise used t return the result, which is the carrier name, for example, China Mobile. | **Example** ```js let slotId = 0; let promise = radio.getOperatorName(slotId); promise.then(data => { console.log(`getOperatorName success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getOperatorName fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.setPrimarySlotId8+ setPrimarySlotId(slotId: number, callback: AsyncCallback): void Sets the ID of the slot in which the primary card is located. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.setPrimarySlotId(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.setPrimarySlotId8+ setPrimarySlotId\(slotId: number\): Promise\ Sets the ID of the slot in which the primary card is located. This API uses a promise to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| **Return value** | Type | Description | | --------------- | ------------------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.setPrimarySlotId(slotId); promise.then(data => { console.log(`setPrimarySlotId success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`setPrimarySlotId fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getIMEI8+ getIMEI(callback: AsyncCallback): void Obtains the IMEI of the SIM card in a card slot. 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 | | -------- | ----------------------- | ---- | ------------------------------------------ | | callback | AsyncCallback\ | Yes | Callback used to return the result. If the IMEI does not exist, an empty string is returned.| **Example** ```js radio.getIMEI((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getIMEI8+ getIMEI(slotId: number, callback: AsyncCallback): void Obtains the IMEI of the SIM card in the specified slot. 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 | | callback | AsyncCallback\ | Yes | Callback used to return the result. If the IMEI does not exist, an empty string is returned.| **Example** ```js let slotId = 0; radio.getIMEI(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getIMEI8+ getIMEI(slotId?: number): Promise Obtains the IMEI of the SIM card in a card slot. 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 | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------- | ------------------------------------------ | | Promise\ | Promise used to return the result. If the IMEI does not exist, an empty string is returned.| **Example** ```js let slotId = 0; let promise = radio.getIMEI(slotId); promise.then(data => { console.log(`getIMEI success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getIMEI fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getMEID8+ getMEID(callback: AsyncCallback): void Obtains the MEID of the SIM card in a card slot. 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 | | -------- | ----------------------- | ---- | ---------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.getMEID((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getMEID8+ getMEID(slotId: number, callback: AsyncCallback): void Obtains the MEID of the SIM card in the specified slot. 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| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getMEID(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getMEID8+ getMEID(slotId?: number): Promise Obtains the MEID of the SIM card in the specified slot. 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 | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------- | --------------------------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getMEID(slotId); promise.then(data => { console.log(`getMEID success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getMEID fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getUniqueDeviceId8+ getUniqueDeviceId(callback: AsyncCallback): void Obtains the unique device ID of the SIM card in a card slot. 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 | | -------- | ----------------------- | ---- | ---------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.getUniqueDeviceId((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getUniqueDeviceId8+ getUniqueDeviceId(slotId: number, callback: AsyncCallback): void Obtains the unique device ID of the SIM card in the specified slot. 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| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getUniqueDeviceId(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getUniqueDeviceId8+ getUniqueDeviceId(slotId?: number): Promise Obtains the unique device ID of the SIM card in the specified slot. 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 | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------- | --------------------------------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getUniqueDeviceId(slotId); promise.then(data => { console.log(`getUniqueDeviceId success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getUniqueDeviceId fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.sendUpdateCellLocationRequest8+ sendUpdateCellLocationRequest\(callback: AsyncCallback\): void Sends a cell location update request. This API uses an asynchronous callback to return the result. This is a system API. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | --------------------- | ---- | ---------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.sendUpdateCellLocationRequest((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.sendUpdateCellLocationRequest8+ sendUpdateCellLocationRequest\(\): Promise Sends a cell location update request. This API uses a promise to return the result. This is a system API. **System capability**: SystemCapability.Telephony.CoreService **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let promise = radio.sendUpdateCellLocationRequest(); promise.then(data => { console.log(`sendUpdateCellLocationRequest success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`sendUpdateCellLocationRequest fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getCellInformation8+ getCellInformation(callback: AsyncCallback>): void Obtains cell information. This API uses an asynchronous callback to return the result. This is a system API. **Required permissions**: ohos.permission.LOCATION **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------ | | callback | AsyncCallback\\> | Yes | Callback used to return the result.| **Example** ```js radio.getCellInformation((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getCellInformation8+ getCellInformation(slotId: number, callback: AsyncCallback\>): void Obtains cell information. This API uses an asynchronous callback to return the result. This is a system API. **Required permissions**: ohos.permission.LOCATION **System capability**: SystemCapability.Telephony.CoreService **Parameters** | 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. | **Example** ```js let slotId = 0; radio.getCellInformation(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getCellInformation8+ getCellInformation(slotId?: number): Promise\> Obtains cell information. This API uses a promise to return the result. This is a system API. **Required permissions**: ohos.permission.LOCATION **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ------------------------------------------------------- | ----------------------- | | Promise\\> | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getCellInformation(slotId); promise.then(data => { console.log(`getCellInformation success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getCellInformation fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.setNetworkSelectionMode setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCallback\): void Sets the network selection mode. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------------------- | ---- | ------------------ | | options | [NetworkSelectionModeOptions](#networkselectionmodeoptions) | Yes | Network selection mode.| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let networkInformation={ operatorName: "China Mobile", operatorNumeric: "898600", state: 1, radioTech: "CS" } let networkSelectionModeOptions={ slotid: 0, selectMode: 1, networkInformation: networkInformation, resumeSelection: true } radio.setNetworkSelectionMode(networkSelectionModeOptions, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.setNetworkSelectionMode setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise Sets the network selection mode. This API uses a promise to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | ------- | ----------------------------------------------------------- | ---- | ------------------ | | options | [NetworkSelectionModeOptions](#networkselectionmodeoptions) | Yes | Network selection mode.| **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let networkInformation={ operatorName: "China Mobile", operatorNumeric: "898600", state: 1, radioTech: "CS" } let networkSelectionModeOptions={ slotid: 0, selectMode: 1, networkInformation: networkInformation, resumeSelection: true } let promise = radio.setNetworkSelectionMode(networkSelectionModeOptions); promise.then(data => { console.log(`setNetworkSelectionMode success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`setNetworkSelectionMode fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getNetworkSearchInformation getNetworkSearchInformation\(slotId: number, callback: AsyncCallback\): void Obtains network search information. 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| | callback | AsyncCallback\<[NetworkSearchResult](#networksearchresult)\> | Yes | Callback used to return the result. | **Example** ```js radio.getNetworkSearchInformation(0, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNetworkSearchInformation getNetworkSearchInformation\(slotId: number\): Promise Obtains network search information. 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| **Return value** | Type | Description | | ------------------------------------------------------ | ----------------------- | | Promise\<[NetworkSearchResult](#networksearchresult)\> | Promise used to return the result.| **Example** ```js let promise = radio.getNetworkSearchInformation(0); promise.then(data => { console.log(`getNetworkSearchInformation success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getNetworkSearchInformation fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getNrOptionMode8+ getNrOptionMode(callback: AsyncCallback): void Obtains the NR option mode. This API uses an asynchronous callback to return the result. This is a system API. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------- | ---- | ---------- | | callback | AsyncCallback\<[NrOptionMode](#nroptionmode8)\> | Yes | Callback used to return the result.| **Example** ```js radio.getNrOptionMode((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNrOptionMode8+ getNrOptionMode(slotId: number, callback: AsyncCallback): void Obtains the NR option mode. This API uses an asynchronous callback to return the result. This is a system API. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | ----------------------------------------------- | ---- | -------------------------------------- | | slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| | callback | AsyncCallback\<[NrOptionMode](#nroptionmode8)\> | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.getNrOptionMode(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getNrOptionMode8+ getNrOptionMode(slotId?: number): Promise Obtains the NR option mode. This API uses a promise to return the result. This is a system API. **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | ----------------------------------------- | ----------------------- | | Promise\<[NrOptionMode](#nroptionmode8)\> | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.getNrOptionMode(slotId); promise.then(data => { console.log(`getNrOptionMode success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`getNrOptionMode fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.turnOnRadio7+ turnOnRadio(callback: AsyncCallback): void Turns on the radio function. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | --------------------- | ---- | ---------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.turnOnRadio((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.turnOnRadio7+ turnOnRadio(slotId: number, callback: AsyncCallback): void Turns on the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.turnOnRadio(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.turnOnRadio7+ turnOnRadio(slotId?: number): Promise Turns on the radio function for the SIM card in the specified slot. This API uses a promise to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.turnOnRadio(slotId); promise.then(data => { console.log(`turnOnRadio success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`turnOnRadio fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.turnOffRadio7+ turnOffRadio(callback: AsyncCallback): void Turns off the radio function. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name | Type | Mandatory| Description | | -------- | --------------------- | ---- | ---------- | | callback | AsyncCallback\ | Yes | Callback used to return the result.| **Example** ```js radio.turnOffRadio((err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.turnOffRadio7+ turnOffRadio(slotId: number, callback: AsyncCallback): void Turns off the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js let slotId = 0; radio.turnOffRadio(slotId, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.turnOffRadio7+ turnOffRadio(slotId?: number): Promise Turns off the radio function for the SIM card in the specified slot. This API uses a promise to return the result. This is a system API. **Required permission**: ohos.permission.SET_TELEPHONY_STATE **System capability**: SystemCapability.Telephony.CoreService **Parameters** | Name| Type | Mandatory| Description | | ------ | ------ | ---- | -------------------------------------- | | slotId | number | No | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2| **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let slotId = 0; let promise = radio.turnOffRadio(slotId); promise.then(data => { console.log(`turnOffRadio success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.error(`turnOffRadio fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.setPreferredNetwork8+ setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback: AsyncCallback\): void Sets the preferred network. This API uses an asynchronous callback to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| | networkMode | [PreferredNetworkMode](#preferrednetworkmode8) | Yes | Preferred network mode. | | callback | AsyncCallback\ | Yes | Callback used to return the result. | **Example** ```js radio.setPreferredNetwork(0, 1, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.setPreferredNetwork8+ setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise Sets the preferred network. This API uses a promise to return the result. This is a system API. **Required permission**: ohos.permission.SET_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| | networkMode | [PreferredNetworkMode](#preferrednetworkmode8) | Yes | Preferred network mode. | **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let promise = radio.setPreferredNetwork(0, 1); promise.then(data => { console.log(`setPreferredNetwork success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`setPreferredNetwork fail, promise: err->${JSON.stringify(err)}`); }); ``` ## radio.getPreferredNetwork8+ getPreferredNetwork\(slotId: number, callback: AsyncCallback\): void Obtains the preferred network. 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| | callback | AsyncCallback\<[PreferredNetworkMode](#preferrednetworkmode8)\> | Yes | Callback used to return the result. | **Example** ```js radio.getPreferredNetwork(0, (err, data) => { console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); }); ``` ## radio.getPreferredNetwork8+ getPreferredNetwork(slotId: number): Promise Obtains the preferred network. 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| **Return value** | Type | Description | | --------------- | ----------------------- | | Promise\ | Promise used to return the result.| **Example** ```js let promise = radio.getPreferredNetwork(0); promise.then(data => { console.log(`getPreferredNetwork success, promise: data->${JSON.stringify(data)}`); }).catch(err => { console.log(`getPreferredNetwork fail, promise: err->${JSON.stringify(err)}`); }); ``` ## RadioTechnology Enumerates radio access technologies. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | ------------------------- | ---- | ------------------------------------------------------------ | | RADIO_TECHNOLOGY_UNKNOWN | 0 | Unknown RAT | | RADIO_TECHNOLOGY_GSM | 1 | Global System for Mobile Communication (GSM) | | RADIO_TECHNOLOGY_1XRTT | 2 | Single-Carrier Radio Transmission Technology (1XRTT)| | RADIO_TECHNOLOGY_WCDMA | 3 | Wideband Code Division Multiple Access (WCDMA)| | RADIO_TECHNOLOGY_HSPA | 4 | High Speed Packet Access (HSPA) | | RADIO_TECHNOLOGY_HSPAP | 5 | Evolved High Speed Packet Access (HSPA+) | | RADIO_TECHNOLOGY_TD_SCDMA | 6 | Time Division Synchronous Code Division Multiple Access (TD-SCDMA)| | RADIO_TECHNOLOGY_EVDO | 7 | Evolution-Data Optimized (EVDO) | | RADIO_TECHNOLOGY_EHRPD | 8 | Evolved High Rate Package Data (EHRPD) | | RADIO_TECHNOLOGY_LTE | 9 | Long Term Evolution (LTE) | | RADIO_TECHNOLOGY_LTE_CA | 10 | Long Term Evolution_Carrier Aggregation (LTE_CA)| | RADIO_TECHNOLOGY_IWLAN | 11 | Industrial Wireless LAN (IWLAN) | | RADIO_TECHNOLOGY_NR | 12 | New Radio (NR) | ## SignalInformation Defines the signal strength. **System capability**: SystemCapability.Telephony.CoreService | Name | Type | Description | | ----------- | --------------------------- | ------------------ | | signalType | [NetworkType](#networktype) | Signal strength type.| | signalLevel | number | Signal strength level.| ## NetworkType Enumerates network types. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | -------------------- | ---- | ------------------------------------------------------------ | | NETWORK_TYPE_UNKNOWN | 0 | Unknown network. | | NETWORK_TYPE_GSM | 1 | GSM network. | | NETWORK_TYPE_CDMA | 2 | CDMA network. | | NETWORK_TYPE_WCDMA | 3 | WCDMA network. | | NETWORK_TYPE_TDSCDMA | 4 | TD-SCDMA network.| | NETWORK_TYPE_LTE | 5 | LTE network. | | NETWORK_TYPE_NR | 6 | 5G NR network. | ## NetworkState 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.| ## RegState Defines the network status. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | ----------------------------- | ---- | -------------------------- | | REG_STATE_NO_SERVICE | 0 | The device cannot use any service. | | REG_STATE_IN_SERVICE | 1 | The device can use services normally. | | REG_STATE_EMERGENCY_CALL_ONLY | 2 | The device can use only the emergency call service.| | REG_STATE_POWER_OFF | 3 | The cellular radio service is disabled. | ## NsaState Enumerates NSA network states. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | -------------------------- | ---- | ---------------------------------------------------------- | | NSA_STATE_NOT_SUPPORT | 1 | The device is in idle or connected state in an LTE cell that does not support NSA. | | NSA_STATE_NO_DETECT | 2 | The device is in the idle state in an LTE cell that supports NSA but not NR coverage detection.| | NSA_STATE_CONNECTED_DETECT | 3 | The device is connected to the LTE network in an LTE cell that supports NSA and NR coverage detection. | | NSA_STATE_IDLE_DETECT | 4 | The device is in the idle state in an LTE cell that supports NSA and NR coverage detection. | | NSA_STATE_DUAL_CONNECTED | 5 | The device is connected to the LTE/NR network in an LTE cell that supports NSA. | | NSA_STATE_SA_ATTACHED | 6 | The device is idle or connected to the NG-RAN cell when being attached to the 5G Core. | ## NetworkSelectionMode Enumerates network selection modes. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | --------------------------- | ---- | -------------- | | NETWORK_SELECTION_UNKNOWN | 0 | Unknown network selection mode.| | NETWORK_SELECTION_AUTOMATIC | 1 | Automatic network selection mode.| | NETWORK_SELECTION_MANUAL | 2 | Manual network selection mode.| ## PreferredNetworkMode8+ Enumerates preferred network modes. This is a system API. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | --------------------------------------------------------- | ---- | --------------------------------------------- | | PREFERRED_NETWORK_MODE_GSM | 1 | GSM network mode. | | PREFERRED_NETWORK_MODE_WCDMA | 2 | WCDMA network mode. | | PREFERRED_NETWORK_MODE_LTE | 3 | LTE network mode. | | PREFERRED_NETWORK_MODE_LTE_WCDMA | 4 | LTE+WCDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM | 5 | LTE+WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_WCDMA_GSM | 6 | WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_CDMA | 7 | CDMA network mode. | | PREFERRED_NETWORK_MODE_EVDO | 8 | EVDO network mode. | | PREFERRED_NETWORK_MODE_EVDO_CDMA | 9 | EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_WCDMA_GSM_EVDO_CDMA | 10 | WCDMA+GSM+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_EVDO_CDMA | 11 | LTE+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM_EVDO_CDMA | 12 | LTE+WCDMA+GSM+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_TDSCDMA | 13 | TD-SCDMA network mode. | | PREFERRED_NETWORK_MODE_TDSCDMA_GSM | 14 | TD-SCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA | 15 | TD-SCDMA+WCDMA network mode. | | PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM | 16 | TD-SCDMA+WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_LTE_TDSCDMA | 17 | LTE+TD-SCDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_TDSCDMA_GSM | 18 | LTE+TD-SCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA | 19 | LTE+TD-SCDMA+WCDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM | 20 | LTE+TD-SCDMA+WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 21 | TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 22 | LTE+TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode.| | PREFERRED_NETWORK_MODE_NR | 31 | NR network mode. | | PREFERRED_NETWORK_MODE_NR_LTE | 32 | NR+LTE network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_WCDMA | 33 | NR+LTE+WCDMA network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM | 34 | NR+LTE+WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_EVDO_CDMA | 35 | NR+LTE+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM_EVDO_CDMA | 36 | NR+LTE+WCDMA+GSM+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA | 37 | NR+LTE+TD-SCDMA network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_GSM | 38 | NR+LTE+TD-SCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA | 39 | NR+LTE+TD-SCDMA+WCDMA network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM | 40 | NR+LTE+TD-SCDMA+WCDMA+GSM network mode. | | PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 41 | NR+LTE+TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode. | | PREFERRED_NETWORK_MODE_MAX_VALUE | 99 | Maximum value of the preferred network mode. | ## CellInformation8+ Defines the cell information. This is a system API. **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](#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 | ## CdmaCellInformation8+ Defines the CDMA cell information. This is a system API. **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.| ## GsmCellInformation8+ Defines the GSM cell information. This is a system API. **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. | ## LteCellInformation8+ Defines the LTE cell information. This is a system API. **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| ## NrCellInformation8+ Defines the NR cell information. This is a system API. **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. | ## TdscdmaCellInformation8+ Defines the TD-SCDMA cell information. This is a system API. **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. | ## WcdmaCellInformation8+ Defines the WCDMA cell information. This is a system API. **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. | ## NrOptionMode8+ Enumerates NR selection modes. This is a system API. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | -------------------- | ---- | ---------------------------------- | | NR_OPTION_UNKNOWN | 0 | Unknown NR selection mode. | | NR_OPTION_NSA_ONLY | 1 | NR selection mode in 5G non-standalone networking. | | NR_OPTION_SA_ONLY | 2 | NR selection mode in 5G standalone networking. | | NR_OPTION_NSA_AND_SA | 3 | NR selection mode in non-standalone and standalone networking.| ## NetworkSearchResult 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.| ## NetworkInformation Defines the network information. This is a system API. **System capability**: SystemCapability.Telephony.CoreService | Name | Type | Description | | --------------- | ----------------------------------------- | -------------- | | operatorName | string | Carrier name.| | operatorNumeric | string | Carrier number. | | state | [NetworkInformation](#networkInformation) | Network information status.| | radioTech | string | Radio technology. | ## NetworkInformationState Enumerates network information states. This is a system API. **System capability**: SystemCapability.Telephony.CoreService | Name | Value | Description | | ----------------- | ---- | ---------------- | | NETWORK_UNKNOWN | 0 | Unknown state. | | NETWORK_AVAILABLE | 1 | Available for registration.| | NETWORK_CURRENT | 2 | Registered state.| | NETWORK_FORBIDDEN | 3 | Unavailable for registration. | ## NetworkSelectionModeOptions Defines the network selection mode. This is a system API. **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. |