1# Telephony Subsystem Changelog
2
3
4
5## cl.telephony.radio.1 isNrSupported API Change
6
7
8NR is a proper noun and must be capitalized.
9
10You need to adapt your application.
11
12
13
14**Change Impact**
15
16The JS API needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected.
17
18
19
20**Key API/Component Changes**
21
22- Involved APIs:
23
24  isNrSupported(): boolean;
25  isNrSupported(slotId: number): boolean;
26
27- Before change:
28
29```js
30function isNrSupported(): boolean;
31function isNrSupported(slotId: number): boolean;
32```
33
34- After change:
35
36```js
37function isNRSupported(): boolean;
38function isNRSupported(slotId: number): boolean;
39```
40
41
42
43**Adaptation Guide**
44
45Use the new API. The sample code is as follows:
46
47```js
48let result = radio.isNrSupported();
49console.log("Result: "+ result);
50```
51
52
53```js
54let slotId = 0;
55let result = radio.isNRSupported(slotId);
56console.log("Result: "+ result);
57```
58
59
60## cl.telephony.call.2 dial API Change
61
62Changed the `dial` API to the `dialCall` API in the call module of the telephony subsystem since API version 9.
63
64You need to adapt your application.
65
66
67**Change Impact**
68
69The `dial` API is deprecated and cannot be used anymore. Use the `dialCall` API instead. Otherwise, relevant functions will be affected.
70
71
72**Key API/Component Changes**
73
74- Involved APIs:
75
76  dial(phoneNumber: string, callback: AsyncCallback<boolean>): void;
77  dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean>): void;
78  dial(phoneNumber: string, options?: DialOptions): Promise<boolean>;
79
80- Before change:
81
82```js
83function dial(phoneNumber: string, callback: AsyncCallback<boolean>): void;
84function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean>): void;
85function dial(phoneNumber: string, options?: DialOptions): Promise<boolean>;
86```
87
88- After change:
89
90```js
91function dialCall(phoneNumber: string, callback: AsyncCallback<void>): void;
92function dialCall(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback<void>): void;
93function dialCall(phoneNumber: string, options?: DialCallOptions): Promise<void>;
94```
95
96
97
98**Adaptation Guide**
99
100The `dial` API is deprecated and cannot be used anymore. Use the `dialCall` API instead.
101Use the new API. The sample code is as follows:
102
103```js
104call.dialCall("138xxxxxxxx", (err, data) => {
105    console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
106});
107```
108
109
110```js
111call.dialCall("138xxxxxxxx", {
112    accountId: 0,
113    videoState: 0,
114    dialScene: 0,
115    dialType: 0,
116}, (err, data) => {
117    console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
118});
119```
120
121
122```js
123try {
124    call.dialCall('138xxxxxxxx');
125    console.log(`dialCall success, promise: data->${JSON.stringify(data)}`);
126} catch (error) {
127    console.log(`dialCall fail, promise: err->${JSON.stringify(error)}`);
128}
129```
130