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