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