1e41f4b71Sopenharmony_ci# @ohos.telephony.radio (Radio) (System API) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **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. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci>**NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci>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. 8e41f4b71Sopenharmony_ci> This topic describes only system APIs provided by the module. For details about its public APIs, see [@ohos.telephony.radio (Radio)](js-apis-radio.md). 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## Modules to Import 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci```ts 13e41f4b71Sopenharmony_ciimport { radio } from '@kit.TelephonyKit'; 14e41f4b71Sopenharmony_ci``` 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci## radio.setPrimarySlotId<sup>8+</sup> 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_cisetPrimarySlotId\(slotId: number, callback: AsyncCallback\<void\>\): void 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ciSets the ID of the slot in which the primary card is located. This API uses an asynchronous callback to return the result. 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci**System API**: This is a system API. 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci**Parameters** 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 32e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | -------------------------------------- | 33e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 34e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci**Error codes** 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci| ID| Error Message | 41e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 42e41f4b71Sopenharmony_ci| 201 | Permission denied. | 43e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 44e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 45e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 46e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 47e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 48e41f4b71Sopenharmony_ci| 8300004 | No SIM card found. | 49e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ci**Example** 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci```ts 54e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_cilet slotId: number = 0; 57e41f4b71Sopenharmony_ciradio.setPrimarySlotId(slotId, (err: BusinessError) => { 58e41f4b71Sopenharmony_ci if (err) { 59e41f4b71Sopenharmony_ci console.error(`setPrimarySlotId failed, callback: err->${JSON.stringify(err)}`); 60e41f4b71Sopenharmony_ci return; 61e41f4b71Sopenharmony_ci } 62e41f4b71Sopenharmony_ci console.log(`setPrimarySlotId success.`); 63e41f4b71Sopenharmony_ci}); 64e41f4b71Sopenharmony_ci``` 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ci## radio.setPrimarySlotId<sup>8+</sup> 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_cisetPrimarySlotId\(slotId: number\): Promise\<void\> 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ciSets the ID of the slot in which the primary card is located. This API uses a promise to return the result. 72e41f4b71Sopenharmony_ci 73e41f4b71Sopenharmony_ci**System API**: This is a system API. 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci**Parameters** 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 82e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 83e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 84e41f4b71Sopenharmony_ci 85e41f4b71Sopenharmony_ci**Return value** 86e41f4b71Sopenharmony_ci 87e41f4b71Sopenharmony_ci| Type | Description | 88e41f4b71Sopenharmony_ci| --------------- | ------------------------------- | 89e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 90e41f4b71Sopenharmony_ci 91e41f4b71Sopenharmony_ci**Error codes** 92e41f4b71Sopenharmony_ci 93e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 94e41f4b71Sopenharmony_ci 95e41f4b71Sopenharmony_ci| ID| Error Message | 96e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 97e41f4b71Sopenharmony_ci| 201 | Permission denied. | 98e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 99e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 100e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 101e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 102e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 103e41f4b71Sopenharmony_ci| 8300004 | No SIM card found. | 104e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 105e41f4b71Sopenharmony_ci 106e41f4b71Sopenharmony_ci**Example** 107e41f4b71Sopenharmony_ci 108e41f4b71Sopenharmony_ci```ts 109e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 110e41f4b71Sopenharmony_ci 111e41f4b71Sopenharmony_cilet slotId: number = 0; 112e41f4b71Sopenharmony_ciradio.setPrimarySlotId(slotId).then(() => { 113e41f4b71Sopenharmony_ci console.log(`setPrimarySlotId success.`); 114e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 115e41f4b71Sopenharmony_ci console.error(`setPrimarySlotId failed, promise: err->${JSON.stringify(err)}`); 116e41f4b71Sopenharmony_ci}); 117e41f4b71Sopenharmony_ci``` 118e41f4b71Sopenharmony_ci 119e41f4b71Sopenharmony_ci## radio.getIMEI<sup>8+</sup> 120e41f4b71Sopenharmony_ci 121e41f4b71Sopenharmony_cigetIMEI\(callback: AsyncCallback\<string\>\): void 122e41f4b71Sopenharmony_ci 123e41f4b71Sopenharmony_ciObtains the IMEI of the primary SIM card of the device. This API uses an asynchronous callback to return the result. 124e41f4b71Sopenharmony_ci 125e41f4b71Sopenharmony_ci**System API**: This is a system API. 126e41f4b71Sopenharmony_ci 127e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 128e41f4b71Sopenharmony_ci 129e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 130e41f4b71Sopenharmony_ci 131e41f4b71Sopenharmony_ci**Parameters** 132e41f4b71Sopenharmony_ci 133e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 134e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ------------------------------------------ | 135e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. If the IMEI does not exist, an empty string is returned.| 136e41f4b71Sopenharmony_ci 137e41f4b71Sopenharmony_ci**Error codes** 138e41f4b71Sopenharmony_ci 139e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 140e41f4b71Sopenharmony_ci 141e41f4b71Sopenharmony_ci| ID| Error Message | 142e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 143e41f4b71Sopenharmony_ci| 201 | Permission denied. | 144e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 145e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 146e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 147e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 148e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 149e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci**Example** 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ci```ts 154e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 155e41f4b71Sopenharmony_ci 156e41f4b71Sopenharmony_ciradio.getIMEI((err: BusinessError, data: string) => { 157e41f4b71Sopenharmony_ci if (err) { 158e41f4b71Sopenharmony_ci console.error(`getIMEI failed, callback: err->${JSON.stringify(err)}`); 159e41f4b71Sopenharmony_ci return; 160e41f4b71Sopenharmony_ci } 161e41f4b71Sopenharmony_ci console.log(`getIMEI success, callback: data->${JSON.stringify(data)}`); 162e41f4b71Sopenharmony_ci}); 163e41f4b71Sopenharmony_ci``` 164e41f4b71Sopenharmony_ci 165e41f4b71Sopenharmony_ci 166e41f4b71Sopenharmony_ci## radio.getIMEI<sup>8+</sup> 167e41f4b71Sopenharmony_ci 168e41f4b71Sopenharmony_cigetIMEI\(slotId: number, callback: AsyncCallback\<string\>\): void 169e41f4b71Sopenharmony_ci 170e41f4b71Sopenharmony_ciObtains the IMEI of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 171e41f4b71Sopenharmony_ci 172e41f4b71Sopenharmony_ci**System API**: This is a system API. 173e41f4b71Sopenharmony_ci 174e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 175e41f4b71Sopenharmony_ci 176e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci**Parameters** 179e41f4b71Sopenharmony_ci 180e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 181e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ------------------------------------------ | 182e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 183e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. If the IMEI does not exist, an empty string is returned.| 184e41f4b71Sopenharmony_ci 185e41f4b71Sopenharmony_ci**Error codes** 186e41f4b71Sopenharmony_ci 187e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 188e41f4b71Sopenharmony_ci 189e41f4b71Sopenharmony_ci| ID| Error Message | 190e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 191e41f4b71Sopenharmony_ci| 201 | Permission denied. | 192e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 193e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 194e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 195e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 196e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 197e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 198e41f4b71Sopenharmony_ci 199e41f4b71Sopenharmony_ci**Example** 200e41f4b71Sopenharmony_ci 201e41f4b71Sopenharmony_ci```ts 202e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 203e41f4b71Sopenharmony_ci 204e41f4b71Sopenharmony_cilet slotId: number = 0; 205e41f4b71Sopenharmony_ciradio.getIMEI(slotId, (err: BusinessError, data: string) => { 206e41f4b71Sopenharmony_ci if (err) { 207e41f4b71Sopenharmony_ci console.error(`getIMEI failed, callback: err->${JSON.stringify(err)}`); 208e41f4b71Sopenharmony_ci return; 209e41f4b71Sopenharmony_ci } 210e41f4b71Sopenharmony_ci console.log(`getIMEI success, callback: data->${JSON.stringify(data)}`); 211e41f4b71Sopenharmony_ci}); 212e41f4b71Sopenharmony_ci``` 213e41f4b71Sopenharmony_ci 214e41f4b71Sopenharmony_ci 215e41f4b71Sopenharmony_ci## radio.getIMEI<sup>8+</sup> 216e41f4b71Sopenharmony_ci 217e41f4b71Sopenharmony_cigetIMEI\(slotId?: number\): Promise\<string\> 218e41f4b71Sopenharmony_ci 219e41f4b71Sopenharmony_ciObtains the IMEI of the SIM card in the specified slot. This API uses a promise to return the result. 220e41f4b71Sopenharmony_ci 221e41f4b71Sopenharmony_ci**System API**: This is a system API. 222e41f4b71Sopenharmony_ci 223e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 224e41f4b71Sopenharmony_ci 225e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 226e41f4b71Sopenharmony_ci 227e41f4b71Sopenharmony_ci**Parameters** 228e41f4b71Sopenharmony_ci 229e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 230e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 231e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 232e41f4b71Sopenharmony_ci 233e41f4b71Sopenharmony_ci**Return value** 234e41f4b71Sopenharmony_ci 235e41f4b71Sopenharmony_ci| Type | Description | 236e41f4b71Sopenharmony_ci| ----------------- | ------------------------------------------ | 237e41f4b71Sopenharmony_ci| Promise\<string\> | Promise used to return the result. If the IMEI does not exist, an empty string is returned.| 238e41f4b71Sopenharmony_ci 239e41f4b71Sopenharmony_ci**Error codes** 240e41f4b71Sopenharmony_ci 241e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 242e41f4b71Sopenharmony_ci 243e41f4b71Sopenharmony_ci| ID| Error Message | 244e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 245e41f4b71Sopenharmony_ci| 201 | Permission denied. | 246e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 247e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 248e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 249e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 250e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 251e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 252e41f4b71Sopenharmony_ci 253e41f4b71Sopenharmony_ci**Example** 254e41f4b71Sopenharmony_ci 255e41f4b71Sopenharmony_ci```ts 256e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 257e41f4b71Sopenharmony_ci 258e41f4b71Sopenharmony_cilet slotId: number = 0; 259e41f4b71Sopenharmony_ciradio.getIMEI(slotId).then((data: string) => { 260e41f4b71Sopenharmony_ci console.log(`getIMEI success, promise: data->${JSON.stringify(data)}`); 261e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 262e41f4b71Sopenharmony_ci console.error(`getIMEI failed, promise: err->${JSON.stringify(err)}`); 263e41f4b71Sopenharmony_ci}); 264e41f4b71Sopenharmony_ci``` 265e41f4b71Sopenharmony_ci 266e41f4b71Sopenharmony_ci## radio.getMEID<sup>8+</sup> 267e41f4b71Sopenharmony_ci 268e41f4b71Sopenharmony_cigetMEID\(callback: AsyncCallback\<string\>\): void 269e41f4b71Sopenharmony_ci 270e41f4b71Sopenharmony_ciObtains the MEID of the SIM card. This API uses an asynchronous callback to return the result. 271e41f4b71Sopenharmony_ci 272e41f4b71Sopenharmony_ci**System API**: This is a system API. 273e41f4b71Sopenharmony_ci 274e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 275e41f4b71Sopenharmony_ci 276e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 277e41f4b71Sopenharmony_ci 278e41f4b71Sopenharmony_ci**Parameters** 279e41f4b71Sopenharmony_ci 280e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 281e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ---------- | 282e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. If the MEID does not exist, an empty string is returned.| 283e41f4b71Sopenharmony_ci 284e41f4b71Sopenharmony_ci**Error codes** 285e41f4b71Sopenharmony_ci 286e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 287e41f4b71Sopenharmony_ci 288e41f4b71Sopenharmony_ci| ID| Error Message | 289e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 290e41f4b71Sopenharmony_ci| 201 | Permission denied. | 291e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 292e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 293e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 294e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 295e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 296e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 297e41f4b71Sopenharmony_ci 298e41f4b71Sopenharmony_ci**Example** 299e41f4b71Sopenharmony_ci 300e41f4b71Sopenharmony_ci```ts 301e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 302e41f4b71Sopenharmony_ci 303e41f4b71Sopenharmony_ciradio.getMEID((err: BusinessError, data: string) => { 304e41f4b71Sopenharmony_ci if (err) { 305e41f4b71Sopenharmony_ci console.error(`getMEID failed, callback: err->${JSON.stringify(err)}`); 306e41f4b71Sopenharmony_ci return; 307e41f4b71Sopenharmony_ci } 308e41f4b71Sopenharmony_ci console.log(`getMEID success, callback: data->${JSON.stringify(data)}`); 309e41f4b71Sopenharmony_ci}); 310e41f4b71Sopenharmony_ci``` 311e41f4b71Sopenharmony_ci 312e41f4b71Sopenharmony_ci 313e41f4b71Sopenharmony_ci## radio.getMEID<sup>8+</sup> 314e41f4b71Sopenharmony_ci 315e41f4b71Sopenharmony_cigetMEID\(slotId: number, callback: AsyncCallback\<string\>\): void 316e41f4b71Sopenharmony_ci 317e41f4b71Sopenharmony_ciObtains the MEID of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 318e41f4b71Sopenharmony_ci 319e41f4b71Sopenharmony_ci**System API**: This is a system API. 320e41f4b71Sopenharmony_ci 321e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 322e41f4b71Sopenharmony_ci 323e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 324e41f4b71Sopenharmony_ci 325e41f4b71Sopenharmony_ci**Parameters** 326e41f4b71Sopenharmony_ci 327e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 328e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | -------------------------------------- | 329e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 330e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. If the MEID does not exist, an empty string is returned.| 331e41f4b71Sopenharmony_ci 332e41f4b71Sopenharmony_ci**Error codes** 333e41f4b71Sopenharmony_ci 334e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 335e41f4b71Sopenharmony_ci 336e41f4b71Sopenharmony_ci| ID| Error Message | 337e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 338e41f4b71Sopenharmony_ci| 201 | Permission denied. | 339e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 340e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 341e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 342e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 343e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 344e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 345e41f4b71Sopenharmony_ci 346e41f4b71Sopenharmony_ci**Example** 347e41f4b71Sopenharmony_ci 348e41f4b71Sopenharmony_ci```ts 349e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 350e41f4b71Sopenharmony_ci 351e41f4b71Sopenharmony_cilet slotId: number = 0; 352e41f4b71Sopenharmony_ciradio.getMEID(slotId, (err: BusinessError, data: string) => { 353e41f4b71Sopenharmony_ci if (err) { 354e41f4b71Sopenharmony_ci console.error(`getMEID failed, callback: err->${JSON.stringify(err)}`); 355e41f4b71Sopenharmony_ci return; 356e41f4b71Sopenharmony_ci } 357e41f4b71Sopenharmony_ci console.log(`getMEID success, callback: data->${JSON.stringify(data)}`); 358e41f4b71Sopenharmony_ci}); 359e41f4b71Sopenharmony_ci``` 360e41f4b71Sopenharmony_ci 361e41f4b71Sopenharmony_ci 362e41f4b71Sopenharmony_ci## radio.getMEID<sup>8+</sup> 363e41f4b71Sopenharmony_ci 364e41f4b71Sopenharmony_cigetMEID\(slotId?: number\): Promise\<string\> 365e41f4b71Sopenharmony_ci 366e41f4b71Sopenharmony_ciObtains the MEID of the SIM card in the specified slot. This API uses a promise to return the result. 367e41f4b71Sopenharmony_ci 368e41f4b71Sopenharmony_ci**System API**: This is a system API. 369e41f4b71Sopenharmony_ci 370e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 371e41f4b71Sopenharmony_ci 372e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 373e41f4b71Sopenharmony_ci 374e41f4b71Sopenharmony_ci**Parameters** 375e41f4b71Sopenharmony_ci 376e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 377e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 378e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 379e41f4b71Sopenharmony_ci 380e41f4b71Sopenharmony_ci**Return value** 381e41f4b71Sopenharmony_ci 382e41f4b71Sopenharmony_ci| Type | Description | 383e41f4b71Sopenharmony_ci| ----------------- | --------------------------------------- | 384e41f4b71Sopenharmony_ci| Promise\<string\> | Promise used to return the result. If the MEID does not exist, an empty string is returned.| 385e41f4b71Sopenharmony_ci 386e41f4b71Sopenharmony_ci**Error codes** 387e41f4b71Sopenharmony_ci 388e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 389e41f4b71Sopenharmony_ci 390e41f4b71Sopenharmony_ci| ID| Error Message | 391e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 392e41f4b71Sopenharmony_ci| 201 | Permission denied. | 393e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 394e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 395e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 396e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 397e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 398e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 399e41f4b71Sopenharmony_ci 400e41f4b71Sopenharmony_ci**Example** 401e41f4b71Sopenharmony_ci 402e41f4b71Sopenharmony_ci```ts 403e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 404e41f4b71Sopenharmony_ci 405e41f4b71Sopenharmony_cilet slotId: number = 0; 406e41f4b71Sopenharmony_ciradio.getMEID(slotId).then((data: string) => { 407e41f4b71Sopenharmony_ci console.log(`getMEID success, promise: data->${JSON.stringify(data)}`); 408e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 409e41f4b71Sopenharmony_ci console.error(`getMEID failed, promise: err->${JSON.stringify(err)}`); 410e41f4b71Sopenharmony_ci}); 411e41f4b71Sopenharmony_ci``` 412e41f4b71Sopenharmony_ci 413e41f4b71Sopenharmony_ci## radio.getUniqueDeviceId<sup>8+</sup> 414e41f4b71Sopenharmony_ci 415e41f4b71Sopenharmony_cigetUniqueDeviceId\(callback: AsyncCallback\<string\>\): void 416e41f4b71Sopenharmony_ci 417e41f4b71Sopenharmony_ciObtains the unique device ID of the primary SIM card of the device. This API uses an asynchronous callback to return the result. 418e41f4b71Sopenharmony_ci 419e41f4b71Sopenharmony_ciIf the device registers with a 3GPP network, an IMEI is returned. If the device registers with a 3GPP2 network, an MEID is returned. 420e41f4b71Sopenharmony_ci 421e41f4b71Sopenharmony_ci**System API**: This is a system API. 422e41f4b71Sopenharmony_ci 423e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 424e41f4b71Sopenharmony_ci 425e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 426e41f4b71Sopenharmony_ci 427e41f4b71Sopenharmony_ci**Parameters** 428e41f4b71Sopenharmony_ci 429e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 430e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ---------- | 431e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. | 432e41f4b71Sopenharmony_ci 433e41f4b71Sopenharmony_ci**Error codes** 434e41f4b71Sopenharmony_ci 435e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 436e41f4b71Sopenharmony_ci 437e41f4b71Sopenharmony_ci| ID| Error Message | 438e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 439e41f4b71Sopenharmony_ci| 201 | Permission denied. | 440e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 441e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 442e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 443e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 444e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 445e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 446e41f4b71Sopenharmony_ci 447e41f4b71Sopenharmony_ci**Example** 448e41f4b71Sopenharmony_ci 449e41f4b71Sopenharmony_ci```ts 450e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 451e41f4b71Sopenharmony_ci 452e41f4b71Sopenharmony_ciradio.getUniqueDeviceId((err: BusinessError, data: string) => { 453e41f4b71Sopenharmony_ci if (err) { 454e41f4b71Sopenharmony_ci console.error(`getUniqueDeviceId failed, callback: err->${JSON.stringify(err)}}`); 455e41f4b71Sopenharmony_ci return; 456e41f4b71Sopenharmony_ci } 457e41f4b71Sopenharmony_ci console.log(`getUniqueDeviceId success, callback: data->${JSON.stringify(data)}`); 458e41f4b71Sopenharmony_ci}); 459e41f4b71Sopenharmony_ci``` 460e41f4b71Sopenharmony_ci 461e41f4b71Sopenharmony_ci 462e41f4b71Sopenharmony_ci## radio.getUniqueDeviceId<sup>8+</sup> 463e41f4b71Sopenharmony_ci 464e41f4b71Sopenharmony_cigetUniqueDeviceId\(slotId: number, callback: AsyncCallback\<string\>\): void 465e41f4b71Sopenharmony_ci 466e41f4b71Sopenharmony_ciObtains the unique device ID of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 467e41f4b71Sopenharmony_ci 468e41f4b71Sopenharmony_ciIf the device registers with a 3GPP network, an IMEI is returned. If the device registers with a 3GPP2 network, an MEID is returned. 469e41f4b71Sopenharmony_ci 470e41f4b71Sopenharmony_ci**System API**: This is a system API. 471e41f4b71Sopenharmony_ci 472e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 473e41f4b71Sopenharmony_ci 474e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 475e41f4b71Sopenharmony_ci 476e41f4b71Sopenharmony_ci**Parameters** 477e41f4b71Sopenharmony_ci 478e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 479e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | -------------------------------------- | 480e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 481e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. | 482e41f4b71Sopenharmony_ci 483e41f4b71Sopenharmony_ci**Error codes** 484e41f4b71Sopenharmony_ci 485e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 486e41f4b71Sopenharmony_ci 487e41f4b71Sopenharmony_ci| ID| Error Message | 488e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 489e41f4b71Sopenharmony_ci| 201 | Permission denied. | 490e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 491e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 492e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 493e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 494e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 495e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 496e41f4b71Sopenharmony_ci 497e41f4b71Sopenharmony_ci**Example** 498e41f4b71Sopenharmony_ci 499e41f4b71Sopenharmony_ci```ts 500e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 501e41f4b71Sopenharmony_ci 502e41f4b71Sopenharmony_cilet slotId: number = 0; 503e41f4b71Sopenharmony_ciradio.getUniqueDeviceId(slotId, (err: BusinessError, data: string) => { 504e41f4b71Sopenharmony_ci if (err) { 505e41f4b71Sopenharmony_ci console.error(`getUniqueDeviceId failed, callback: err->${JSON.stringify(err)}`); 506e41f4b71Sopenharmony_ci return; 507e41f4b71Sopenharmony_ci } 508e41f4b71Sopenharmony_ci console.log(`getUniqueDeviceId success, callback: data->${JSON.stringify(data)}`); 509e41f4b71Sopenharmony_ci}); 510e41f4b71Sopenharmony_ci``` 511e41f4b71Sopenharmony_ci 512e41f4b71Sopenharmony_ci 513e41f4b71Sopenharmony_ci## radio.getUniqueDeviceId<sup>8+</sup> 514e41f4b71Sopenharmony_ci 515e41f4b71Sopenharmony_cigetUniqueDeviceId\(slotId?: number\): Promise\<string\> 516e41f4b71Sopenharmony_ci 517e41f4b71Sopenharmony_ciObtains the unique device ID of the SIM card in the specified slot. This API uses a promise to return the result. 518e41f4b71Sopenharmony_ci 519e41f4b71Sopenharmony_ciIf the device registers with a 3GPP network, an IMEI is returned. If the device registers with a 3GPP2 network, an MEID is returned. 520e41f4b71Sopenharmony_ci 521e41f4b71Sopenharmony_ci**System API**: This is a system API. 522e41f4b71Sopenharmony_ci 523e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 524e41f4b71Sopenharmony_ci 525e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 526e41f4b71Sopenharmony_ci 527e41f4b71Sopenharmony_ci**Parameters** 528e41f4b71Sopenharmony_ci 529e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 530e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 531e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 532e41f4b71Sopenharmony_ci 533e41f4b71Sopenharmony_ci**Return value** 534e41f4b71Sopenharmony_ci 535e41f4b71Sopenharmony_ci| Type | Description | 536e41f4b71Sopenharmony_ci| ----------------- | --------------------------------------------- | 537e41f4b71Sopenharmony_ci| Promise\<string\> | Promise used to return the result.| 538e41f4b71Sopenharmony_ci 539e41f4b71Sopenharmony_ci**Error codes** 540e41f4b71Sopenharmony_ci 541e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 542e41f4b71Sopenharmony_ci 543e41f4b71Sopenharmony_ci| ID| Error Message | 544e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 545e41f4b71Sopenharmony_ci| 201 | Permission denied. | 546e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 547e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 548e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 549e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 550e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 551e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 552e41f4b71Sopenharmony_ci 553e41f4b71Sopenharmony_ci**Example** 554e41f4b71Sopenharmony_ci 555e41f4b71Sopenharmony_ci```ts 556e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 557e41f4b71Sopenharmony_ci 558e41f4b71Sopenharmony_cilet slotId: number = 0; 559e41f4b71Sopenharmony_ciradio.getUniqueDeviceId(slotId).then((data: string) => { 560e41f4b71Sopenharmony_ci console.log(`getUniqueDeviceId success, promise: data->${JSON.stringify(data)}`); 561e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 562e41f4b71Sopenharmony_ci console.error(`getUniqueDeviceId failed, promise: err->${JSON.stringify(err)}`); 563e41f4b71Sopenharmony_ci}); 564e41f4b71Sopenharmony_ci``` 565e41f4b71Sopenharmony_ci 566e41f4b71Sopenharmony_ci## radio.sendUpdateCellLocationRequest<sup>8+</sup> 567e41f4b71Sopenharmony_ci 568e41f4b71Sopenharmony_cisendUpdateCellLocationRequest\(callback: AsyncCallback\<void\>\): void 569e41f4b71Sopenharmony_ci 570e41f4b71Sopenharmony_ciSends a cell location update request. This API uses an asynchronous callback to return the result. 571e41f4b71Sopenharmony_ci 572e41f4b71Sopenharmony_ci**System API**: This is a system API. 573e41f4b71Sopenharmony_ci 574e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 575e41f4b71Sopenharmony_ci 576e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 577e41f4b71Sopenharmony_ci 578e41f4b71Sopenharmony_ci**Parameters** 579e41f4b71Sopenharmony_ci 580e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 581e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | ---------- | 582e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 583e41f4b71Sopenharmony_ci 584e41f4b71Sopenharmony_ci**Error codes** 585e41f4b71Sopenharmony_ci 586e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 587e41f4b71Sopenharmony_ci 588e41f4b71Sopenharmony_ci| ID| Error Message | 589e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 590e41f4b71Sopenharmony_ci| 201 | Permission denied. | 591e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 592e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 593e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 594e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 595e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 596e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 597e41f4b71Sopenharmony_ci 598e41f4b71Sopenharmony_ci**Example** 599e41f4b71Sopenharmony_ci 600e41f4b71Sopenharmony_ci```ts 601e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 602e41f4b71Sopenharmony_ci 603e41f4b71Sopenharmony_ciradio.sendUpdateCellLocationRequest((err: BusinessError) => { 604e41f4b71Sopenharmony_ci if (err) { 605e41f4b71Sopenharmony_ci console.error(`sendUpdateCellLocationRequest failed, callback: err->${JSON.stringify(err)}`); 606e41f4b71Sopenharmony_ci return; 607e41f4b71Sopenharmony_ci } 608e41f4b71Sopenharmony_ci console.log(`sendUpdateCellLocationRequest success.`); 609e41f4b71Sopenharmony_ci}); 610e41f4b71Sopenharmony_ci``` 611e41f4b71Sopenharmony_ci 612e41f4b71Sopenharmony_ci## radio.sendUpdateCellLocationRequest<sup>8+</sup> 613e41f4b71Sopenharmony_ci 614e41f4b71Sopenharmony_cisendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback\<void\>\): void 615e41f4b71Sopenharmony_ci 616e41f4b71Sopenharmony_ciSends a cell location update request for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 617e41f4b71Sopenharmony_ci 618e41f4b71Sopenharmony_ci**System API**: This is a system API. 619e41f4b71Sopenharmony_ci 620e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 621e41f4b71Sopenharmony_ci 622e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 623e41f4b71Sopenharmony_ci 624e41f4b71Sopenharmony_ci**Parameters** 625e41f4b71Sopenharmony_ci 626e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 627e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | ---------- | 628e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 629e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 630e41f4b71Sopenharmony_ci 631e41f4b71Sopenharmony_ci**Error codes** 632e41f4b71Sopenharmony_ci 633e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 634e41f4b71Sopenharmony_ci 635e41f4b71Sopenharmony_ci| ID| Error Message | 636e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 637e41f4b71Sopenharmony_ci| 201 | Permission denied. | 638e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 639e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 640e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 641e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 642e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 643e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 644e41f4b71Sopenharmony_ci 645e41f4b71Sopenharmony_ci**Example** 646e41f4b71Sopenharmony_ci 647e41f4b71Sopenharmony_ci```ts 648e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 649e41f4b71Sopenharmony_ci 650e41f4b71Sopenharmony_cilet slotId: number = 0; 651e41f4b71Sopenharmony_ciradio.sendUpdateCellLocationRequest(slotId, (err: BusinessError) => { 652e41f4b71Sopenharmony_ci if (err) { 653e41f4b71Sopenharmony_ci console.error(`sendUpdateCellLocationRequest failed, callback: err->${JSON.stringify(err)}`); 654e41f4b71Sopenharmony_ci return; 655e41f4b71Sopenharmony_ci } 656e41f4b71Sopenharmony_ci console.log(`sendUpdateCellLocationRequest success.`); 657e41f4b71Sopenharmony_ci}); 658e41f4b71Sopenharmony_ci``` 659e41f4b71Sopenharmony_ci 660e41f4b71Sopenharmony_ci## radio.sendUpdateCellLocationRequest<sup>8+</sup> 661e41f4b71Sopenharmony_ci 662e41f4b71Sopenharmony_cisendUpdateCellLocationRequest\(slotId?: number\): Promise\<void\> 663e41f4b71Sopenharmony_ci 664e41f4b71Sopenharmony_ciSends a cell location update request for the SIM card in the specified slot. This API uses a promise to return the result. 665e41f4b71Sopenharmony_ci 666e41f4b71Sopenharmony_ci**System API**: This is a system API. 667e41f4b71Sopenharmony_ci 668e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 669e41f4b71Sopenharmony_ci 670e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 671e41f4b71Sopenharmony_ci 672e41f4b71Sopenharmony_ci**Parameters** 673e41f4b71Sopenharmony_ci 674e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 675e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 676e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 677e41f4b71Sopenharmony_ci 678e41f4b71Sopenharmony_ci**Return value** 679e41f4b71Sopenharmony_ci 680e41f4b71Sopenharmony_ci| Type | Description | 681e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 682e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 683e41f4b71Sopenharmony_ci 684e41f4b71Sopenharmony_ci**Error codes** 685e41f4b71Sopenharmony_ci 686e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 687e41f4b71Sopenharmony_ci 688e41f4b71Sopenharmony_ci| ID| Error Message | 689e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 690e41f4b71Sopenharmony_ci| 201 | Permission denied. | 691e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 692e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 693e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 694e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 695e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 696e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 697e41f4b71Sopenharmony_ci 698e41f4b71Sopenharmony_ci**Example** 699e41f4b71Sopenharmony_ci 700e41f4b71Sopenharmony_ci```ts 701e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 702e41f4b71Sopenharmony_ci 703e41f4b71Sopenharmony_cilet slotId: number = 0; 704e41f4b71Sopenharmony_ciradio.sendUpdateCellLocationRequest(slotId).then(() => { 705e41f4b71Sopenharmony_ci console.log(`sendUpdateCellLocationRequest success.`); 706e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 707e41f4b71Sopenharmony_ci console.error(`sendUpdateCellLocationRequest failed, promise: err->${JSON.stringify(err)}`); 708e41f4b71Sopenharmony_ci}); 709e41f4b71Sopenharmony_ci``` 710e41f4b71Sopenharmony_ci 711e41f4b71Sopenharmony_ci## radio.getCellInformation<sup>8+</sup> 712e41f4b71Sopenharmony_ci 713e41f4b71Sopenharmony_cigetCellInformation\(callback: AsyncCallback\<Array\<CellInformation\>\>\): void 714e41f4b71Sopenharmony_ci 715e41f4b71Sopenharmony_ciObtains cell information. This API uses an asynchronous callback to return the result. 716e41f4b71Sopenharmony_ci 717e41f4b71Sopenharmony_ci**System API**: This is a system API. 718e41f4b71Sopenharmony_ci 719e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 720e41f4b71Sopenharmony_ci 721e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 722e41f4b71Sopenharmony_ci 723e41f4b71Sopenharmony_ci**Parameters** 724e41f4b71Sopenharmony_ci 725e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 726e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | ---- | ------------------------ | 727e41f4b71Sopenharmony_ci| callback | AsyncCallback\<Array<[CellInformation](#cellinformation8)\>\> | Yes | Callback used to return the result. | 728e41f4b71Sopenharmony_ci 729e41f4b71Sopenharmony_ci**Error codes** 730e41f4b71Sopenharmony_ci 731e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 732e41f4b71Sopenharmony_ci 733e41f4b71Sopenharmony_ci| ID| Error Message | 734e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 735e41f4b71Sopenharmony_ci| 201 | Permission denied. | 736e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 737e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 738e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 739e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 740e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 741e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 742e41f4b71Sopenharmony_ci 743e41f4b71Sopenharmony_ci**Example** 744e41f4b71Sopenharmony_ci 745e41f4b71Sopenharmony_ci```ts 746e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 747e41f4b71Sopenharmony_ci 748e41f4b71Sopenharmony_ciradio.getCellInformation((err: BusinessError, data: Array<radio.CellInformation>) => { 749e41f4b71Sopenharmony_ci if (err) { 750e41f4b71Sopenharmony_ci console.error(`getCellInformation failed, callback: err->${JSON.stringify(err)}`); 751e41f4b71Sopenharmony_ci return; 752e41f4b71Sopenharmony_ci } 753e41f4b71Sopenharmony_ci console.log(`getCellInformation success, callback: data->${JSON.stringify(data)}`); 754e41f4b71Sopenharmony_ci}); 755e41f4b71Sopenharmony_ci``` 756e41f4b71Sopenharmony_ci 757e41f4b71Sopenharmony_ci 758e41f4b71Sopenharmony_ci## radio.getCellInformation<sup>8+</sup> 759e41f4b71Sopenharmony_ci 760e41f4b71Sopenharmony_cigetCellInformation\(slotId: number, callback: AsyncCallback\<Array\<CellInformation\>\>\): void 761e41f4b71Sopenharmony_ci 762e41f4b71Sopenharmony_ciObtains cell information of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 763e41f4b71Sopenharmony_ci 764e41f4b71Sopenharmony_ci**System API**: This is a system API. 765e41f4b71Sopenharmony_ci 766e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 767e41f4b71Sopenharmony_ci 768e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 769e41f4b71Sopenharmony_ci 770e41f4b71Sopenharmony_ci**Parameters** 771e41f4b71Sopenharmony_ci 772e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 773e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | 774e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 775e41f4b71Sopenharmony_ci| callback | AsyncCallback\<Array<[CellInformation](#cellinformation8)\>\> | Yes | Callback used to return the result. | 776e41f4b71Sopenharmony_ci 777e41f4b71Sopenharmony_ci**Error codes** 778e41f4b71Sopenharmony_ci 779e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 780e41f4b71Sopenharmony_ci 781e41f4b71Sopenharmony_ci| ID| Error Message | 782e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 783e41f4b71Sopenharmony_ci| 201 | Permission denied. | 784e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 785e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 786e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 787e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 788e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 789e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 790e41f4b71Sopenharmony_ci 791e41f4b71Sopenharmony_ci**Example** 792e41f4b71Sopenharmony_ci 793e41f4b71Sopenharmony_ci```ts 794e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 795e41f4b71Sopenharmony_ci 796e41f4b71Sopenharmony_cilet slotId: number = 0; 797e41f4b71Sopenharmony_ciradio.getCellInformation(slotId, (err: BusinessError, data: Array<radio.CellInformation>) => { 798e41f4b71Sopenharmony_ci if (err) { 799e41f4b71Sopenharmony_ci console.error(`getCellInformation failed, callback: err->${JSON.stringify(err)}`); 800e41f4b71Sopenharmony_ci return; 801e41f4b71Sopenharmony_ci } 802e41f4b71Sopenharmony_ci console.log(`getCellInformation success, callback: data->${JSON.stringify(data)}`); 803e41f4b71Sopenharmony_ci}); 804e41f4b71Sopenharmony_ci``` 805e41f4b71Sopenharmony_ci 806e41f4b71Sopenharmony_ci 807e41f4b71Sopenharmony_ci## radio.getCellInformation<sup>8+</sup> 808e41f4b71Sopenharmony_ci 809e41f4b71Sopenharmony_cigetCellInformation\(slotId?: number\): Promise\<Array\<CellInformation\>\> 810e41f4b71Sopenharmony_ci 811e41f4b71Sopenharmony_ciObtains cell information of the SIM card in the specified slot. This API uses a promise to return the result. 812e41f4b71Sopenharmony_ci 813e41f4b71Sopenharmony_ci**System API**: This is a system API. 814e41f4b71Sopenharmony_ci 815e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION 816e41f4b71Sopenharmony_ci 817e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 818e41f4b71Sopenharmony_ci 819e41f4b71Sopenharmony_ci**Parameters** 820e41f4b71Sopenharmony_ci 821e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 822e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 823e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 824e41f4b71Sopenharmony_ci 825e41f4b71Sopenharmony_ci**Return value** 826e41f4b71Sopenharmony_ci 827e41f4b71Sopenharmony_ci| Type | Description | 828e41f4b71Sopenharmony_ci| ------------------------------------------------------- | ----------------------- | 829e41f4b71Sopenharmony_ci| Promise\<Array<[CellInformation](#cellinformation8)\>\> | Promise used to return the result.| 830e41f4b71Sopenharmony_ci 831e41f4b71Sopenharmony_ci**Error codes** 832e41f4b71Sopenharmony_ci 833e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 834e41f4b71Sopenharmony_ci 835e41f4b71Sopenharmony_ci| ID| Error Message | 836e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 837e41f4b71Sopenharmony_ci| 201 | Permission denied. | 838e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 839e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 840e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 841e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 842e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 843e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 844e41f4b71Sopenharmony_ci 845e41f4b71Sopenharmony_ci**Example** 846e41f4b71Sopenharmony_ci 847e41f4b71Sopenharmony_ci```ts 848e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 849e41f4b71Sopenharmony_ci 850e41f4b71Sopenharmony_cilet slotId: number = 0; 851e41f4b71Sopenharmony_ciradio.getCellInformation(slotId).then((data: Array<radio.CellInformation>) => { 852e41f4b71Sopenharmony_ci console.log(`getCellInformation success, promise: data->${JSON.stringify(data)}`); 853e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 854e41f4b71Sopenharmony_ci console.error(`getCellInformation failed, promise: err->${JSON.stringify(err)}`); 855e41f4b71Sopenharmony_ci}); 856e41f4b71Sopenharmony_ci``` 857e41f4b71Sopenharmony_ci 858e41f4b71Sopenharmony_ci## radio.setNetworkSelectionMode 859e41f4b71Sopenharmony_ci 860e41f4b71Sopenharmony_cisetNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCallback\<void\>\): void 861e41f4b71Sopenharmony_ci 862e41f4b71Sopenharmony_ciSets the network selection mode. This API uses an asynchronous callback to return the result. 863e41f4b71Sopenharmony_ci 864e41f4b71Sopenharmony_ci**System API**: This is a system API. 865e41f4b71Sopenharmony_ci 866e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 867e41f4b71Sopenharmony_ci 868e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 869e41f4b71Sopenharmony_ci 870e41f4b71Sopenharmony_ci**Parameters** 871e41f4b71Sopenharmony_ci 872e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 873e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------------------- | ---- | ------------------ | 874e41f4b71Sopenharmony_ci| options | [NetworkSelectionModeOptions](#networkselectionmodeoptions) | Yes | Network selection mode.| 875e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 876e41f4b71Sopenharmony_ci 877e41f4b71Sopenharmony_ci**Error codes** 878e41f4b71Sopenharmony_ci 879e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 880e41f4b71Sopenharmony_ci 881e41f4b71Sopenharmony_ci| ID| Error Message | 882e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 883e41f4b71Sopenharmony_ci| 201 | Permission denied. | 884e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 885e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 886e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 887e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 888e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 889e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 890e41f4b71Sopenharmony_ci 891e41f4b71Sopenharmony_ci**Example** 892e41f4b71Sopenharmony_ci 893e41f4b71Sopenharmony_ci```ts 894e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 895e41f4b71Sopenharmony_ci 896e41f4b71Sopenharmony_cilet networkInformation: radio.NetworkInformation = { 897e41f4b71Sopenharmony_ci operatorName: "China Mobile", 898e41f4b71Sopenharmony_ci operatorNumeric: "898600", 899e41f4b71Sopenharmony_ci state: radio.NetworkInformationState.NETWORK_AVAILABLE, 900e41f4b71Sopenharmony_ci radioTech: "CS" 901e41f4b71Sopenharmony_ci} 902e41f4b71Sopenharmony_cilet networkSelectionModeOptions: radio.NetworkSelectionModeOptions = { 903e41f4b71Sopenharmony_ci slotId: 0, 904e41f4b71Sopenharmony_ci selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC, 905e41f4b71Sopenharmony_ci networkInformation: networkInformation, 906e41f4b71Sopenharmony_ci resumeSelection: true 907e41f4b71Sopenharmony_ci} 908e41f4b71Sopenharmony_ciradio.setNetworkSelectionMode(networkSelectionModeOptions, (err: BusinessError) => { 909e41f4b71Sopenharmony_ci if (err) { 910e41f4b71Sopenharmony_ci console.error(`setNetworkSelectionMode failed, callback: err->${JSON.stringify(err)}`); 911e41f4b71Sopenharmony_ci return; 912e41f4b71Sopenharmony_ci } 913e41f4b71Sopenharmony_ci console.log(`setNetworkSelectionMode success.`); 914e41f4b71Sopenharmony_ci}); 915e41f4b71Sopenharmony_ci``` 916e41f4b71Sopenharmony_ci 917e41f4b71Sopenharmony_ci## radio.setNetworkSelectionMode 918e41f4b71Sopenharmony_ci 919e41f4b71Sopenharmony_cisetNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise\<void\> 920e41f4b71Sopenharmony_ci 921e41f4b71Sopenharmony_ciSets the network selection mode. This API uses a promise to return the result. 922e41f4b71Sopenharmony_ci 923e41f4b71Sopenharmony_ci**System API**: This is a system API. 924e41f4b71Sopenharmony_ci 925e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 926e41f4b71Sopenharmony_ci 927e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 928e41f4b71Sopenharmony_ci 929e41f4b71Sopenharmony_ci**Parameters** 930e41f4b71Sopenharmony_ci 931e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 932e41f4b71Sopenharmony_ci| ------- | ----------------------------------------------------------- | ---- | ------------------ | 933e41f4b71Sopenharmony_ci| options | [NetworkSelectionModeOptions](#networkselectionmodeoptions) | Yes | Network selection mode.| 934e41f4b71Sopenharmony_ci 935e41f4b71Sopenharmony_ci**Return value** 936e41f4b71Sopenharmony_ci 937e41f4b71Sopenharmony_ci| Type | Description | 938e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 939e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 940e41f4b71Sopenharmony_ci 941e41f4b71Sopenharmony_ci**Error codes** 942e41f4b71Sopenharmony_ci 943e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 944e41f4b71Sopenharmony_ci 945e41f4b71Sopenharmony_ci| ID| Error Message | 946e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 947e41f4b71Sopenharmony_ci| 201 | Permission denied. | 948e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 949e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 950e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 951e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 952e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 953e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 954e41f4b71Sopenharmony_ci 955e41f4b71Sopenharmony_ci**Example** 956e41f4b71Sopenharmony_ci 957e41f4b71Sopenharmony_ci```ts 958e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 959e41f4b71Sopenharmony_ci 960e41f4b71Sopenharmony_cilet networkInformation: radio.NetworkInformation = { 961e41f4b71Sopenharmony_ci operatorName: "China Mobile", 962e41f4b71Sopenharmony_ci operatorNumeric: "898600", 963e41f4b71Sopenharmony_ci state: radio.NetworkInformationState.NETWORK_AVAILABLE, 964e41f4b71Sopenharmony_ci radioTech: "CS" 965e41f4b71Sopenharmony_ci} 966e41f4b71Sopenharmony_cilet networkSelectionModeOptions: radio.NetworkSelectionModeOptions = { 967e41f4b71Sopenharmony_ci slotId: 0, 968e41f4b71Sopenharmony_ci selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC, 969e41f4b71Sopenharmony_ci networkInformation: networkInformation, 970e41f4b71Sopenharmony_ci resumeSelection: true 971e41f4b71Sopenharmony_ci} 972e41f4b71Sopenharmony_ciradio.setNetworkSelectionMode(networkSelectionModeOptions).then(() => { 973e41f4b71Sopenharmony_ci console.log(`setNetworkSelectionMode success.`); 974e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 975e41f4b71Sopenharmony_ci console.error(`setNetworkSelectionMode failed, promise: err->${JSON.stringify(err)}`); 976e41f4b71Sopenharmony_ci}); 977e41f4b71Sopenharmony_ci``` 978e41f4b71Sopenharmony_ci 979e41f4b71Sopenharmony_ci## radio.getNetworkSearchInformation 980e41f4b71Sopenharmony_ci 981e41f4b71Sopenharmony_cigetNetworkSearchInformation\(slotId: number, callback: AsyncCallback\<NetworkSearchResult\>\): void 982e41f4b71Sopenharmony_ci 983e41f4b71Sopenharmony_ciObtains network search information of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 984e41f4b71Sopenharmony_ci 985e41f4b71Sopenharmony_ci**System API**: This is a system API. 986e41f4b71Sopenharmony_ci 987e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 988e41f4b71Sopenharmony_ci 989e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 990e41f4b71Sopenharmony_ci 991e41f4b71Sopenharmony_ci**Parameters** 992e41f4b71Sopenharmony_ci 993e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 994e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | 995e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 996e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[NetworkSearchResult](#networksearchresult)\> | Yes | Callback used to return the result. | 997e41f4b71Sopenharmony_ci 998e41f4b71Sopenharmony_ci**Error codes** 999e41f4b71Sopenharmony_ci 1000e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1001e41f4b71Sopenharmony_ci 1002e41f4b71Sopenharmony_ci| ID| Error Message | 1003e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1004e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1005e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1006e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1007e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1008e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1009e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1010e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1011e41f4b71Sopenharmony_ci 1012e41f4b71Sopenharmony_ci**Example** 1013e41f4b71Sopenharmony_ci 1014e41f4b71Sopenharmony_ci```ts 1015e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1016e41f4b71Sopenharmony_ci 1017e41f4b71Sopenharmony_ciradio.getNetworkSearchInformation(0, (err: BusinessError, data: radio.NetworkSearchResult) => { 1018e41f4b71Sopenharmony_ci if (err) { 1019e41f4b71Sopenharmony_ci console.error(`getNetworkSearchInformation failed, callback: err->${JSON.stringify(err)}`); 1020e41f4b71Sopenharmony_ci return; 1021e41f4b71Sopenharmony_ci } 1022e41f4b71Sopenharmony_ci console.log(`getNetworkSearchInformation success, callback: data->${JSON.stringify(data)}`); 1023e41f4b71Sopenharmony_ci}); 1024e41f4b71Sopenharmony_ci``` 1025e41f4b71Sopenharmony_ci 1026e41f4b71Sopenharmony_ci## radio.getNetworkSearchInformation 1027e41f4b71Sopenharmony_ci 1028e41f4b71Sopenharmony_cigetNetworkSearchInformation\(slotId: number\): Promise\<NetworkSearchResult\> 1029e41f4b71Sopenharmony_ci 1030e41f4b71Sopenharmony_ciObtains network search information of the SIM card in the specified slot. This API uses a promise to return the result. 1031e41f4b71Sopenharmony_ci 1032e41f4b71Sopenharmony_ci**System API**: This is a system API. 1033e41f4b71Sopenharmony_ci 1034e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1035e41f4b71Sopenharmony_ci 1036e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1037e41f4b71Sopenharmony_ci 1038e41f4b71Sopenharmony_ci**Parameters** 1039e41f4b71Sopenharmony_ci 1040e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1041e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1042e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1043e41f4b71Sopenharmony_ci 1044e41f4b71Sopenharmony_ci**Return value** 1045e41f4b71Sopenharmony_ci 1046e41f4b71Sopenharmony_ci| Type | Description | 1047e41f4b71Sopenharmony_ci| ------------------------------------------------------ | ----------------------- | 1048e41f4b71Sopenharmony_ci| Promise\<[NetworkSearchResult](#networksearchresult)\> | Promise used to return the result.| 1049e41f4b71Sopenharmony_ci 1050e41f4b71Sopenharmony_ci**Error codes** 1051e41f4b71Sopenharmony_ci 1052e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1053e41f4b71Sopenharmony_ci 1054e41f4b71Sopenharmony_ci| ID| Error Message | 1055e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1056e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1057e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1058e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1059e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1060e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1061e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1062e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1063e41f4b71Sopenharmony_ci 1064e41f4b71Sopenharmony_ci**Example** 1065e41f4b71Sopenharmony_ci 1066e41f4b71Sopenharmony_ci```ts 1067e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1068e41f4b71Sopenharmony_ci 1069e41f4b71Sopenharmony_ciradio.getNetworkSearchInformation(0).then((data: radio.NetworkSearchResult) => { 1070e41f4b71Sopenharmony_ci console.log(`getNetworkSearchInformation success, promise: data->${JSON.stringify(data)}`); 1071e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1072e41f4b71Sopenharmony_ci console.error(`getNetworkSearchInformation failed, promise: err->${JSON.stringify(err)}`); 1073e41f4b71Sopenharmony_ci}); 1074e41f4b71Sopenharmony_ci``` 1075e41f4b71Sopenharmony_ci 1076e41f4b71Sopenharmony_ci## radio.getNrOptionMode<sup>(deprecated)</sup> 1077e41f4b71Sopenharmony_ci 1078e41f4b71Sopenharmony_cigetNrOptionMode\(callback: AsyncCallback\<NrOptionMode\>\): void 1079e41f4b71Sopenharmony_ci 1080e41f4b71Sopenharmony_ciObtains the NR option mode of the SIM card. This API uses an asynchronous callback to return the result. 1081e41f4b71Sopenharmony_ci 1082e41f4b71Sopenharmony_ci> **NOTE** 1083e41f4b71Sopenharmony_ci> 1084e41f4b71Sopenharmony_ci> This API is supported since API version 8 and deprecated since API version 10. You are advised to use [getNROptionMode](#radiogetnroptionmode10). 1085e41f4b71Sopenharmony_ci 1086e41f4b71Sopenharmony_ci**System API**: This is a system API. 1087e41f4b71Sopenharmony_ci 1088e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1089e41f4b71Sopenharmony_ci 1090e41f4b71Sopenharmony_ci**Parameters** 1091e41f4b71Sopenharmony_ci 1092e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1093e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------- | ---- | ---------- | 1094e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[NrOptionMode](#nroptionmodedeprecated)\> | Yes | Callback used to return the result. | 1095e41f4b71Sopenharmony_ci 1096e41f4b71Sopenharmony_ci**Error codes** 1097e41f4b71Sopenharmony_ci 1098e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1099e41f4b71Sopenharmony_ci 1100e41f4b71Sopenharmony_ci| ID| Error Message | 1101e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1102e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1103e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1104e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1105e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1106e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1107e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1108e41f4b71Sopenharmony_ci 1109e41f4b71Sopenharmony_ci**Example** 1110e41f4b71Sopenharmony_ci 1111e41f4b71Sopenharmony_ci```ts 1112e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1113e41f4b71Sopenharmony_ci 1114e41f4b71Sopenharmony_ciradio.getNrOptionMode((err: BusinessError, data: radio.NrOptionMode) => { 1115e41f4b71Sopenharmony_ci if (err) { 1116e41f4b71Sopenharmony_ci console.error(`getNrOptionMode failed, callback: err->${JSON.stringify(err)}`); 1117e41f4b71Sopenharmony_ci return; 1118e41f4b71Sopenharmony_ci } 1119e41f4b71Sopenharmony_ci console.log(`getNrOptionMode success, callback: data->${JSON.stringify(data)}`); 1120e41f4b71Sopenharmony_ci}); 1121e41f4b71Sopenharmony_ci``` 1122e41f4b71Sopenharmony_ci 1123e41f4b71Sopenharmony_ci 1124e41f4b71Sopenharmony_ci## radio.getNrOptionMode<sup>(deprecated)</sup> 1125e41f4b71Sopenharmony_ci 1126e41f4b71Sopenharmony_cigetNrOptionMode\(slotId: number, callback: AsyncCallback\<NrOptionMode\>\): void 1127e41f4b71Sopenharmony_ci 1128e41f4b71Sopenharmony_ciObtains the NR option mode of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1129e41f4b71Sopenharmony_ci 1130e41f4b71Sopenharmony_ci> **NOTE** 1131e41f4b71Sopenharmony_ci> 1132e41f4b71Sopenharmony_ci> This API is supported since API version 8 and deprecated since API version 10. You are advised to use [getNROptionMode](#radiogetnroptionmode10). 1133e41f4b71Sopenharmony_ci 1134e41f4b71Sopenharmony_ci**System API**: This is a system API. 1135e41f4b71Sopenharmony_ci 1136e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1137e41f4b71Sopenharmony_ci 1138e41f4b71Sopenharmony_ci**Parameters** 1139e41f4b71Sopenharmony_ci 1140e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1141e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------- | ---- | ------------------------------------- | 1142e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1143e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[NrOptionMode](#nroptionmodedeprecated)\> | Yes | Callback used to return the result. | 1144e41f4b71Sopenharmony_ci 1145e41f4b71Sopenharmony_ci**Error codes** 1146e41f4b71Sopenharmony_ci 1147e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1148e41f4b71Sopenharmony_ci 1149e41f4b71Sopenharmony_ci| ID| Error Message | 1150e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1151e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1152e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1153e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1154e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1155e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1156e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1157e41f4b71Sopenharmony_ci 1158e41f4b71Sopenharmony_ci**Example** 1159e41f4b71Sopenharmony_ci 1160e41f4b71Sopenharmony_ci```ts 1161e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1162e41f4b71Sopenharmony_ci 1163e41f4b71Sopenharmony_cilet slotId: number = 0; 1164e41f4b71Sopenharmony_ciradio.getNrOptionMode(slotId, (err: BusinessError, data: radio.NrOptionMode) => { 1165e41f4b71Sopenharmony_ci if (err) { 1166e41f4b71Sopenharmony_ci console.error(`getNrOptionModecallback failed, callback: err->${JSON.stringify(err)}`); 1167e41f4b71Sopenharmony_ci return; 1168e41f4b71Sopenharmony_ci } 1169e41f4b71Sopenharmony_ci console.log(`getNrOptionModecallback success, callback: data->${JSON.stringify(data)}`); 1170e41f4b71Sopenharmony_ci}); 1171e41f4b71Sopenharmony_ci``` 1172e41f4b71Sopenharmony_ci 1173e41f4b71Sopenharmony_ci 1174e41f4b71Sopenharmony_ci## radio.getNrOptionMode<sup>(deprecated)</sup> 1175e41f4b71Sopenharmony_ci 1176e41f4b71Sopenharmony_cigetNrOptionMode\(slotId?: number\): Promise\<NrOptionMode\> 1177e41f4b71Sopenharmony_ci 1178e41f4b71Sopenharmony_ciObtains the NR option mode of the SIM card in the specified slot. This API uses a promise to return the result. 1179e41f4b71Sopenharmony_ci 1180e41f4b71Sopenharmony_ci> **NOTE** 1181e41f4b71Sopenharmony_ci> 1182e41f4b71Sopenharmony_ci> This API is supported since API version 8 and deprecated since API version 10. You are advised to use [getNROptionMode](#radiogetnroptionmode10-1). 1183e41f4b71Sopenharmony_ci 1184e41f4b71Sopenharmony_ci**System API**: This is a system API. 1185e41f4b71Sopenharmony_ci 1186e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1187e41f4b71Sopenharmony_ci 1188e41f4b71Sopenharmony_ci**Parameters** 1189e41f4b71Sopenharmony_ci 1190e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1191e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1192e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1193e41f4b71Sopenharmony_ci 1194e41f4b71Sopenharmony_ci**Return value** 1195e41f4b71Sopenharmony_ci 1196e41f4b71Sopenharmony_ci| Type | Description | 1197e41f4b71Sopenharmony_ci| -------------------------------------------------- | ----------------------- | 1198e41f4b71Sopenharmony_ci| Promise\<[NrOptionMode](#nroptionmodedeprecated)\> | Promise used to return the result. | 1199e41f4b71Sopenharmony_ci 1200e41f4b71Sopenharmony_ci**Error codes** 1201e41f4b71Sopenharmony_ci 1202e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1203e41f4b71Sopenharmony_ci 1204e41f4b71Sopenharmony_ci| ID| Error Message | 1205e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1206e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1207e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1208e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1209e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1210e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1211e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1212e41f4b71Sopenharmony_ci 1213e41f4b71Sopenharmony_ci**Example** 1214e41f4b71Sopenharmony_ci 1215e41f4b71Sopenharmony_ci```ts 1216e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1217e41f4b71Sopenharmony_ci 1218e41f4b71Sopenharmony_cilet slotId: number = 0; 1219e41f4b71Sopenharmony_ciradio.getNrOptionMode(slotId).then((data: radio.NrOptionMode) => { 1220e41f4b71Sopenharmony_ci console.log(`getNrOptionMode success, promise: data->${JSON.stringify(data)}`); 1221e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1222e41f4b71Sopenharmony_ci console.error(`getNrOptionMode failed, promise: err->${JSON.stringify(err)}`); 1223e41f4b71Sopenharmony_ci}); 1224e41f4b71Sopenharmony_ci``` 1225e41f4b71Sopenharmony_ci 1226e41f4b71Sopenharmony_ci## radio.turnOnRadio<sup>7+</sup> 1227e41f4b71Sopenharmony_ci 1228e41f4b71Sopenharmony_citurnOnRadio\(callback: AsyncCallback\<void\>\): void 1229e41f4b71Sopenharmony_ci 1230e41f4b71Sopenharmony_ciTurns on the radio function. This API uses an asynchronous callback to return the result. 1231e41f4b71Sopenharmony_ci 1232e41f4b71Sopenharmony_ci**System API**: This is a system API. 1233e41f4b71Sopenharmony_ci 1234e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1235e41f4b71Sopenharmony_ci 1236e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1237e41f4b71Sopenharmony_ci 1238e41f4b71Sopenharmony_ci**Parameters** 1239e41f4b71Sopenharmony_ci 1240e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1241e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | ---------- | 1242e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 1243e41f4b71Sopenharmony_ci 1244e41f4b71Sopenharmony_ci**Error codes** 1245e41f4b71Sopenharmony_ci 1246e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1247e41f4b71Sopenharmony_ci 1248e41f4b71Sopenharmony_ci| ID| Error Message | 1249e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1250e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1251e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1252e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1253e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1254e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1255e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1256e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1257e41f4b71Sopenharmony_ci 1258e41f4b71Sopenharmony_ci**Example** 1259e41f4b71Sopenharmony_ci 1260e41f4b71Sopenharmony_ci```ts 1261e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1262e41f4b71Sopenharmony_ci 1263e41f4b71Sopenharmony_ciradio.turnOnRadio((err: BusinessError) => { 1264e41f4b71Sopenharmony_ci if (err) { 1265e41f4b71Sopenharmony_ci console.error(`turnOnRadio failed, callback: err->${JSON.stringify(err)}`); 1266e41f4b71Sopenharmony_ci return; 1267e41f4b71Sopenharmony_ci } 1268e41f4b71Sopenharmony_ci console.log(`turnOnRadio success.`); 1269e41f4b71Sopenharmony_ci}); 1270e41f4b71Sopenharmony_ci``` 1271e41f4b71Sopenharmony_ci 1272e41f4b71Sopenharmony_ci 1273e41f4b71Sopenharmony_ci## radio.turnOnRadio<sup>7+</sup> 1274e41f4b71Sopenharmony_ci 1275e41f4b71Sopenharmony_citurnOnRadio\(slotId: number, callback: AsyncCallback\<void\>\): void 1276e41f4b71Sopenharmony_ci 1277e41f4b71Sopenharmony_ciEnables the radio service for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1278e41f4b71Sopenharmony_ci 1279e41f4b71Sopenharmony_ci**System API**: This is a system API. 1280e41f4b71Sopenharmony_ci 1281e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1282e41f4b71Sopenharmony_ci 1283e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1284e41f4b71Sopenharmony_ci 1285e41f4b71Sopenharmony_ci**Parameters** 1286e41f4b71Sopenharmony_ci 1287e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1288e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | -------------------------------------- | 1289e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1290e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 1291e41f4b71Sopenharmony_ci 1292e41f4b71Sopenharmony_ci**Error codes** 1293e41f4b71Sopenharmony_ci 1294e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1295e41f4b71Sopenharmony_ci 1296e41f4b71Sopenharmony_ci| ID| Error Message | 1297e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1298e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1299e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1300e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1301e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1302e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1303e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1304e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1305e41f4b71Sopenharmony_ci 1306e41f4b71Sopenharmony_ci**Example** 1307e41f4b71Sopenharmony_ci 1308e41f4b71Sopenharmony_ci```ts 1309e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1310e41f4b71Sopenharmony_ci 1311e41f4b71Sopenharmony_cilet slotId: number = 0; 1312e41f4b71Sopenharmony_ciradio.turnOnRadio(slotId, (err: BusinessError) => { 1313e41f4b71Sopenharmony_ci if (err) { 1314e41f4b71Sopenharmony_ci console.error(`turnOnRadio failed, callback: err->${JSON.stringify(err)}`); 1315e41f4b71Sopenharmony_ci return; 1316e41f4b71Sopenharmony_ci } 1317e41f4b71Sopenharmony_ci console.log(`turnOnRadio success.`); 1318e41f4b71Sopenharmony_ci}); 1319e41f4b71Sopenharmony_ci``` 1320e41f4b71Sopenharmony_ci 1321e41f4b71Sopenharmony_ci 1322e41f4b71Sopenharmony_ci## radio.turnOnRadio<sup>7+</sup> 1323e41f4b71Sopenharmony_ci 1324e41f4b71Sopenharmony_citurnOnRadio(slotId?: number): Promise\<void\> 1325e41f4b71Sopenharmony_ci 1326e41f4b71Sopenharmony_ciTurns on the radio function for the SIM card in the specified slot. This API uses a promise to return the result. 1327e41f4b71Sopenharmony_ci 1328e41f4b71Sopenharmony_ci**System API**: This is a system API. 1329e41f4b71Sopenharmony_ci 1330e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1331e41f4b71Sopenharmony_ci 1332e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1333e41f4b71Sopenharmony_ci 1334e41f4b71Sopenharmony_ci**Parameters** 1335e41f4b71Sopenharmony_ci 1336e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1337e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1338e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1339e41f4b71Sopenharmony_ci 1340e41f4b71Sopenharmony_ci**Return value** 1341e41f4b71Sopenharmony_ci 1342e41f4b71Sopenharmony_ci| Type | Description | 1343e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 1344e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 1345e41f4b71Sopenharmony_ci 1346e41f4b71Sopenharmony_ci**Error codes** 1347e41f4b71Sopenharmony_ci 1348e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1349e41f4b71Sopenharmony_ci 1350e41f4b71Sopenharmony_ci| ID| Error Message | 1351e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1352e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1353e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1354e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1355e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1356e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1357e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1358e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1359e41f4b71Sopenharmony_ci 1360e41f4b71Sopenharmony_ci**Example** 1361e41f4b71Sopenharmony_ci 1362e41f4b71Sopenharmony_ci```ts 1363e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1364e41f4b71Sopenharmony_ci 1365e41f4b71Sopenharmony_cilet slotId: number = 0; 1366e41f4b71Sopenharmony_ciradio.turnOnRadio(slotId).then(() => { 1367e41f4b71Sopenharmony_ci console.log(`turnOnRadio success.`); 1368e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1369e41f4b71Sopenharmony_ci console.error(`turnOnRadio failed, promise: err->${JSON.stringify(err)}`); 1370e41f4b71Sopenharmony_ci}); 1371e41f4b71Sopenharmony_ci``` 1372e41f4b71Sopenharmony_ci 1373e41f4b71Sopenharmony_ci## radio.turnOffRadio<sup>7+</sup> 1374e41f4b71Sopenharmony_ci 1375e41f4b71Sopenharmony_citurnOffRadio\(callback: AsyncCallback\<void\>\): void 1376e41f4b71Sopenharmony_ci 1377e41f4b71Sopenharmony_ciTurns off the radio function. This API uses an asynchronous callback to return the result. 1378e41f4b71Sopenharmony_ci 1379e41f4b71Sopenharmony_ci**System API**: This is a system API. 1380e41f4b71Sopenharmony_ci 1381e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1382e41f4b71Sopenharmony_ci 1383e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1384e41f4b71Sopenharmony_ci 1385e41f4b71Sopenharmony_ci**Parameters** 1386e41f4b71Sopenharmony_ci 1387e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1388e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | ---------- | 1389e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 1390e41f4b71Sopenharmony_ci 1391e41f4b71Sopenharmony_ci**Error codes** 1392e41f4b71Sopenharmony_ci 1393e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1394e41f4b71Sopenharmony_ci 1395e41f4b71Sopenharmony_ci| ID| Error Message | 1396e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1397e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1398e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1399e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1400e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1401e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1402e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1403e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1404e41f4b71Sopenharmony_ci 1405e41f4b71Sopenharmony_ci**Example** 1406e41f4b71Sopenharmony_ci 1407e41f4b71Sopenharmony_ci```ts 1408e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1409e41f4b71Sopenharmony_ci 1410e41f4b71Sopenharmony_ciradio.turnOffRadio((err: BusinessError) => { 1411e41f4b71Sopenharmony_ci if (err) { 1412e41f4b71Sopenharmony_ci console.error(`turnOffRadio failed, callback: err->${JSON.stringify(err)}`); 1413e41f4b71Sopenharmony_ci return; 1414e41f4b71Sopenharmony_ci } 1415e41f4b71Sopenharmony_ci console.log(`turnOffRadio success.`); 1416e41f4b71Sopenharmony_ci}); 1417e41f4b71Sopenharmony_ci``` 1418e41f4b71Sopenharmony_ci 1419e41f4b71Sopenharmony_ci 1420e41f4b71Sopenharmony_ci## radio.turnOffRadio<sup>7+</sup> 1421e41f4b71Sopenharmony_ci 1422e41f4b71Sopenharmony_citurnOffRadio\(slotId: number, callback: AsyncCallback\<void\>\): void 1423e41f4b71Sopenharmony_ci 1424e41f4b71Sopenharmony_ciDisables the radio service for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1425e41f4b71Sopenharmony_ci 1426e41f4b71Sopenharmony_ci**System API**: This is a system API. 1427e41f4b71Sopenharmony_ci 1428e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1429e41f4b71Sopenharmony_ci 1430e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1431e41f4b71Sopenharmony_ci 1432e41f4b71Sopenharmony_ci**Parameters** 1433e41f4b71Sopenharmony_ci 1434e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1435e41f4b71Sopenharmony_ci| -------- | --------------------- | ---- | -------------------------------------- | 1436e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1437e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 1438e41f4b71Sopenharmony_ci 1439e41f4b71Sopenharmony_ci**Error codes** 1440e41f4b71Sopenharmony_ci 1441e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1442e41f4b71Sopenharmony_ci 1443e41f4b71Sopenharmony_ci| ID| Error Message | 1444e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1445e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1446e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1447e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1448e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1449e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1450e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1451e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1452e41f4b71Sopenharmony_ci 1453e41f4b71Sopenharmony_ci**Example** 1454e41f4b71Sopenharmony_ci 1455e41f4b71Sopenharmony_ci```ts 1456e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1457e41f4b71Sopenharmony_ci 1458e41f4b71Sopenharmony_cilet slotId: number = 0; 1459e41f4b71Sopenharmony_ciradio.turnOffRadio(slotId, (err: BusinessError) => { 1460e41f4b71Sopenharmony_ci if (err) { 1461e41f4b71Sopenharmony_ci console.error(`turnOffRadio failed, callback: err->${JSON.stringify(err)}`); 1462e41f4b71Sopenharmony_ci return; 1463e41f4b71Sopenharmony_ci } 1464e41f4b71Sopenharmony_ci console.log(`turnOffRadio success.`); 1465e41f4b71Sopenharmony_ci}); 1466e41f4b71Sopenharmony_ci``` 1467e41f4b71Sopenharmony_ci 1468e41f4b71Sopenharmony_ci 1469e41f4b71Sopenharmony_ci## radio.turnOffRadio<sup>7+</sup> 1470e41f4b71Sopenharmony_ci 1471e41f4b71Sopenharmony_citurnOffRadio\(slotId?: number\): Promise\<void\> 1472e41f4b71Sopenharmony_ci 1473e41f4b71Sopenharmony_ciTurns off the radio function for the SIM card in the specified slot. This API uses a promise to return the result. 1474e41f4b71Sopenharmony_ci 1475e41f4b71Sopenharmony_ci**System API**: This is a system API. 1476e41f4b71Sopenharmony_ci 1477e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1478e41f4b71Sopenharmony_ci 1479e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1480e41f4b71Sopenharmony_ci 1481e41f4b71Sopenharmony_ci**Parameters** 1482e41f4b71Sopenharmony_ci 1483e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1484e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1485e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1486e41f4b71Sopenharmony_ci 1487e41f4b71Sopenharmony_ci**Return value** 1488e41f4b71Sopenharmony_ci 1489e41f4b71Sopenharmony_ci| Type | Description | 1490e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 1491e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 1492e41f4b71Sopenharmony_ci 1493e41f4b71Sopenharmony_ci**Error codes** 1494e41f4b71Sopenharmony_ci 1495e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1496e41f4b71Sopenharmony_ci 1497e41f4b71Sopenharmony_ci| ID| Error Message | 1498e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1499e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1500e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1501e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1502e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1503e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1504e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1505e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1506e41f4b71Sopenharmony_ci 1507e41f4b71Sopenharmony_ci**Example** 1508e41f4b71Sopenharmony_ci 1509e41f4b71Sopenharmony_ci```ts 1510e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1511e41f4b71Sopenharmony_ci 1512e41f4b71Sopenharmony_cilet slotId: number = 0; 1513e41f4b71Sopenharmony_ciradio.turnOffRadio(slotId).then(() => { 1514e41f4b71Sopenharmony_ci console.log(`turnOffRadio success.`); 1515e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1516e41f4b71Sopenharmony_ci console.error(`turnOffRadio failed, promise: err->${JSON.stringify(err)}`); 1517e41f4b71Sopenharmony_ci}); 1518e41f4b71Sopenharmony_ci``` 1519e41f4b71Sopenharmony_ci 1520e41f4b71Sopenharmony_ci## radio.setPreferredNetwork<sup>8+</sup> 1521e41f4b71Sopenharmony_ci 1522e41f4b71Sopenharmony_cisetPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback: AsyncCallback\<void\>\): void 1523e41f4b71Sopenharmony_ci 1524e41f4b71Sopenharmony_ciSets the preferred network of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1525e41f4b71Sopenharmony_ci 1526e41f4b71Sopenharmony_ci**System API**: This is a system API. 1527e41f4b71Sopenharmony_ci 1528e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1529e41f4b71Sopenharmony_ci 1530e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1531e41f4b71Sopenharmony_ci 1532e41f4b71Sopenharmony_ci**Parameters** 1533e41f4b71Sopenharmony_ci 1534e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1535e41f4b71Sopenharmony_ci| ----------- | ---------------------------------------------- | ---- | -------------------------------------- | 1536e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1537e41f4b71Sopenharmony_ci| networkMode | [PreferredNetworkMode](#preferrednetworkmode8) | Yes | Preferred network mode. | 1538e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 1539e41f4b71Sopenharmony_ci 1540e41f4b71Sopenharmony_ci**Error codes** 1541e41f4b71Sopenharmony_ci 1542e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1543e41f4b71Sopenharmony_ci 1544e41f4b71Sopenharmony_ci| ID| Error Message | 1545e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1546e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1547e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1548e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1549e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1550e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1551e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1552e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1553e41f4b71Sopenharmony_ci 1554e41f4b71Sopenharmony_ci**Example** 1555e41f4b71Sopenharmony_ci 1556e41f4b71Sopenharmony_ci```ts 1557e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1558e41f4b71Sopenharmony_ci 1559e41f4b71Sopenharmony_cilet slotId: number = 0; 1560e41f4b71Sopenharmony_cilet mode: radio.PreferredNetworkMode = radio.PreferredNetworkMode.PREFERRED_NETWORK_MODE_GSM; 1561e41f4b71Sopenharmony_ciradio.setPreferredNetwork(slotId, mode, (err: BusinessError) => { 1562e41f4b71Sopenharmony_ci if (err) { 1563e41f4b71Sopenharmony_ci console.error(`setPreferredNetwork failed, callback: err->${JSON.stringify(err)}`); 1564e41f4b71Sopenharmony_ci return; 1565e41f4b71Sopenharmony_ci } 1566e41f4b71Sopenharmony_ci console.log(`setPreferredNetwork success.`); 1567e41f4b71Sopenharmony_ci}); 1568e41f4b71Sopenharmony_ci``` 1569e41f4b71Sopenharmony_ci 1570e41f4b71Sopenharmony_ci## radio.setPreferredNetwork<sup>8+</sup> 1571e41f4b71Sopenharmony_ci 1572e41f4b71Sopenharmony_cisetPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode\): Promise\<void\> 1573e41f4b71Sopenharmony_ci 1574e41f4b71Sopenharmony_ciSets the preferred network of the SIM card in the specified slot. This API uses a promise to return the result. 1575e41f4b71Sopenharmony_ci 1576e41f4b71Sopenharmony_ci**System API**: This is a system API. 1577e41f4b71Sopenharmony_ci 1578e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1579e41f4b71Sopenharmony_ci 1580e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1581e41f4b71Sopenharmony_ci 1582e41f4b71Sopenharmony_ci**Parameters** 1583e41f4b71Sopenharmony_ci 1584e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1585e41f4b71Sopenharmony_ci| ----------- | ---------------------------------------------- | ---- | -------------------------------------- | 1586e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1587e41f4b71Sopenharmony_ci| networkMode | [PreferredNetworkMode](#preferrednetworkmode8) | Yes | Preferred network mode.| 1588e41f4b71Sopenharmony_ci 1589e41f4b71Sopenharmony_ci**Return value** 1590e41f4b71Sopenharmony_ci 1591e41f4b71Sopenharmony_ci| Type | Description | 1592e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 1593e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 1594e41f4b71Sopenharmony_ci 1595e41f4b71Sopenharmony_ci**Error codes** 1596e41f4b71Sopenharmony_ci 1597e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1598e41f4b71Sopenharmony_ci 1599e41f4b71Sopenharmony_ci| ID| Error Message | 1600e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1601e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1602e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1603e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1604e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1605e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1606e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1607e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1608e41f4b71Sopenharmony_ci 1609e41f4b71Sopenharmony_ci**Example** 1610e41f4b71Sopenharmony_ci 1611e41f4b71Sopenharmony_ci```ts 1612e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1613e41f4b71Sopenharmony_ci 1614e41f4b71Sopenharmony_cilet slotId: number = 0; 1615e41f4b71Sopenharmony_cilet mode: radio.PreferredNetworkMode = radio.PreferredNetworkMode.PREFERRED_NETWORK_MODE_GSM; 1616e41f4b71Sopenharmony_ciradio.setPreferredNetwork(slotId, mode).then(() => { 1617e41f4b71Sopenharmony_ci console.log(`setPreferredNetwork success.`); 1618e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1619e41f4b71Sopenharmony_ci console.error(`setPreferredNetwork failed, promise: err->${JSON.stringify(err)}`); 1620e41f4b71Sopenharmony_ci}); 1621e41f4b71Sopenharmony_ci``` 1622e41f4b71Sopenharmony_ci 1623e41f4b71Sopenharmony_ci## radio.getPreferredNetwork<sup>8+</sup> 1624e41f4b71Sopenharmony_ci 1625e41f4b71Sopenharmony_cigetPreferredNetwork\(slotId: number, callback: AsyncCallback\<PreferredNetworkMode\>\): void 1626e41f4b71Sopenharmony_ci 1627e41f4b71Sopenharmony_ciObtains the preferred network of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1628e41f4b71Sopenharmony_ci 1629e41f4b71Sopenharmony_ci**System API**: This is a system API. 1630e41f4b71Sopenharmony_ci 1631e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1632e41f4b71Sopenharmony_ci 1633e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1634e41f4b71Sopenharmony_ci 1635e41f4b71Sopenharmony_ci**Parameters** 1636e41f4b71Sopenharmony_ci 1637e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1638e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------------- | ---- | -------------------------------------- | 1639e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1640e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[PreferredNetworkMode](#preferrednetworkmode8)\> | Yes | Callback used to return the result. | 1641e41f4b71Sopenharmony_ci 1642e41f4b71Sopenharmony_ci**Error codes** 1643e41f4b71Sopenharmony_ci 1644e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1645e41f4b71Sopenharmony_ci 1646e41f4b71Sopenharmony_ci| ID| Error Message | 1647e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1648e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1649e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1650e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1651e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1652e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1653e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1654e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1655e41f4b71Sopenharmony_ci 1656e41f4b71Sopenharmony_ci**Example** 1657e41f4b71Sopenharmony_ci 1658e41f4b71Sopenharmony_ci```ts 1659e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1660e41f4b71Sopenharmony_ci 1661e41f4b71Sopenharmony_cilet slotId: number = 0; 1662e41f4b71Sopenharmony_ciradio.getPreferredNetwork(slotId, (err: BusinessError, data: radio.PreferredNetworkMode) => { 1663e41f4b71Sopenharmony_ci if (err) { 1664e41f4b71Sopenharmony_ci console.error(`getPreferredNetwork failed, callback: err->${JSON.stringify(err)}`); 1665e41f4b71Sopenharmony_ci return; 1666e41f4b71Sopenharmony_ci } 1667e41f4b71Sopenharmony_ci console.log(`getPreferredNetwork success, callback: data->${JSON.stringify(data)}`); 1668e41f4b71Sopenharmony_ci}); 1669e41f4b71Sopenharmony_ci``` 1670e41f4b71Sopenharmony_ci 1671e41f4b71Sopenharmony_ci## radio.getPreferredNetwork<sup>8+</sup> 1672e41f4b71Sopenharmony_ci 1673e41f4b71Sopenharmony_cigetPreferredNetwork\(slotId: number\): Promise\<PreferredNetworkMode\> 1674e41f4b71Sopenharmony_ci 1675e41f4b71Sopenharmony_ciObtains the preferred network of the SIM card in the specified slot. This API uses a promise to return the result. 1676e41f4b71Sopenharmony_ci 1677e41f4b71Sopenharmony_ci**System API**: This is a system API. 1678e41f4b71Sopenharmony_ci 1679e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1680e41f4b71Sopenharmony_ci 1681e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1682e41f4b71Sopenharmony_ci 1683e41f4b71Sopenharmony_ci**Parameters** 1684e41f4b71Sopenharmony_ci 1685e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1686e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1687e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1688e41f4b71Sopenharmony_ci 1689e41f4b71Sopenharmony_ci**Return value** 1690e41f4b71Sopenharmony_ci 1691e41f4b71Sopenharmony_ci| Type | Description | 1692e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 1693e41f4b71Sopenharmony_ci| Promise\<[PreferredNetworkMode](#preferrednetworkmode8)\> | Promise used to return the result.| 1694e41f4b71Sopenharmony_ci 1695e41f4b71Sopenharmony_ci**Error codes** 1696e41f4b71Sopenharmony_ci 1697e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1698e41f4b71Sopenharmony_ci 1699e41f4b71Sopenharmony_ci| ID| Error Message | 1700e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1701e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1702e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1703e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1704e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1705e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1706e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1707e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1708e41f4b71Sopenharmony_ci 1709e41f4b71Sopenharmony_ci**Example** 1710e41f4b71Sopenharmony_ci 1711e41f4b71Sopenharmony_ci```ts 1712e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1713e41f4b71Sopenharmony_ci 1714e41f4b71Sopenharmony_cilet slotId: number = 0; 1715e41f4b71Sopenharmony_ciradio.getPreferredNetwork(slotId).then((data: radio.PreferredNetworkMode) => { 1716e41f4b71Sopenharmony_ci console.log(`getPreferredNetwork success, promise: data->${JSON.stringify(data)}`); 1717e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1718e41f4b71Sopenharmony_ci console.error(`getPreferredNetwork failed, promise: err->${JSON.stringify(err)}`); 1719e41f4b71Sopenharmony_ci}); 1720e41f4b71Sopenharmony_ci``` 1721e41f4b71Sopenharmony_ci 1722e41f4b71Sopenharmony_ci## radio.getImsRegInfo<sup>9+</sup> 1723e41f4b71Sopenharmony_ci 1724e41f4b71Sopenharmony_cigetImsRegInfo\(slotId: number, imsType: ImsServiceType, callback: AsyncCallback\<ImsRegInfo\>\): void 1725e41f4b71Sopenharmony_ci 1726e41f4b71Sopenharmony_ciObtains the IMS registration status of the specified IMS service type for the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1727e41f4b71Sopenharmony_ci 1728e41f4b71Sopenharmony_ci**System API**: This is a system API. 1729e41f4b71Sopenharmony_ci 1730e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1731e41f4b71Sopenharmony_ci 1732e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1733e41f4b71Sopenharmony_ci 1734e41f4b71Sopenharmony_ci**Parameters** 1735e41f4b71Sopenharmony_ci 1736e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1737e41f4b71Sopenharmony_ci| -------- | ------------------------------------------ | ---- | -------------------------------------- | 1738e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1739e41f4b71Sopenharmony_ci| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | 1740e41f4b71Sopenharmony_ci| callback | AsyncCallback<[ImsRegInfo](#imsreginfo9)\> | Yes | Callback used to return the result. | 1741e41f4b71Sopenharmony_ci 1742e41f4b71Sopenharmony_ci**Error codes** 1743e41f4b71Sopenharmony_ci 1744e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1745e41f4b71Sopenharmony_ci 1746e41f4b71Sopenharmony_ci| ID| Error Message | 1747e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1748e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1749e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1750e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: Mandatory parameters are left unspecified. | 1751e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1752e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1753e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1754e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1755e41f4b71Sopenharmony_ci 1756e41f4b71Sopenharmony_ci**Example** 1757e41f4b71Sopenharmony_ci 1758e41f4b71Sopenharmony_ci```ts 1759e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1760e41f4b71Sopenharmony_ci 1761e41f4b71Sopenharmony_cilet slotId: number = 0; 1762e41f4b71Sopenharmony_cilet mode: radio.ImsServiceType = radio.ImsServiceType.TYPE_VIDEO; 1763e41f4b71Sopenharmony_ciradio.getImsRegInfo(slotId, mode, (err: BusinessError, data: radio.ImsRegInfo) => { 1764e41f4b71Sopenharmony_ci if (err) { 1765e41f4b71Sopenharmony_ci console.error(`getImsRegInfo failed, callback: err->${JSON.stringify(err)}`); 1766e41f4b71Sopenharmony_ci return; 1767e41f4b71Sopenharmony_ci } 1768e41f4b71Sopenharmony_ci console.log(`getImsRegInfo success, callback: data->${JSON.stringify(data)}`); 1769e41f4b71Sopenharmony_ci}); 1770e41f4b71Sopenharmony_ci``` 1771e41f4b71Sopenharmony_ci 1772e41f4b71Sopenharmony_ci## radio.getImsRegInfo<sup>9+</sup> 1773e41f4b71Sopenharmony_ci 1774e41f4b71Sopenharmony_cigetImsRegInfo\(slotId: number, imsType: ImsServiceType\): Promise\<ImsRegInfo\> 1775e41f4b71Sopenharmony_ci 1776e41f4b71Sopenharmony_ciObtains the IMS registration status of the specified IMS service type for the SIM card in the specified slot. This API uses a promise to return the result. 1777e41f4b71Sopenharmony_ci 1778e41f4b71Sopenharmony_ci**System API**: This is a system API. 1779e41f4b71Sopenharmony_ci 1780e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1781e41f4b71Sopenharmony_ci 1782e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1783e41f4b71Sopenharmony_ci 1784e41f4b71Sopenharmony_ci**Parameters** 1785e41f4b71Sopenharmony_ci 1786e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1787e41f4b71Sopenharmony_ci| ------- | ---------------------------------- | ---- | -------------------------------------- | 1788e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1789e41f4b71Sopenharmony_ci| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | 1790e41f4b71Sopenharmony_ci 1791e41f4b71Sopenharmony_ci**Return value** 1792e41f4b71Sopenharmony_ci 1793e41f4b71Sopenharmony_ci| Type | Description | 1794e41f4b71Sopenharmony_ci| ------------------------------------- | ----------------------- | 1795e41f4b71Sopenharmony_ci| Promise\<[ImsRegInfo](#imsreginfo9)\> | Promise used to return the result.| 1796e41f4b71Sopenharmony_ci 1797e41f4b71Sopenharmony_ci**Error codes** 1798e41f4b71Sopenharmony_ci 1799e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1800e41f4b71Sopenharmony_ci 1801e41f4b71Sopenharmony_ci| ID| Error Message | 1802e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1803e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1804e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1805e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: Mandatory parameters are left unspecified. | 1806e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1807e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1808e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1809e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1810e41f4b71Sopenharmony_ci 1811e41f4b71Sopenharmony_ci**Example** 1812e41f4b71Sopenharmony_ci 1813e41f4b71Sopenharmony_ci```ts 1814e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1815e41f4b71Sopenharmony_ci 1816e41f4b71Sopenharmony_cilet slotId: number = 0; 1817e41f4b71Sopenharmony_cilet mode: radio.ImsServiceType = radio.ImsServiceType.TYPE_VIDEO; 1818e41f4b71Sopenharmony_ciradio.getImsRegInfo(slotId, mode).then((data: radio.ImsRegInfo) => { 1819e41f4b71Sopenharmony_ci console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`); 1820e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1821e41f4b71Sopenharmony_ci console.error(`getImsRegInfo failed, promise: err->${JSON.stringify(err)}`); 1822e41f4b71Sopenharmony_ci}); 1823e41f4b71Sopenharmony_ci``` 1824e41f4b71Sopenharmony_ci 1825e41f4b71Sopenharmony_ci## radio.on('imsRegStateChange')<sup>9+</sup> 1826e41f4b71Sopenharmony_ci 1827e41f4b71Sopenharmony_cion\(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback\<ImsRegInfo\>\): void 1828e41f4b71Sopenharmony_ci 1829e41f4b71Sopenharmony_ciEnables listening for **imsRegStateChange** events of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1830e41f4b71Sopenharmony_ci 1831e41f4b71Sopenharmony_ci**System API**: This is a system API. 1832e41f4b71Sopenharmony_ci 1833e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1834e41f4b71Sopenharmony_ci 1835e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1836e41f4b71Sopenharmony_ci 1837e41f4b71Sopenharmony_ci**Parameters** 1838e41f4b71Sopenharmony_ci 1839e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1840e41f4b71Sopenharmony_ci| -------- | ------------------------------------ | ---- | -------------------------------------- | 1841e41f4b71Sopenharmony_ci| type | string | Yes | IMS registration status change. This field has a fixed value of **imsRegStateChange**. | 1842e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1843e41f4b71Sopenharmony_ci| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | 1844e41f4b71Sopenharmony_ci| callback | Callback<[ImsRegInfo](#imsreginfo9)> | Yes | Callback used to return the result. | 1845e41f4b71Sopenharmony_ci 1846e41f4b71Sopenharmony_ci**Error codes** 1847e41f4b71Sopenharmony_ci 1848e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1849e41f4b71Sopenharmony_ci 1850e41f4b71Sopenharmony_ci| ID| Error Message | 1851e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1852e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1853e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1854e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: Mandatory parameters are left unspecified. | 1855e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1856e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1857e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1858e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1859e41f4b71Sopenharmony_ci 1860e41f4b71Sopenharmony_ci**Example** 1861e41f4b71Sopenharmony_ci 1862e41f4b71Sopenharmony_ci```ts 1863e41f4b71Sopenharmony_cilet slotId: number = 0; 1864e41f4b71Sopenharmony_cilet mode: radio.ImsServiceType = radio.ImsServiceType.TYPE_VIDEO; 1865e41f4b71Sopenharmony_ciradio.on('imsRegStateChange', slotId, mode, (data: radio.ImsRegInfo) => { 1866e41f4b71Sopenharmony_ci console.log(`on imsRegStateChange success, callback: data->${JSON.stringify(data)}`); 1867e41f4b71Sopenharmony_ci}); 1868e41f4b71Sopenharmony_ci``` 1869e41f4b71Sopenharmony_ci 1870e41f4b71Sopenharmony_ci## radio.off('imsRegStateChange')<sup>9+</sup> 1871e41f4b71Sopenharmony_ci 1872e41f4b71Sopenharmony_cioff\(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback\<ImsRegInfo\>\): void 1873e41f4b71Sopenharmony_ci 1874e41f4b71Sopenharmony_ciDisables listening for **imsRegStateChange** events of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1875e41f4b71Sopenharmony_ci 1876e41f4b71Sopenharmony_ci**System API**: This is a system API. 1877e41f4b71Sopenharmony_ci 1878e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1879e41f4b71Sopenharmony_ci 1880e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1881e41f4b71Sopenharmony_ci 1882e41f4b71Sopenharmony_ci**Parameters** 1883e41f4b71Sopenharmony_ci 1884e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1885e41f4b71Sopenharmony_ci| -------- | ------------------------------------ | ---- | -------------------------------------- | 1886e41f4b71Sopenharmony_ci| type | string | Yes | IMS registration status change. This field has a fixed value of **imsRegStateChange**. | 1887e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1888e41f4b71Sopenharmony_ci| imsType | [ImsServiceType](#imsservicetype9) | Yes | IMS service type. | 1889e41f4b71Sopenharmony_ci| callback | Callback<[ImsRegInfo](#imsreginfo9)> | No | Callback used to return the result. If it is left unspecified, it indicates the callback for all the events will be unsubscribed. The value must be the same as the value of **callback** in **on('imsRegStateChange')**. | 1890e41f4b71Sopenharmony_ci 1891e41f4b71Sopenharmony_ci**Error codes** 1892e41f4b71Sopenharmony_ci 1893e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1894e41f4b71Sopenharmony_ci 1895e41f4b71Sopenharmony_ci| ID| Error Message | 1896e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1897e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1898e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1899e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: Mandatory parameters are left unspecified. | 1900e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1901e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1902e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1903e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1904e41f4b71Sopenharmony_ci 1905e41f4b71Sopenharmony_ci**Example** 1906e41f4b71Sopenharmony_ci 1907e41f4b71Sopenharmony_ci```ts 1908e41f4b71Sopenharmony_cilet slotId: number = 0; 1909e41f4b71Sopenharmony_cilet mode: radio.ImsServiceType = radio.ImsServiceType.TYPE_VIDEO; 1910e41f4b71Sopenharmony_ciradio.off('imsRegStateChange', slotId, mode, (data: radio.ImsRegInfo) => { 1911e41f4b71Sopenharmony_ci console.log(`off imsRegStateChange success, callback: data->${JSON.stringify(data)}`); 1912e41f4b71Sopenharmony_ci}); 1913e41f4b71Sopenharmony_ci``` 1914e41f4b71Sopenharmony_ci 1915e41f4b71Sopenharmony_ci 1916e41f4b71Sopenharmony_ci## radio.getBasebandVersion<sup>10+</sup> 1917e41f4b71Sopenharmony_ci 1918e41f4b71Sopenharmony_cigetBasebandVersion\(slotId: number, callback: AsyncCallback\<string\>\): void 1919e41f4b71Sopenharmony_ci 1920e41f4b71Sopenharmony_ciObtains the device baseband version of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 1921e41f4b71Sopenharmony_ci 1922e41f4b71Sopenharmony_ci**System API**: This is a system API. 1923e41f4b71Sopenharmony_ci 1924e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1925e41f4b71Sopenharmony_ci 1926e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1927e41f4b71Sopenharmony_ci 1928e41f4b71Sopenharmony_ci**Parameters** 1929e41f4b71Sopenharmony_ci 1930e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1931e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ------------------------------------- | 1932e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1933e41f4b71Sopenharmony_ci| callback | AsyncCallback\<string\> | Yes | Callback used to return the result. | 1934e41f4b71Sopenharmony_ci 1935e41f4b71Sopenharmony_ci**Error codes** 1936e41f4b71Sopenharmony_ci 1937e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1938e41f4b71Sopenharmony_ci 1939e41f4b71Sopenharmony_ci| ID| Error Message | 1940e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1941e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1942e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1943e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1944e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1945e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 1946e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1947e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 1948e41f4b71Sopenharmony_ci 1949e41f4b71Sopenharmony_ci**Example** 1950e41f4b71Sopenharmony_ci 1951e41f4b71Sopenharmony_ci```ts 1952e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1953e41f4b71Sopenharmony_ci 1954e41f4b71Sopenharmony_cilet slotId: number = 0; 1955e41f4b71Sopenharmony_ciradio.getBasebandVersion(slotId, (err: BusinessError, data: string) => { 1956e41f4b71Sopenharmony_ci if (err) { 1957e41f4b71Sopenharmony_ci console.error(`getBasebandVersion failed, callback: err->${JSON.stringify(err)}`); 1958e41f4b71Sopenharmony_ci return; 1959e41f4b71Sopenharmony_ci } 1960e41f4b71Sopenharmony_ci console.log(`getBasebandVersion success, callback: data->${JSON.stringify(data)}`); 1961e41f4b71Sopenharmony_ci}); 1962e41f4b71Sopenharmony_ci``` 1963e41f4b71Sopenharmony_ci 1964e41f4b71Sopenharmony_ci 1965e41f4b71Sopenharmony_ci## radio.getBasebandVersion<sup>10+</sup> 1966e41f4b71Sopenharmony_ci 1967e41f4b71Sopenharmony_cigetBasebandVersion\(slotId: number\): Promise\<string\> 1968e41f4b71Sopenharmony_ci 1969e41f4b71Sopenharmony_ciObtains the device baseband version of the SIM card in the specified slot. This API uses a promise to return the result. 1970e41f4b71Sopenharmony_ci 1971e41f4b71Sopenharmony_ci**System API**: This is a system API. 1972e41f4b71Sopenharmony_ci 1973e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1974e41f4b71Sopenharmony_ci 1975e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 1976e41f4b71Sopenharmony_ci 1977e41f4b71Sopenharmony_ci**Parameters** 1978e41f4b71Sopenharmony_ci 1979e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1980e41f4b71Sopenharmony_ci| -------- | ----------------------- | ---- | ------------------------------------- | 1981e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1982e41f4b71Sopenharmony_ci 1983e41f4b71Sopenharmony_ci**Return value** 1984e41f4b71Sopenharmony_ci 1985e41f4b71Sopenharmony_ci| Type | Description | 1986e41f4b71Sopenharmony_ci| ----------------- | -------------------------------------- | 1987e41f4b71Sopenharmony_ci| Promise\<string\> | Promise used to return the result. | 1988e41f4b71Sopenharmony_ci 1989e41f4b71Sopenharmony_ci**Error codes** 1990e41f4b71Sopenharmony_ci 1991e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 1992e41f4b71Sopenharmony_ci 1993e41f4b71Sopenharmony_ci| ID| Error Message | 1994e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1995e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1996e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1997e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 1998e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1999e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2000e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2001e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2002e41f4b71Sopenharmony_ci 2003e41f4b71Sopenharmony_ci**Example** 2004e41f4b71Sopenharmony_ci 2005e41f4b71Sopenharmony_ci```ts 2006e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2007e41f4b71Sopenharmony_ci 2008e41f4b71Sopenharmony_cilet slotId: number = 0; 2009e41f4b71Sopenharmony_ciradio.getBasebandVersion(slotId).then((data: string) => { 2010e41f4b71Sopenharmony_ci console.log(`getBasebandVersion success, promise: data->${JSON.stringify(data)}`); 2011e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2012e41f4b71Sopenharmony_ci console.error(`getBasebandVersion failed, promise: err->${JSON.stringify(err)}`); 2013e41f4b71Sopenharmony_ci}); 2014e41f4b71Sopenharmony_ci``` 2015e41f4b71Sopenharmony_ci 2016e41f4b71Sopenharmony_ci 2017e41f4b71Sopenharmony_ci## radio.setNROptionMode<sup>10+</sup> 2018e41f4b71Sopenharmony_ci 2019e41f4b71Sopenharmony_cisetNROptionMode\(slotId: number, mode: NROptionMode, callback: AsyncCallback\<void\>\): void 2020e41f4b71Sopenharmony_ci 2021e41f4b71Sopenharmony_ciSets the NR mode of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 2022e41f4b71Sopenharmony_ci 2023e41f4b71Sopenharmony_ci**System API**: This is a system API. 2024e41f4b71Sopenharmony_ci 2025e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2026e41f4b71Sopenharmony_ci 2027e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2028e41f4b71Sopenharmony_ci 2029e41f4b71Sopenharmony_ci**Parameters** 2030e41f4b71Sopenharmony_ci 2031e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2032e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------ | ---- | -------------------------------------- | 2033e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 2034e41f4b71Sopenharmony_ci| mode | [NROptionMode](#nroptionmode10) | Yes | Enumerates NR selection modes. | 2035e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 2036e41f4b71Sopenharmony_ci 2037e41f4b71Sopenharmony_ci**Error codes** 2038e41f4b71Sopenharmony_ci 2039e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2040e41f4b71Sopenharmony_ci 2041e41f4b71Sopenharmony_ci| ID| Error Message | 2042e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2043e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2044e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2045e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2046e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2047e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2048e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2049e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2050e41f4b71Sopenharmony_ci 2051e41f4b71Sopenharmony_ci**Example** 2052e41f4b71Sopenharmony_ci 2053e41f4b71Sopenharmony_ci```ts 2054e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2055e41f4b71Sopenharmony_ci 2056e41f4b71Sopenharmony_cilet slotId: number = 0; 2057e41f4b71Sopenharmony_cilet mode: radio.NROptionMode = radio.NROptionMode.NR_OPTION_NSA_ONLY; 2058e41f4b71Sopenharmony_ciradio.setNROptionMode(slotId, mode, (err: BusinessError) => { 2059e41f4b71Sopenharmony_ci if (err) { 2060e41f4b71Sopenharmony_ci console.error(`setNROptionMode failed, callback: err->${JSON.stringify(err)}`); 2061e41f4b71Sopenharmony_ci return; 2062e41f4b71Sopenharmony_ci } 2063e41f4b71Sopenharmony_ci console.log(`setNROptionMode success.`); 2064e41f4b71Sopenharmony_ci}); 2065e41f4b71Sopenharmony_ci``` 2066e41f4b71Sopenharmony_ci 2067e41f4b71Sopenharmony_ci 2068e41f4b71Sopenharmony_ci## radio.setNROptionMode<sup>10+</sup> 2069e41f4b71Sopenharmony_ci 2070e41f4b71Sopenharmony_cisetNROptionMode\(slotId: number, mode: NROptionMode\): Promise\<void\> 2071e41f4b71Sopenharmony_ci 2072e41f4b71Sopenharmony_ciSets the NR mode of the SIM card in the specified slot. This API uses a promise to return the result. 2073e41f4b71Sopenharmony_ci 2074e41f4b71Sopenharmony_ci**System API**: This is a system API. 2075e41f4b71Sopenharmony_ci 2076e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2077e41f4b71Sopenharmony_ci 2078e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2079e41f4b71Sopenharmony_ci 2080e41f4b71Sopenharmony_ci**Parameters** 2081e41f4b71Sopenharmony_ci 2082e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 2083e41f4b71Sopenharmony_ci| ------ | ------------------------------- | ---- | ------------------------------------- | 2084e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2085e41f4b71Sopenharmony_ci| mode | [NROptionMode](#nroptionmode10) | Yes | NR mode. | 2086e41f4b71Sopenharmony_ci 2087e41f4b71Sopenharmony_ci**Return value** 2088e41f4b71Sopenharmony_ci 2089e41f4b71Sopenharmony_ci| Type | Description | 2090e41f4b71Sopenharmony_ci| ----------------- | ----------------------- | 2091e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result. | 2092e41f4b71Sopenharmony_ci 2093e41f4b71Sopenharmony_ci**Error codes** 2094e41f4b71Sopenharmony_ci 2095e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2096e41f4b71Sopenharmony_ci 2097e41f4b71Sopenharmony_ci| ID| Error Message | 2098e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2099e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2100e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2101e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2102e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2103e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2104e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2105e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2106e41f4b71Sopenharmony_ci 2107e41f4b71Sopenharmony_ci**Example** 2108e41f4b71Sopenharmony_ci 2109e41f4b71Sopenharmony_ci```ts 2110e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2111e41f4b71Sopenharmony_ci 2112e41f4b71Sopenharmony_cilet slotId: number = 0; 2113e41f4b71Sopenharmony_cilet mode: radio.NROptionMode = radio.NROptionMode.NR_OPTION_NSA_ONLY; 2114e41f4b71Sopenharmony_ciradio.setNROptionMode(slotId, mode).then(() => { 2115e41f4b71Sopenharmony_ci console.log(`setNROptionMode success`); 2116e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2117e41f4b71Sopenharmony_ci console.error(`setNROptionMode failed, promise: err->${JSON.stringify(err)}`); 2118e41f4b71Sopenharmony_ci}); 2119e41f4b71Sopenharmony_ci``` 2120e41f4b71Sopenharmony_ci 2121e41f4b71Sopenharmony_ci 2122e41f4b71Sopenharmony_ci## radio.getNROptionMode<sup>10+</sup> 2123e41f4b71Sopenharmony_ci 2124e41f4b71Sopenharmony_cigetNROptionMode\(slotId: number, callback: AsyncCallback\<NROptionMode\>\): void 2125e41f4b71Sopenharmony_ci 2126e41f4b71Sopenharmony_ciObtains the NR option mode of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 2127e41f4b71Sopenharmony_ci 2128e41f4b71Sopenharmony_ci**System API**: This is a system API. 2129e41f4b71Sopenharmony_ci 2130e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2131e41f4b71Sopenharmony_ci 2132e41f4b71Sopenharmony_ci**Parameters** 2133e41f4b71Sopenharmony_ci 2134e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2135e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------ | ---- | -------------------------------------- | 2136e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 2137e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[NROptionMode](#nroptionmode10)\> | Yes | Callback used to return the result. | 2138e41f4b71Sopenharmony_ci 2139e41f4b71Sopenharmony_ci**Error codes** 2140e41f4b71Sopenharmony_ci 2141e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2142e41f4b71Sopenharmony_ci 2143e41f4b71Sopenharmony_ci| ID| Error Message | 2144e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2145e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2146e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2147e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2148e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2149e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2150e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2151e41f4b71Sopenharmony_ci 2152e41f4b71Sopenharmony_ci**Example** 2153e41f4b71Sopenharmony_ci 2154e41f4b71Sopenharmony_ci```ts 2155e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2156e41f4b71Sopenharmony_ci 2157e41f4b71Sopenharmony_cilet slotId: number = 0; 2158e41f4b71Sopenharmony_ciradio.getNROptionMode(slotId, (err: BusinessError, data: radio.NROptionMode) => { 2159e41f4b71Sopenharmony_ci if (err) { 2160e41f4b71Sopenharmony_ci console.error(`getNROptionMode failed, callback: err->${JSON.stringify(err)}`); 2161e41f4b71Sopenharmony_ci return; 2162e41f4b71Sopenharmony_ci } 2163e41f4b71Sopenharmony_ci console.log(`getNROptionMode success, callback: data->${JSON.stringify(data)}`); 2164e41f4b71Sopenharmony_ci}); 2165e41f4b71Sopenharmony_ci``` 2166e41f4b71Sopenharmony_ci 2167e41f4b71Sopenharmony_ci## radio.getNROptionMode<sup>10+</sup> 2168e41f4b71Sopenharmony_ci 2169e41f4b71Sopenharmony_cigetNROptionMode\(slotId: number\): Promise\<NROptionMode\> 2170e41f4b71Sopenharmony_ci 2171e41f4b71Sopenharmony_ciObtains the NR option mode of the SIM card in the specified slot. This API uses a promise to return the result. 2172e41f4b71Sopenharmony_ci 2173e41f4b71Sopenharmony_ci**System API**: This is a system API. 2174e41f4b71Sopenharmony_ci 2175e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2176e41f4b71Sopenharmony_ci 2177e41f4b71Sopenharmony_ci**Parameters** 2178e41f4b71Sopenharmony_ci 2179e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 2180e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ------------------------------------- | 2181e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2182e41f4b71Sopenharmony_ci 2183e41f4b71Sopenharmony_ci**Return value** 2184e41f4b71Sopenharmony_ci 2185e41f4b71Sopenharmony_ci| Type | Description | 2186e41f4b71Sopenharmony_ci| ----------------------------------------- | ----------------------- | 2187e41f4b71Sopenharmony_ci| Promise\<[NROptionMode](#nroptionmode10)\> | Promise used to return the result.| 2188e41f4b71Sopenharmony_ci 2189e41f4b71Sopenharmony_ci**Error codes** 2190e41f4b71Sopenharmony_ci 2191e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2192e41f4b71Sopenharmony_ci 2193e41f4b71Sopenharmony_ci| ID| Error Message | 2194e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2195e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2196e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2197e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2198e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2199e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2200e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2201e41f4b71Sopenharmony_ci 2202e41f4b71Sopenharmony_ci**Example** 2203e41f4b71Sopenharmony_ci 2204e41f4b71Sopenharmony_ci```ts 2205e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2206e41f4b71Sopenharmony_ci 2207e41f4b71Sopenharmony_cilet slotId: number = 0; 2208e41f4b71Sopenharmony_ciradio.getNROptionMode(slotId).then((data: radio.NROptionMode) => { 2209e41f4b71Sopenharmony_ci console.log(`getNROptionMode success, promise: data->${JSON.stringify(data)}`); 2210e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2211e41f4b71Sopenharmony_ci console.error(`getNROptionMode failed, promise: err->${JSON.stringify(err)}`); 2212e41f4b71Sopenharmony_ci}); 2213e41f4b71Sopenharmony_ci``` 2214e41f4b71Sopenharmony_ci 2215e41f4b71Sopenharmony_ci 2216e41f4b71Sopenharmony_ci## radio.getNetworkCapability<sup>10+</sup> 2217e41f4b71Sopenharmony_ci 2218e41f4b71Sopenharmony_cigetNetworkCapability\(slotId: number, type: NetworkCapabilityType, callback: AsyncCallback\<NetworkCapabilityState\>\): void 2219e41f4b71Sopenharmony_ci 2220e41f4b71Sopenharmony_ciObtains the network capability of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 2221e41f4b71Sopenharmony_ci 2222e41f4b71Sopenharmony_ci**System API**: This is a system API. 2223e41f4b71Sopenharmony_ci 2224e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 2225e41f4b71Sopenharmony_ci 2226e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2227e41f4b71Sopenharmony_ci 2228e41f4b71Sopenharmony_ci**Parameters** 2229e41f4b71Sopenharmony_ci 2230e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2231e41f4b71Sopenharmony_ci| -------- | -----------------------------------------------------------------------| ---- | ----------------------------------- | 2232e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2233e41f4b71Sopenharmony_ci| type | [NetworkCapabilityType](#networkcapabilitytype10) | Yes | Network capability type. | 2234e41f4b71Sopenharmony_ci| callback | AsyncCallback\<[NetworkCapabilityState](#networkcapabilitystate10)\> | Yes | Callback used to return the result. | 2235e41f4b71Sopenharmony_ci 2236e41f4b71Sopenharmony_ci**Error codes** 2237e41f4b71Sopenharmony_ci 2238e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2239e41f4b71Sopenharmony_ci 2240e41f4b71Sopenharmony_ci| ID| Error Message | 2241e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2242e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2243e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2244e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2245e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2246e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2247e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2248e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2249e41f4b71Sopenharmony_ci 2250e41f4b71Sopenharmony_ci**Example** 2251e41f4b71Sopenharmony_ci 2252e41f4b71Sopenharmony_ci```ts 2253e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2254e41f4b71Sopenharmony_ci 2255e41f4b71Sopenharmony_cilet slotId: number = 0; 2256e41f4b71Sopenharmony_cilet type: radio.NetworkCapabilityType = radio.NetworkCapabilityType.SERVICE_TYPE_NR; 2257e41f4b71Sopenharmony_ciradio.getNetworkCapability(slotId, type, (err: BusinessError, data: radio.NetworkCapabilityState) => { 2258e41f4b71Sopenharmony_ci if (err) { 2259e41f4b71Sopenharmony_ci console.error(`getNetworkCapability failed, callback: err->${JSON.stringify(err)}`); 2260e41f4b71Sopenharmony_ci return; 2261e41f4b71Sopenharmony_ci } 2262e41f4b71Sopenharmony_ci console.log(`getNetworkCapability success, callback: err->${JSON.stringify(err)}`); 2263e41f4b71Sopenharmony_ci}); 2264e41f4b71Sopenharmony_ci``` 2265e41f4b71Sopenharmony_ci 2266e41f4b71Sopenharmony_ci 2267e41f4b71Sopenharmony_ci## radio.getNetworkCapability<sup>10+</sup> 2268e41f4b71Sopenharmony_ci 2269e41f4b71Sopenharmony_cigetNetworkCapability\(slotId: number, type: NetworkCapabilityType\): Promise\<NetworkCapabilityState\> 2270e41f4b71Sopenharmony_ci 2271e41f4b71Sopenharmony_ciObtains the network capability of the SIM card in the specified slot. This API uses a promise to return the result. 2272e41f4b71Sopenharmony_ci 2273e41f4b71Sopenharmony_ci**System API**: This is a system API. 2274e41f4b71Sopenharmony_ci 2275e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 2276e41f4b71Sopenharmony_ci 2277e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2278e41f4b71Sopenharmony_ci 2279e41f4b71Sopenharmony_ci**Parameters** 2280e41f4b71Sopenharmony_ci 2281e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2282e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------------- | ---- | -------------------------------------- | 2283e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2284e41f4b71Sopenharmony_ci| type | [NetworkCapabilityType](#networkcapabilitytype10) | Yes | Network capability type. | 2285e41f4b71Sopenharmony_ci 2286e41f4b71Sopenharmony_ci**Return value** 2287e41f4b71Sopenharmony_ci 2288e41f4b71Sopenharmony_ci| Type | Description | 2289e41f4b71Sopenharmony_ci| ------------------------------------------------------------- | ----------------------- | 2290e41f4b71Sopenharmony_ci| Promise\<[NetworkCapabilityState](#networkcapabilitystate10)\> | Promise used to return the result.| 2291e41f4b71Sopenharmony_ci 2292e41f4b71Sopenharmony_ci**Error codes** 2293e41f4b71Sopenharmony_ci 2294e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2295e41f4b71Sopenharmony_ci 2296e41f4b71Sopenharmony_ci| ID| Error Message | 2297e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2298e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2299e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2300e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2301e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2302e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2303e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2304e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2305e41f4b71Sopenharmony_ci 2306e41f4b71Sopenharmony_ci**Example** 2307e41f4b71Sopenharmony_ci 2308e41f4b71Sopenharmony_ci```ts 2309e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2310e41f4b71Sopenharmony_ci 2311e41f4b71Sopenharmony_cilet slotId: number = 0; 2312e41f4b71Sopenharmony_cilet type: radio.NetworkCapabilityType = radio.NetworkCapabilityType.SERVICE_TYPE_NR; 2313e41f4b71Sopenharmony_ciradio.getNetworkCapability(slotId, type).then((data: radio.NetworkCapabilityState) => { 2314e41f4b71Sopenharmony_ci console.log(`getNetworkCapability success, promise: data->${JSON.stringify(data)}`); 2315e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2316e41f4b71Sopenharmony_ci console.error(`getNetworkCapability failed, promise: err->${JSON.stringify(err)}`); 2317e41f4b71Sopenharmony_ci}); 2318e41f4b71Sopenharmony_ci``` 2319e41f4b71Sopenharmony_ci 2320e41f4b71Sopenharmony_ci 2321e41f4b71Sopenharmony_ci## radio.setNetworkCapability<sup>10+</sup> 2322e41f4b71Sopenharmony_ci 2323e41f4b71Sopenharmony_cisetNetworkCapability\(slotId: number, type: NetworkCapabilityType, state: NetworkCapabilityState, 2324e41f4b71Sopenharmony_ci callback: AsyncCallback\<void\>\): void 2325e41f4b71Sopenharmony_ci 2326e41f4b71Sopenharmony_ciSets the network capability of the SIM card in the specified slot. This API uses an asynchronous callback to return the result. 2327e41f4b71Sopenharmony_ci 2328e41f4b71Sopenharmony_ci**System API**: This is a system API. 2329e41f4b71Sopenharmony_ci 2330e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2331e41f4b71Sopenharmony_ci 2332e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2333e41f4b71Sopenharmony_ci 2334e41f4b71Sopenharmony_ci**Parameters** 2335e41f4b71Sopenharmony_ci 2336e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2337e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------------- | ---- | -------------------------------------- | 2338e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2339e41f4b71Sopenharmony_ci| type | [NetworkCapabilityType](#networkcapabilitytype10) | Yes | Network capability type. | 2340e41f4b71Sopenharmony_ci| state | [NetworkCapabilityState](#networkcapabilitystate10) | Yes | Network capability status. | 2341e41f4b71Sopenharmony_ci| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. | 2342e41f4b71Sopenharmony_ci 2343e41f4b71Sopenharmony_ci**Error codes** 2344e41f4b71Sopenharmony_ci 2345e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2346e41f4b71Sopenharmony_ci 2347e41f4b71Sopenharmony_ci| ID| Error Message | 2348e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2349e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2350e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2351e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2352e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2353e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2354e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2355e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2356e41f4b71Sopenharmony_ci 2357e41f4b71Sopenharmony_ci**Example** 2358e41f4b71Sopenharmony_ci 2359e41f4b71Sopenharmony_ci```ts 2360e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2361e41f4b71Sopenharmony_ci 2362e41f4b71Sopenharmony_cilet slotId: number = 0; 2363e41f4b71Sopenharmony_cilet type: radio.NetworkCapabilityType = radio.NetworkCapabilityType.SERVICE_TYPE_NR; 2364e41f4b71Sopenharmony_cilet state: radio.NetworkCapabilityState = radio.NetworkCapabilityState.SERVICE_CAPABILITY_ON; 2365e41f4b71Sopenharmony_ciradio.setNetworkCapability(slotId, type, state, (err: BusinessError) => { 2366e41f4b71Sopenharmony_ci if (err) { 2367e41f4b71Sopenharmony_ci console.error(`setNetworkCapability failed, callback: err->${JSON.stringify(err)}`); 2368e41f4b71Sopenharmony_ci return; 2369e41f4b71Sopenharmony_ci } 2370e41f4b71Sopenharmony_ci console.log(`setNetworkCapability success.`); 2371e41f4b71Sopenharmony_ci}); 2372e41f4b71Sopenharmony_ci``` 2373e41f4b71Sopenharmony_ci 2374e41f4b71Sopenharmony_ci 2375e41f4b71Sopenharmony_ci## radio.setNetworkCapability<sup>10+</sup> 2376e41f4b71Sopenharmony_ci 2377e41f4b71Sopenharmony_cisetNetworkCapability\(slotId: number, type: NetworkCapabilityType, state: NetworkCapabilityState\): Promise\<void\> 2378e41f4b71Sopenharmony_ci 2379e41f4b71Sopenharmony_ciSets the network capability of the SIM card in the specified slot. This API uses a promise to return the result. 2380e41f4b71Sopenharmony_ci 2381e41f4b71Sopenharmony_ci**System API**: This is a system API. 2382e41f4b71Sopenharmony_ci 2383e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2384e41f4b71Sopenharmony_ci 2385e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2386e41f4b71Sopenharmony_ci 2387e41f4b71Sopenharmony_ci**Parameters** 2388e41f4b71Sopenharmony_ci 2389e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2390e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------------- | ---- | -------------------------------------- | 2391e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2392e41f4b71Sopenharmony_ci| type | [NetworkCapabilityType](#networkcapabilitytype10) | Yes | Network capability type. | 2393e41f4b71Sopenharmony_ci| state | [NetworkCapabilityState](#networkcapabilitystate10) | Yes | Network capability status. | 2394e41f4b71Sopenharmony_ci 2395e41f4b71Sopenharmony_ci**Return value** 2396e41f4b71Sopenharmony_ci 2397e41f4b71Sopenharmony_ci| Type | Description | 2398e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 2399e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 2400e41f4b71Sopenharmony_ci 2401e41f4b71Sopenharmony_ci**Error codes** 2402e41f4b71Sopenharmony_ci 2403e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2404e41f4b71Sopenharmony_ci 2405e41f4b71Sopenharmony_ci| ID| Error Message | 2406e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2407e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2408e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2409e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2410e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2411e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2412e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2413e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2414e41f4b71Sopenharmony_ci 2415e41f4b71Sopenharmony_ci**Example** 2416e41f4b71Sopenharmony_ci 2417e41f4b71Sopenharmony_ci```ts 2418e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2419e41f4b71Sopenharmony_ci 2420e41f4b71Sopenharmony_cilet slotId: number = 0; 2421e41f4b71Sopenharmony_cilet type: radio.NetworkCapabilityType = radio.NetworkCapabilityType.SERVICE_TYPE_NR; 2422e41f4b71Sopenharmony_cilet state: radio.NetworkCapabilityState = radio.NetworkCapabilityState.SERVICE_CAPABILITY_ON; 2423e41f4b71Sopenharmony_ciradio.setNetworkCapability(slotId, type, state).then(() => { 2424e41f4b71Sopenharmony_ci console.log(`setNetworkCapability success`); 2425e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2426e41f4b71Sopenharmony_ci console.error(`setNetworkCapability failed, promise: err->${JSON.stringify(err)}`); 2427e41f4b71Sopenharmony_ci}); 2428e41f4b71Sopenharmony_ci``` 2429e41f4b71Sopenharmony_ci 2430e41f4b71Sopenharmony_ci## radio.factoryReset<sup>11+</sup> 2431e41f4b71Sopenharmony_ci 2432e41f4b71Sopenharmony_cifactoryReset\(slotId: number\): Promise\<void\> 2433e41f4b71Sopenharmony_ci 2434e41f4b71Sopenharmony_ciRestores the radio service to factory settings. This API uses a promise to return the result. 2435e41f4b71Sopenharmony_ci 2436e41f4b71Sopenharmony_ci**System API**: This is a system API. 2437e41f4b71Sopenharmony_ci 2438e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2439e41f4b71Sopenharmony_ci 2440e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2441e41f4b71Sopenharmony_ci 2442e41f4b71Sopenharmony_ci**Parameters** 2443e41f4b71Sopenharmony_ci 2444e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2445e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------------- | ---- | -------------------------------------- | 2446e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2447e41f4b71Sopenharmony_ci 2448e41f4b71Sopenharmony_ci**Return value** 2449e41f4b71Sopenharmony_ci 2450e41f4b71Sopenharmony_ci| Type | Description | 2451e41f4b71Sopenharmony_ci| --------------- | ----------------------- | 2452e41f4b71Sopenharmony_ci| Promise\<void\> | Promise used to return the result.| 2453e41f4b71Sopenharmony_ci 2454e41f4b71Sopenharmony_ci**Error codes** 2455e41f4b71Sopenharmony_ci 2456e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2457e41f4b71Sopenharmony_ci 2458e41f4b71Sopenharmony_ci| ID| Error Message | 2459e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2460e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2461e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2462e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2463e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2464e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2465e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2466e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2467e41f4b71Sopenharmony_ci 2468e41f4b71Sopenharmony_ci**Example** 2469e41f4b71Sopenharmony_ci 2470e41f4b71Sopenharmony_ci```ts 2471e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2472e41f4b71Sopenharmony_ci 2473e41f4b71Sopenharmony_cilet slotId: number = 0; 2474e41f4b71Sopenharmony_ciradio.factoryReset(slotId).then(() => { 2475e41f4b71Sopenharmony_ci console.log(`factoryReset success`); 2476e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2477e41f4b71Sopenharmony_ci console.error(`factoryReset failed, promise: err->${JSON.stringify(err)}`); 2478e41f4b71Sopenharmony_ci}); 2479e41f4b71Sopenharmony_ci``` 2480e41f4b71Sopenharmony_ci 2481e41f4b71Sopenharmony_ci## radio.getIMEISV<sup>12+</sup> 2482e41f4b71Sopenharmony_ci 2483e41f4b71Sopenharmony_cigetIMEISV\(slotId: number\): string 2484e41f4b71Sopenharmony_ci 2485e41f4b71Sopenharmony_ciObtains the software version of the SIM card in the specified slot. 2486e41f4b71Sopenharmony_ci 2487e41f4b71Sopenharmony_ci**System API**: This is a system API. 2488e41f4b71Sopenharmony_ci 2489e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 2490e41f4b71Sopenharmony_ci 2491e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2492e41f4b71Sopenharmony_ci 2493e41f4b71Sopenharmony_ci**Parameters** 2494e41f4b71Sopenharmony_ci 2495e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 2496e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 2497e41f4b71Sopenharmony_ci| slotId | number | No | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2498e41f4b71Sopenharmony_ci 2499e41f4b71Sopenharmony_ci 2500e41f4b71Sopenharmony_ci**Error codes** 2501e41f4b71Sopenharmony_ci 2502e41f4b71Sopenharmony_ciFor details about the error codes, see[ohos.telephony (Telephony) Error Codes](errorcode-telephony.md). 2503e41f4b71Sopenharmony_ci 2504e41f4b71Sopenharmony_ci| ID| Error Message | 2505e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2506e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2507e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2508e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. | 2509e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2510e41f4b71Sopenharmony_ci| 8300002 | Service connection failed. | 2511e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2512e41f4b71Sopenharmony_ci| 8300999 | Unknown error. | 2513e41f4b71Sopenharmony_ci 2514e41f4b71Sopenharmony_ci**Example** 2515e41f4b71Sopenharmony_ci 2516e41f4b71Sopenharmony_ci```ts 2517e41f4b71Sopenharmony_cilet slotId: number = 0; 2518e41f4b71Sopenharmony_cilet data: string = radio.getIMEISV(slotId); 2519e41f4b71Sopenharmony_ciconsole.log(`IMEISV is:` + data); 2520e41f4b71Sopenharmony_ci``` 2521e41f4b71Sopenharmony_ci 2522e41f4b71Sopenharmony_ci## PreferredNetworkMode<sup>8+</sup> 2523e41f4b71Sopenharmony_ci 2524e41f4b71Sopenharmony_ciEnumerates preferred network modes. 2525e41f4b71Sopenharmony_ci 2526e41f4b71Sopenharmony_ci**System API**: This is a system API. 2527e41f4b71Sopenharmony_ci 2528e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2529e41f4b71Sopenharmony_ci 2530e41f4b71Sopenharmony_ci| Name | Value | Description | 2531e41f4b71Sopenharmony_ci| --------------------------------------------------------- | ---- | --------------------------------------------- | 2532e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_GSM | 1 | GSM network mode. | 2533e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_WCDMA | 2 | WCDMA network mode. | 2534e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE | 3 | LTE network mode. | 2535e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_WCDMA | 4 | LTE+WCDMA network mode. | 2536e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM | 5 | LTE+WCDMA+GSM network mode. | 2537e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_WCDMA_GSM | 6 | WCDMA+GSM network mode. | 2538e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_CDMA | 7 | CDMA network mode. | 2539e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_EVDO | 8 | EVDO network mode. | 2540e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_EVDO_CDMA | 9 | EVDO+CDMA network mode. | 2541e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_WCDMA_GSM_EVDO_CDMA | 10 | WCDMA+GSM+EVDO+CDMA network mode. | 2542e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_EVDO_CDMA | 11 | LTE+EVDO+CDMA network mode. | 2543e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_WCDMA_GSM_EVDO_CDMA | 12 | LTE+WCDMA+GSM+EVDO+CDMA network mode. | 2544e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_TDSCDMA | 13 | TD-SCDMA network mode. | 2545e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_TDSCDMA_GSM | 14 | TD-SCDMA+GSM network mode. | 2546e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA | 15 | TD-SCDMA+WCDMA network mode. | 2547e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM | 16 | TD-SCDMA+WCDMA+GSM network mode. | 2548e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_TDSCDMA | 17 | LTE+TD-SCDMA network mode. | 2549e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_TDSCDMA_GSM | 18 | LTE+TD-SCDMA+GSM network mode. | 2550e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA | 19 | LTE+TD-SCDMA+WCDMA network mode. | 2551e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM | 20 | LTE+TD-SCDMA+WCDMA+GSM network mode. | 2552e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 21 | TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode. | 2553e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 22 | LTE+TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode.| 2554e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR | 31 | NR network mode. | 2555e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE | 32 | NR+LTE network mode. | 2556e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_WCDMA | 33 | NR+LTE+WCDMA network mode. | 2557e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM | 34 | NR+LTE+WCDMA+GSM network mode. | 2558e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_EVDO_CDMA | 35 | NR+LTE+EVDO+CDMA network mode. | 2559e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_WCDMA_GSM_EVDO_CDMA | 36 | NR+LTE+WCDMA+GSM+EVDO+CDMA network mode. | 2560e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA | 37 | NR+LTE+TD-SCDMA network mode. | 2561e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_GSM | 38 | NR+LTE+TD-SCDMA+GSM network mode. | 2562e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA | 39 | NR+LTE+TD-SCDMA+WCDMA network mode. | 2563e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM | 40 | NR+LTE+TD-SCDMA+WCDMA+GSM network mode. | 2564e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA | 41 | NR+LTE+TD-SCDMA+WCDMA+GSM+EVDO+CDMA network mode. | 2565e41f4b71Sopenharmony_ci| PREFERRED_NETWORK_MODE_MAX_VALUE | 99 | Maximum value of the preferred network mode. | 2566e41f4b71Sopenharmony_ci 2567e41f4b71Sopenharmony_ci## CellInformation<sup>8+</sup> 2568e41f4b71Sopenharmony_ci 2569e41f4b71Sopenharmony_ciDefines the cell information. 2570e41f4b71Sopenharmony_ci 2571e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2572e41f4b71Sopenharmony_ci 2573e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2574e41f4b71Sopenharmony_ci| ----------------- | --------------------------------------- | ---- | ------------------------------------------------------------ | 2575e41f4b71Sopenharmony_ci| isCamped | boolean | Yes | Cell status.<br>**System API**: This is a system API. | 2576e41f4b71Sopenharmony_ci| timeStamp | number | Yes | Timestamp when cell information is obtained.<br>**System API**: This is a system API. | 2577e41f4b71Sopenharmony_ci| data | [CdmaCellInformation](#cdmacellinformation8) \| [GsmCellInformation](#gsmcellinformation8) \| [LteCellInformation](#ltecellinformation8) \| [NrCellInformation](#nrcellinformation8) \| [TdscdmaCellInformation](#tdscdmacellinformation8)\|[WcdmaCellInformation](#wcdmacellinformation8) | Yes | CDMA cell information\|GSM cell information\|LTE cell information\|NR cell information\|TD-SCDMA cell information\|WCDMA.<br>**System API**: This is a system API.| 2578e41f4b71Sopenharmony_ci 2579e41f4b71Sopenharmony_ci## CdmaCellInformation<sup>8+</sup> 2580e41f4b71Sopenharmony_ci 2581e41f4b71Sopenharmony_ciDefines the CDMA cell information. 2582e41f4b71Sopenharmony_ci 2583e41f4b71Sopenharmony_ci**System API**: This is a system API. 2584e41f4b71Sopenharmony_ci 2585e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2586e41f4b71Sopenharmony_ci 2587e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2588e41f4b71Sopenharmony_ci| --------- | ------ | ---- | ------------ | 2589e41f4b71Sopenharmony_ci| baseId | number | Yes | Base station ID. | 2590e41f4b71Sopenharmony_ci| latitude | number | Yes | Latitude. | 2591e41f4b71Sopenharmony_ci| longitude | number | Yes | Longitude. | 2592e41f4b71Sopenharmony_ci| nid | number | Yes | Network ID.| 2593e41f4b71Sopenharmony_ci| sid | number | Yes | System ID.| 2594e41f4b71Sopenharmony_ci 2595e41f4b71Sopenharmony_ci## GsmCellInformation<sup>8+</sup> 2596e41f4b71Sopenharmony_ci 2597e41f4b71Sopenharmony_ciDefines the GSM cell information. 2598e41f4b71Sopenharmony_ci 2599e41f4b71Sopenharmony_ci**System API**: This is a system API. 2600e41f4b71Sopenharmony_ci 2601e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2602e41f4b71Sopenharmony_ci 2603e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2604e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------- | 2605e41f4b71Sopenharmony_ci| lac | number | Yes | Location area code. | 2606e41f4b71Sopenharmony_ci| cellId | number | Yes | Cell ID. | 2607e41f4b71Sopenharmony_ci| arfcn | number | Yes | Absolute radio frequency channel number.| 2608e41f4b71Sopenharmony_ci| bsic | number | Yes | Base station ID. | 2609e41f4b71Sopenharmony_ci| mcc | string | Yes | Mobile country code. | 2610e41f4b71Sopenharmony_ci| mnc | string | Yes | Mobile network code. | 2611e41f4b71Sopenharmony_ci 2612e41f4b71Sopenharmony_ci## LteCellInformation<sup>8+</sup> 2613e41f4b71Sopenharmony_ci 2614e41f4b71Sopenharmony_ciLTE cell information. 2615e41f4b71Sopenharmony_ci 2616e41f4b71Sopenharmony_ci**System API**: This is a system API. 2617e41f4b71Sopenharmony_ci 2618e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2619e41f4b71Sopenharmony_ci 2620e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2621e41f4b71Sopenharmony_ci| ------------- | ------- | ---- | ----------------------- | 2622e41f4b71Sopenharmony_ci| cgi | number | Yes | Cell global identification. | 2623e41f4b71Sopenharmony_ci| pci | number | Yes | Physical cell ID. | 2624e41f4b71Sopenharmony_ci| tac | number | Yes | Tracking area code. | 2625e41f4b71Sopenharmony_ci| earfcn | number | Yes | Absolute radio frequency channel number. | 2626e41f4b71Sopenharmony_ci| bandwidth | number | Yes | Bandwidth. | 2627e41f4b71Sopenharmony_ci| mcc | string | Yes | Mobile country code. | 2628e41f4b71Sopenharmony_ci| mnc | string | Yes | Mobile network code. | 2629e41f4b71Sopenharmony_ci| isSupportEndc | boolean | Yes | Whether New Radio Dual Connectivity (NR-DC) is supported.| 2630e41f4b71Sopenharmony_ci 2631e41f4b71Sopenharmony_ci## NrCellInformation<sup>8+</sup> 2632e41f4b71Sopenharmony_ci 2633e41f4b71Sopenharmony_ciDefines the 5G NR cell information. 2634e41f4b71Sopenharmony_ci 2635e41f4b71Sopenharmony_ci**System API**: This is a system API. 2636e41f4b71Sopenharmony_ci 2637e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2638e41f4b71Sopenharmony_ci 2639e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2640e41f4b71Sopenharmony_ci| ------- | ------ | ---- | ---------------- | 2641e41f4b71Sopenharmony_ci| nrArfcn | number | Yes | 5G frequency number. | 2642e41f4b71Sopenharmony_ci| pci | number | Yes | Physical cell ID. | 2643e41f4b71Sopenharmony_ci| tac | number | Yes | Tracking area code. | 2644e41f4b71Sopenharmony_ci| nci | number | Yes | 5G network cell ID.| 2645e41f4b71Sopenharmony_ci| mcc | string | Yes | Mobile country code. | 2646e41f4b71Sopenharmony_ci| mnc | string | Yes | Mobile network code. | 2647e41f4b71Sopenharmony_ci 2648e41f4b71Sopenharmony_ci## TdscdmaCellInformation<sup>8+</sup> 2649e41f4b71Sopenharmony_ci 2650e41f4b71Sopenharmony_ciDefines the TD-SCDMA cell information. 2651e41f4b71Sopenharmony_ci 2652e41f4b71Sopenharmony_ci**System API**: This is a system API. 2653e41f4b71Sopenharmony_ci 2654e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2655e41f4b71Sopenharmony_ci 2656e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2657e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ------------ | 2658e41f4b71Sopenharmony_ci| lac | number | Yes | Location area code.| 2659e41f4b71Sopenharmony_ci| cellId | number | Yes | Cell ID. | 2660e41f4b71Sopenharmony_ci| cpid | number | Yes | Cell parameter ID.| 2661e41f4b71Sopenharmony_ci| uarfcn | number | Yes | Absolute radio frequency number.| 2662e41f4b71Sopenharmony_ci| mcc | string | Yes | Mobile country code.| 2663e41f4b71Sopenharmony_ci| mnc | string | Yes | Mobile network code. | 2664e41f4b71Sopenharmony_ci 2665e41f4b71Sopenharmony_ci## WcdmaCellInformation<sup>8+</sup> 2666e41f4b71Sopenharmony_ci 2667e41f4b71Sopenharmony_ciDefines the WCDMA cell information. 2668e41f4b71Sopenharmony_ci 2669e41f4b71Sopenharmony_ci**System API**: This is a system API. 2670e41f4b71Sopenharmony_ci 2671e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2672e41f4b71Sopenharmony_ci 2673e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2674e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ------------ | 2675e41f4b71Sopenharmony_ci| lac | number | Yes | Location area code.| 2676e41f4b71Sopenharmony_ci| cellId | number | Yes | Cell ID. | 2677e41f4b71Sopenharmony_ci| psc | number | Yes | Primary scrambling code. | 2678e41f4b71Sopenharmony_ci| uarfcn | number | Yes | Absolute radio frequency number.| 2679e41f4b71Sopenharmony_ci| mcc | string | Yes | Mobile country code.| 2680e41f4b71Sopenharmony_ci| mnc | string | Yes | Mobile network code. | 2681e41f4b71Sopenharmony_ci 2682e41f4b71Sopenharmony_ci## NrOptionMode<sup>(deprecated)</sup> 2683e41f4b71Sopenharmony_ci 2684e41f4b71Sopenharmony_ciEnumerates NR selection modes. 2685e41f4b71Sopenharmony_ci 2686e41f4b71Sopenharmony_ci> **NOTE** 2687e41f4b71Sopenharmony_ci> 2688e41f4b71Sopenharmony_ci> This API is supported since API version 8 and deprecated since API version 10. You are advised to use [NROptionMode](#nroptionmode10). 2689e41f4b71Sopenharmony_ci 2690e41f4b71Sopenharmony_ci**System API**: This is a system API. 2691e41f4b71Sopenharmony_ci 2692e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2693e41f4b71Sopenharmony_ci 2694e41f4b71Sopenharmony_ci| Name | Value | Description | 2695e41f4b71Sopenharmony_ci| -------------------- | ---- | ---------------------------------- | 2696e41f4b71Sopenharmony_ci| NR_OPTION_UNKNOWN | 0 | Unknown NR selection mode. | 2697e41f4b71Sopenharmony_ci| NR_OPTION_NSA_ONLY | 1 | NR selection mode in 5G non-standalone networking. | 2698e41f4b71Sopenharmony_ci| NR_OPTION_SA_ONLY | 2 | NR selection mode in 5G non-standalone networking. | 2699e41f4b71Sopenharmony_ci| NR_OPTION_NSA_AND_SA | 3 | NR selection mode in non-standalone and standalone networking.| 2700e41f4b71Sopenharmony_ci 2701e41f4b71Sopenharmony_ci## NROptionMode<sup>10+</sup> 2702e41f4b71Sopenharmony_ci 2703e41f4b71Sopenharmony_ciEnumerates NR selection modes. 2704e41f4b71Sopenharmony_ci 2705e41f4b71Sopenharmony_ci**System API**: This is a system API. 2706e41f4b71Sopenharmony_ci 2707e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2708e41f4b71Sopenharmony_ci 2709e41f4b71Sopenharmony_ci| Name | Value | Description | 2710e41f4b71Sopenharmony_ci| -------------------- | ---- | --------------------------------- | 2711e41f4b71Sopenharmony_ci| NR_OPTION_UNKNOWN | 0 | Unknown NR selection mode. | 2712e41f4b71Sopenharmony_ci| NR_OPTION_NSA_ONLY | 1 | NR selection mode in 5G non-standalone networking. | 2713e41f4b71Sopenharmony_ci| NR_OPTION_SA_ONLY | 2 | NR selection mode in 5G non-standalone networking. | 2714e41f4b71Sopenharmony_ci| NR_OPTION_NSA_AND_SA | 3 | NR selection mode in non-standalone and standalone networking. | 2715e41f4b71Sopenharmony_ci 2716e41f4b71Sopenharmony_ci## NetworkSearchResult 2717e41f4b71Sopenharmony_ci 2718e41f4b71Sopenharmony_ciDefines the network search result. 2719e41f4b71Sopenharmony_ci 2720e41f4b71Sopenharmony_ci**System API**: This is a system API. 2721e41f4b71Sopenharmony_ci 2722e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2723e41f4b71Sopenharmony_ci 2724e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2725e41f4b71Sopenharmony_ci| ---------------------- | ------------------------------------------------- | ---- | -------------- | 2726e41f4b71Sopenharmony_ci| isNetworkSearchSuccess | boolean | Yes | Successful network search.| 2727e41f4b71Sopenharmony_ci| networkSearchResult | Array<[NetworkInformation](#networkinformation)\> | Yes | Network search result.| 2728e41f4b71Sopenharmony_ci 2729e41f4b71Sopenharmony_ci## NetworkInformation 2730e41f4b71Sopenharmony_ci 2731e41f4b71Sopenharmony_ciDefines the network information. 2732e41f4b71Sopenharmony_ci 2733e41f4b71Sopenharmony_ci**System API**: This is a system API. 2734e41f4b71Sopenharmony_ci 2735e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2736e41f4b71Sopenharmony_ci 2737e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2738e41f4b71Sopenharmony_ci| --------------- | --------------------------------------------------- | ---- | -------------- | 2739e41f4b71Sopenharmony_ci| operatorName | string | Yes | Carrier name.| 2740e41f4b71Sopenharmony_ci| operatorNumeric | string | Yes | Carrier number. | 2741e41f4b71Sopenharmony_ci| state | [NetworkInformationState](#networkinformationstate) | Yes | Network information status.| 2742e41f4b71Sopenharmony_ci| radioTech | string | Yes | Radio access technology. | 2743e41f4b71Sopenharmony_ci 2744e41f4b71Sopenharmony_ci## NetworkInformationState 2745e41f4b71Sopenharmony_ci 2746e41f4b71Sopenharmony_ciEnumerates network information states. 2747e41f4b71Sopenharmony_ci 2748e41f4b71Sopenharmony_ci**System API**: This is a system API. 2749e41f4b71Sopenharmony_ci 2750e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2751e41f4b71Sopenharmony_ci 2752e41f4b71Sopenharmony_ci| Name | Value | Description | 2753e41f4b71Sopenharmony_ci| ----------------- | ---- | ---------------- | 2754e41f4b71Sopenharmony_ci| NETWORK_UNKNOWN | 0 | Unknown state. | 2755e41f4b71Sopenharmony_ci| NETWORK_AVAILABLE | 1 | Available for registration.| 2756e41f4b71Sopenharmony_ci| NETWORK_CURRENT | 2 | Registered state.| 2757e41f4b71Sopenharmony_ci| NETWORK_FORBIDDEN | 3 | Unavailable for registration. | 2758e41f4b71Sopenharmony_ci 2759e41f4b71Sopenharmony_ci## NetworkSelectionModeOptions 2760e41f4b71Sopenharmony_ci 2761e41f4b71Sopenharmony_ciDefines the network selection mode. 2762e41f4b71Sopenharmony_ci 2763e41f4b71Sopenharmony_ci**System API**: This is a system API. 2764e41f4b71Sopenharmony_ci 2765e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2766e41f4b71Sopenharmony_ci 2767e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2768e41f4b71Sopenharmony_ci| ------------------ | --------------------------------------------- | ---- | -------------------------------------- | 2769e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2770e41f4b71Sopenharmony_ci| selectMode | [NetworkSelectionMode](js-apis-radio.md#networkselectionmode) | Yes | Network selection mode. | 2771e41f4b71Sopenharmony_ci| networkInformation | [NetworkInformation](#networkinformation) | Yes | Network information. | 2772e41f4b71Sopenharmony_ci| resumeSelection | boolean | Yes | Whether to resume selection. | 2773e41f4b71Sopenharmony_ci 2774e41f4b71Sopenharmony_ci## ImsRegState<sup>9+</sup> 2775e41f4b71Sopenharmony_ci 2776e41f4b71Sopenharmony_ciEnumerates IMS registration states. 2777e41f4b71Sopenharmony_ci 2778e41f4b71Sopenharmony_ci**System API**: This is a system API. 2779e41f4b71Sopenharmony_ci 2780e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2781e41f4b71Sopenharmony_ci 2782e41f4b71Sopenharmony_ci| Name | Value | Description | 2783e41f4b71Sopenharmony_ci| ---------------- | ---- | -------- | 2784e41f4b71Sopenharmony_ci| IMS_UNREGISTERED | 0 | Not registered.| 2785e41f4b71Sopenharmony_ci| IMS_REGISTERED | 1 | Registered.| 2786e41f4b71Sopenharmony_ci 2787e41f4b71Sopenharmony_ci## ImsRegTech<sup>9+</sup> 2788e41f4b71Sopenharmony_ci 2789e41f4b71Sopenharmony_ciEnumerates IMS registration technologies. 2790e41f4b71Sopenharmony_ci 2791e41f4b71Sopenharmony_ci**System API**: This is a system API. 2792e41f4b71Sopenharmony_ci 2793e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2794e41f4b71Sopenharmony_ci 2795e41f4b71Sopenharmony_ci| Name | Value | Description | 2796e41f4b71Sopenharmony_ci| ----------------------- | ---- | --------------- | 2797e41f4b71Sopenharmony_ci| REGISTRATION_TECH_NONE | 0 | None. | 2798e41f4b71Sopenharmony_ci| REGISTRATION_TECH_LTE | 1 | LTE. | 2799e41f4b71Sopenharmony_ci| REGISTRATION_TECH_IWLAN | 2 | I-WLAN.| 2800e41f4b71Sopenharmony_ci| REGISTRATION_TECH_NR | 3 | NR. | 2801e41f4b71Sopenharmony_ci 2802e41f4b71Sopenharmony_ci## ImsRegInfo<sup>9+</sup> 2803e41f4b71Sopenharmony_ci 2804e41f4b71Sopenharmony_ciDefines the IMS registration information. 2805e41f4b71Sopenharmony_ci 2806e41f4b71Sopenharmony_ci**System API**: This is a system API. 2807e41f4b71Sopenharmony_ci 2808e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2809e41f4b71Sopenharmony_ci 2810e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2811e41f4b71Sopenharmony_ci| ----------- | ---------------------------- | ---- | ------------- | 2812e41f4b71Sopenharmony_ci| imsRegState | [ImsRegState](#imsregstate9) | Yes | IMS registration state.| 2813e41f4b71Sopenharmony_ci| imsRegTech | [ImsRegTech](#imsregtech9) | Yes | IMS registration technology.| 2814e41f4b71Sopenharmony_ci 2815e41f4b71Sopenharmony_ci## ImsServiceType<sup>9+</sup> 2816e41f4b71Sopenharmony_ci 2817e41f4b71Sopenharmony_ciEnumerates IMS service types. 2818e41f4b71Sopenharmony_ci 2819e41f4b71Sopenharmony_ci**System API**: This is a system API. 2820e41f4b71Sopenharmony_ci 2821e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2822e41f4b71Sopenharmony_ci 2823e41f4b71Sopenharmony_ci| Name | Value | Description | 2824e41f4b71Sopenharmony_ci| ---------- | ---- | ---------- | 2825e41f4b71Sopenharmony_ci| TYPE_VOICE | 0 | Voice service.| 2826e41f4b71Sopenharmony_ci| TYPE_VIDEO | 1 | Video service.| 2827e41f4b71Sopenharmony_ci| TYPE_UT | 2 | UT service. | 2828e41f4b71Sopenharmony_ci| TYPE_SMS | 3 | SMS service.| 2829e41f4b71Sopenharmony_ci 2830e41f4b71Sopenharmony_ci## NetworkCapabilityType<sup>10+</sup> 2831e41f4b71Sopenharmony_ci 2832e41f4b71Sopenharmony_ciEnumerates network capability types. 2833e41f4b71Sopenharmony_ci 2834e41f4b71Sopenharmony_ci**System API**: This is a system API. 2835e41f4b71Sopenharmony_ci 2836e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2837e41f4b71Sopenharmony_ci 2838e41f4b71Sopenharmony_ci| Name | Value | Description | 2839e41f4b71Sopenharmony_ci| -----------------| ---- | ---------- | 2840e41f4b71Sopenharmony_ci| SERVICE_TYPE_LTE | 0 | LTE service.| 2841e41f4b71Sopenharmony_ci| SERVICE_TYPE_NR | 1 | NR service.| 2842e41f4b71Sopenharmony_ci 2843e41f4b71Sopenharmony_ci## NetworkCapabilityState<sup>10+</sup> 2844e41f4b71Sopenharmony_ci 2845e41f4b71Sopenharmony_ciDefines the network capability switch status. 2846e41f4b71Sopenharmony_ci 2847e41f4b71Sopenharmony_ci**System API**: This is a system API. 2848e41f4b71Sopenharmony_ci 2849e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CoreService 2850e41f4b71Sopenharmony_ci 2851e41f4b71Sopenharmony_ci| Name | Value | Description | 2852e41f4b71Sopenharmony_ci| -----------------------| ---- | ---------- | 2853e41f4b71Sopenharmony_ci| SERVICE_CAPABILITY_OFF | 0 | The network capability is disabled.| 2854e41f4b71Sopenharmony_ci| SERVICE_CAPABILITY_ON | 1 | The network capability is enabled.| 2855