提交 fb83ca40 编写于 作者: S SubmarinePhantom

doc js doc整改

Signed-off-by: NSubmarinePhantom <liuxiyao223@huawei.com>
上级 ef7b036a
...@@ -16,7 +16,7 @@ import call from '@ohos.telephony.call'; ...@@ -16,7 +16,7 @@ import call from '@ohos.telephony.call';
## call.dialCall<sup>9+</sup> ## call.dialCall<sup>9+</sup>
dialCall\(phoneNumber: string, callback: AsyncCallback<void\>\): void dialCall\(phoneNumber: string, callback: AsyncCallback\<void\>\): void
拨打电话。使用callback异步回调。 拨打电话。使用callback异步回调。
...@@ -35,11 +35,12 @@ dialCall\(phoneNumber: string, callback: AsyncCallback<void\>\): void ...@@ -35,11 +35,12 @@ dialCall\(phoneNumber: string, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -57,7 +58,7 @@ call.dialCall("138xxxxxxxx", (err) => { ...@@ -57,7 +58,7 @@ call.dialCall("138xxxxxxxx", (err) => {
## call.dialCall<sup>9+</sup> ## call.dialCall<sup>9+</sup>
dialCall\(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback<void\>\): void dialCall\(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback\<void\>\): void
拨打电话,可设置通话参数。使用callback异步回调。 拨打电话,可设置通话参数。使用callback异步回调。
...@@ -77,11 +78,12 @@ dialCall\(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback ...@@ -77,11 +78,12 @@ dialCall\(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -104,7 +106,7 @@ call.dialCall("138xxxxxxxx", { ...@@ -104,7 +106,7 @@ call.dialCall("138xxxxxxxx", {
## call.dialCall<sup>9+</sup> ## call.dialCall<sup>9+</sup>
dialCall\(phoneNumber: string, options?: DialCallOptions\): Promise<void\> dialCall\(phoneNumber: string, options?: DialCallOptions\): Promise\<void\>
拨打电话,可设置通话参数。使用Promise异步回调。 拨打电话,可设置通话参数。使用Promise异步回调。
...@@ -129,11 +131,12 @@ dialCall\(phoneNumber: string, options?: DialCallOptions\): Promise<void\> ...@@ -129,11 +131,12 @@ dialCall\(phoneNumber: string, options?: DialCallOptions\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -158,7 +161,7 @@ promise.then(() => { ...@@ -158,7 +161,7 @@ promise.then(() => {
## call.dial<sup>(deprecated)</sup> ## call.dial<sup>(deprecated)</sup>
dial\(phoneNumber: string, callback: AsyncCallback<boolean\>\): void dial\(phoneNumber: string, callback: AsyncCallback\<boolean\>\): void
拨打电话。使用callback异步回调。 拨打电话。使用callback异步回调。
...@@ -188,7 +191,7 @@ call.dial("138xxxxxxxx", (err, data) => { ...@@ -188,7 +191,7 @@ call.dial("138xxxxxxxx", (err, data) => {
## call.dial<sup>(deprecated)</sup> ## call.dial<sup>(deprecated)</sup>
dial\(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean\>\): void dial\(phoneNumber: string, options: DialOptions, callback: AsyncCallback\<boolean\>\): void
拨打电话,可设置通话参数。使用callback异步回调。 拨打电话,可设置通话参数。使用callback异步回调。
...@@ -220,7 +223,7 @@ call.dial("138xxxxxxxx", { ...@@ -220,7 +223,7 @@ call.dial("138xxxxxxxx", {
## call.dial<sup>(deprecated)</sup> ## call.dial<sup>(deprecated)</sup>
dial\(phoneNumber: string, options?: DialOptions\): Promise<boolean\> dial\(phoneNumber: string, options?: DialOptions\): Promise\<boolean\>
拨打电话,可设置通话参数。使用Promise异步回调。 拨打电话,可设置通话参数。使用Promise异步回调。
...@@ -260,7 +263,7 @@ promise.then(data => { ...@@ -260,7 +263,7 @@ promise.then(data => {
## call.makeCall<sup>7+</sup> ## call.makeCall<sup>7+</sup>
makeCall(phoneNumber: string, callback: AsyncCallback\<void\>): void makeCall\(phoneNumber: string, callback: AsyncCallback\<void\>\): void
跳转到拨号界面,并显示待拨出的号码。使用callback异步回调。 跳转到拨号界面,并显示待拨出的号码。使用callback异步回调。
...@@ -275,7 +278,7 @@ makeCall(phoneNumber: string, callback: AsyncCallback\<void\>): void ...@@ -275,7 +278,7 @@ makeCall(phoneNumber: string, callback: AsyncCallback\<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -296,7 +299,7 @@ call.makeCall("138xxxxxxxx", err => { ...@@ -296,7 +299,7 @@ call.makeCall("138xxxxxxxx", err => {
## call.makeCall<sup>7+</sup> ## call.makeCall<sup>7+</sup>
makeCall(phoneNumber: string): Promise\<void\> makeCall\(phoneNumber: string\): Promise\<void\>
跳转到拨号界面,并显示待拨出的号码。使用Promise异步回调。 跳转到拨号界面,并显示待拨出的号码。使用Promise异步回调。
...@@ -316,7 +319,7 @@ makeCall(phoneNumber: string): Promise\<void\> ...@@ -316,7 +319,7 @@ makeCall(phoneNumber: string): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -339,7 +342,7 @@ promise.then(() => { ...@@ -339,7 +342,7 @@ promise.then(() => {
## call.hasCall ## call.hasCall
hasCall\(callback: AsyncCallback<boolean\>\): void hasCall\(callback: AsyncCallback\<boolean\>\): void
判断是否存在通话。使用callback异步回调。 判断是否存在通话。使用callback异步回调。
...@@ -362,7 +365,7 @@ call.hasCall((err, data) => { ...@@ -362,7 +365,7 @@ call.hasCall((err, data) => {
## call.hasCall ## call.hasCall
hasCall\(\): Promise<boolean\> hasCall\(\): Promise\<boolean\>
判断是否存在通话。使用Promise异步回调。 判断是否存在通话。使用Promise异步回调。
...@@ -388,7 +391,7 @@ promise.then(data => { ...@@ -388,7 +391,7 @@ promise.then(data => {
## call.getCallState ## call.getCallState
getCallState\(callback: AsyncCallback<CallState\>\): void getCallState\(callback: AsyncCallback\<CallState\>\): void
获取当前通话状态。使用callback异步回调。 获取当前通话状态。使用callback异步回调。
...@@ -411,7 +414,7 @@ call.getCallState((err, data) => { ...@@ -411,7 +414,7 @@ call.getCallState((err, data) => {
## call.getCallState ## call.getCallState
getCallState\(\): Promise<CallState\> getCallState\(\): Promise\<CallState\>
获取当前通话状态。使用Promise异步回调。 获取当前通话状态。使用Promise异步回调。
...@@ -436,7 +439,7 @@ promise.then(data => { ...@@ -436,7 +439,7 @@ promise.then(data => {
## call.hasVoiceCapability<sup>7+</sup> ## call.hasVoiceCapability<sup>7+</sup>
hasVoiceCapability(): boolean hasVoiceCapability\(\): boolean
检查当前设备是否具备语音通话能力。 检查当前设备是否具备语音通话能力。
...@@ -455,7 +458,7 @@ console.log(`hasVoiceCapability: ${JSON.stringify(result)}`); ...@@ -455,7 +458,7 @@ console.log(`hasVoiceCapability: ${JSON.stringify(result)}`);
## call.isEmergencyPhoneNumber<sup>7+</sup> ## call.isEmergencyPhoneNumber<sup>7+</sup>
isEmergencyPhoneNumber\(phoneNumber: string, callback: AsyncCallback<boolean\>\): void isEmergencyPhoneNumber\(phoneNumber: string, callback: AsyncCallback\<boolean\>\): void
判断是否是紧急电话号码。使用callback异步回调。 判断是否是紧急电话号码。使用callback异步回调。
...@@ -470,7 +473,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, callback: AsyncCallback<boolean\>\) ...@@ -470,7 +473,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, callback: AsyncCallback<boolean\>\)
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -491,7 +494,7 @@ call.isEmergencyPhoneNumber("138xxxxxxxx", (err, data) => { ...@@ -491,7 +494,7 @@ call.isEmergencyPhoneNumber("138xxxxxxxx", (err, data) => {
## call.isEmergencyPhoneNumber<sup>7+</sup> ## call.isEmergencyPhoneNumber<sup>7+</sup>
isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback<boolean\>\): void isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback\<boolean\>\): void
根据电话号码参数,判断是否是紧急电话号码。使用callback异步回调。 根据电话号码参数,判断是否是紧急电话号码。使用callback异步回调。
...@@ -507,7 +510,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, ca ...@@ -507,7 +510,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, ca
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -528,7 +531,7 @@ call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, data) => { ...@@ -528,7 +531,7 @@ call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, data) => {
## call.isEmergencyPhoneNumber<sup>7+</sup> ## call.isEmergencyPhoneNumber<sup>7+</sup>
isEmergencyPhoneNumber\(phoneNumber: string, options?: EmergencyNumberOptions\): Promise<boolean\> isEmergencyPhoneNumber\(phoneNumber: string, options?: EmergencyNumberOptions\): Promise\<boolean\>
根据电话号码参数,判断是否是紧急电话号码。使用Promise异步回调。 根据电话号码参数,判断是否是紧急电话号码。使用Promise异步回调。
...@@ -549,7 +552,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options?: EmergencyNumberOptions\): ...@@ -549,7 +552,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options?: EmergencyNumberOptions\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -572,7 +575,7 @@ promise.then(data => { ...@@ -572,7 +575,7 @@ promise.then(data => {
## call.formatPhoneNumber<sup>7+</sup> ## call.formatPhoneNumber<sup>7+</sup>
formatPhoneNumber\(phoneNumber: string, callback: AsyncCallback<string\>\): void formatPhoneNumber\(phoneNumber: string, callback: AsyncCallback\<string\>\): void
格式化电话号码。使用callback异步回调。 格式化电话号码。使用callback异步回调。
...@@ -589,7 +592,7 @@ formatPhoneNumber\(phoneNumber: string, callback: AsyncCallback<string\>\): void ...@@ -589,7 +592,7 @@ formatPhoneNumber\(phoneNumber: string, callback: AsyncCallback<string\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -609,7 +612,7 @@ call.formatPhoneNumber("138xxxxxxxx", (err, data) => { ...@@ -609,7 +612,7 @@ call.formatPhoneNumber("138xxxxxxxx", (err, data) => {
## call.formatPhoneNumber<sup>7+</sup> ## call.formatPhoneNumber<sup>7+</sup>
formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback<string\>\): void formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback\<string\>\): void
格式化电话号码,可设置格式化参数。使用callback异步回调。 格式化电话号码,可设置格式化参数。使用callback异步回调。
...@@ -627,7 +630,7 @@ formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback: ...@@ -627,7 +630,7 @@ formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback:
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -650,7 +653,7 @@ call.formatPhoneNumber("138xxxxxxxx", { ...@@ -650,7 +653,7 @@ call.formatPhoneNumber("138xxxxxxxx", {
## call.formatPhoneNumber<sup>7+</sup> ## call.formatPhoneNumber<sup>7+</sup>
formatPhoneNumber\(phoneNumber: string, options?: NumberFormatOptions\): Promise<string\> formatPhoneNumber\(phoneNumber: string, options?: NumberFormatOptions\): Promise\<string\>
格式化电话号码,可设置格式化参数。使用Promise异步回调。 格式化电话号码,可设置格式化参数。使用Promise异步回调。
...@@ -673,7 +676,7 @@ formatPhoneNumber\(phoneNumber: string, options?: NumberFormatOptions\): Promise ...@@ -673,7 +676,7 @@ formatPhoneNumber\(phoneNumber: string, options?: NumberFormatOptions\): Promise
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -698,7 +701,7 @@ promise.then(data => { ...@@ -698,7 +701,7 @@ promise.then(data => {
## call.formatPhoneNumberToE164<sup>7+</sup> ## call.formatPhoneNumberToE164<sup>7+</sup>
formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: AsyncCallback<string\>\): void formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: AsyncCallback\<string\>\): void
将电话号码格式化为E.164表示形式。使用callback异步回调。 将电话号码格式化为E.164表示形式。使用callback异步回调。
...@@ -716,7 +719,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: Asy ...@@ -716,7 +719,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: Asy
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -737,7 +740,7 @@ call.formatPhoneNumberToE164("138xxxxxxxx", "CN", (err, data) => { ...@@ -737,7 +740,7 @@ call.formatPhoneNumberToE164("138xxxxxxxx", "CN", (err, data) => {
## call.formatPhoneNumberToE164<sup>7+</sup> ## call.formatPhoneNumberToE164<sup>7+</sup>
formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<string\> formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise\<string\>
将电话号码格式化为E.164表示形式。使用Promise异步回调。 将电话号码格式化为E.164表示形式。使用Promise异步回调。
...@@ -762,7 +765,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<str ...@@ -762,7 +765,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<str
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -785,7 +788,7 @@ promise.then(data => { ...@@ -785,7 +788,7 @@ promise.then(data => {
## call.muteRinger<sup>8+</sup> ## call.muteRinger<sup>8+</sup>
muteRinger\(callback: AsyncCallback<void\>\): void muteRinger\(callback: AsyncCallback\<void\>\): void
如果来电铃声响起,设备将停止铃声。否则,此方法不起作用。使用callback异步回调。 如果来电铃声响起,设备将停止铃声。否则,此方法不起作用。使用callback异步回调。
...@@ -803,11 +806,12 @@ muteRinger\(callback: AsyncCallback<void\>\): void ...@@ -803,11 +806,12 @@ muteRinger\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -825,7 +829,7 @@ call.muteRinger((err) => { ...@@ -825,7 +829,7 @@ call.muteRinger((err) => {
## call.muteRinger<sup>8+</sup> ## call.muteRinger<sup>8+</sup>
muteRinger\(\): Promise<void\> muteRinger\(\): Promise\<void\>
如果来电铃声响起,设备将停止铃声。否则,此方法不起作用。使用Promise异步回调。 如果来电铃声响起,设备将停止铃声。否则,此方法不起作用。使用Promise异步回调。
...@@ -843,11 +847,12 @@ muteRinger\(\): Promise<void\> ...@@ -843,11 +847,12 @@ muteRinger\(\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -865,7 +870,7 @@ call.muteRinger().then(() => { ...@@ -865,7 +870,7 @@ call.muteRinger().then(() => {
## call.answerCall<sup>9+</sup> ## call.answerCall<sup>9+</sup>
answerCall\(callId: number, callback: AsyncCallback<void\>\): void answerCall\(callId: number, callback: AsyncCallback\<void\>\): void
接听来电。使用callback异步回调。 接听来电。使用callback异步回调。
...@@ -884,11 +889,12 @@ answerCall\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -884,11 +889,12 @@ answerCall\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -906,7 +912,7 @@ call.answerCall(1, (err) => { ...@@ -906,7 +912,7 @@ call.answerCall(1, (err) => {
## call.answerCall<sup>9+</sup> ## call.answerCall<sup>9+</sup>
answerCall(callId?: number\): Promise<void\> answerCall(callId?: number\): Promise\<void\>
接听来电。使用Promise异步回调。 接听来电。使用Promise异步回调。
...@@ -930,11 +936,12 @@ answerCall(callId?: number\): Promise<void\> ...@@ -930,11 +936,12 @@ answerCall(callId?: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -954,7 +961,7 @@ call.answerCall(1).then(() => { ...@@ -954,7 +961,7 @@ call.answerCall(1).then(() => {
## call.answerCall<sup>9+</sup> ## call.answerCall<sup>9+</sup>
answerCall\(callback: AsyncCallback<void\>\): void answerCall\(callback: AsyncCallback\<void\>\): void
接听来电。使用callback异步回调。 接听来电。使用callback异步回调。
...@@ -972,11 +979,12 @@ answerCall\(callback: AsyncCallback<void\>\): void ...@@ -972,11 +979,12 @@ answerCall\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -994,7 +1002,7 @@ call.answerCall((err) => { ...@@ -994,7 +1002,7 @@ call.answerCall((err) => {
## call.hangUpCall<sup>9+</sup> ## call.hangUpCall<sup>9+</sup>
hangUpCall\(callId: number, callback: AsyncCallback<void\>\): void hangUpCall\(callId: number, callback: AsyncCallback\<void\>\): void
挂断电话。使用callback异步回调。 挂断电话。使用callback异步回调。
...@@ -1013,11 +1021,12 @@ hangUpCall\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -1013,11 +1021,12 @@ hangUpCall\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1035,7 +1044,7 @@ call.hangUpCall(1, (err) => { ...@@ -1035,7 +1044,7 @@ call.hangUpCall(1, (err) => {
## call.hangUpCall<sup>9+</sup> ## call.hangUpCall<sup>9+</sup>
hangUpCall\(callId?: number\): Promise<void\> hangUpCall\(callId?: number\): Promise\<void\>
挂断电话。使用Promise异步回调。 挂断电话。使用Promise异步回调。
...@@ -1059,11 +1068,12 @@ hangUpCall\(callId?: number\): Promise<void\> ...@@ -1059,11 +1068,12 @@ hangUpCall\(callId?: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1083,7 +1093,7 @@ call.hangUpCall(1).then(() => { ...@@ -1083,7 +1093,7 @@ call.hangUpCall(1).then(() => {
## call.hangUpCall<sup>9+</sup> ## call.hangUpCall<sup>9+</sup>
hangUpCall\(callback: AsyncCallback<void\>\): void hangUpCall\(callback: AsyncCallback\<void\>\): void
挂断电话。使用callback异步回调。 挂断电话。使用callback异步回调。
...@@ -1101,11 +1111,12 @@ hangUpCall\(callback: AsyncCallback<void\>\): void ...@@ -1101,11 +1111,12 @@ hangUpCall\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1124,7 +1135,7 @@ call.hangUpCall((err) => { ...@@ -1124,7 +1135,7 @@ call.hangUpCall((err) => {
## call.rejectCall<sup>9+</sup> ## call.rejectCall<sup>9+</sup>
rejectCall(callId: number, callback: AsyncCallback\<void>): void rejectCall\(callId: number, callback: AsyncCallback\<void\>\): void
拒绝来电。使用callback异步回调。 拒绝来电。使用callback异步回调。
...@@ -1143,11 +1154,12 @@ rejectCall(callId: number, callback: AsyncCallback\<void>): void ...@@ -1143,11 +1154,12 @@ rejectCall(callId: number, callback: AsyncCallback\<void>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1166,7 +1178,7 @@ call.rejectCall(1, (err) => { ...@@ -1166,7 +1178,7 @@ call.rejectCall(1, (err) => {
## call.rejectCall<sup>9+</sup> ## call.rejectCall<sup>9+</sup>
rejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallback<void\>\): void rejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallback\<void\>\): void
拒绝来电。使用callback异步回调。 拒绝来电。使用callback异步回调。
...@@ -1186,11 +1198,12 @@ rejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallba ...@@ -1186,11 +1198,12 @@ rejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallba
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1211,7 +1224,7 @@ call.rejectCall(1, rejectMessageOptions, (err) => { ...@@ -1211,7 +1224,7 @@ call.rejectCall(1, rejectMessageOptions, (err) => {
## call.rejectCall<sup>9+</sup> ## call.rejectCall<sup>9+</sup>
rejectCall(callId?: number, options?: RejectMessageOptions\): Promise<void\> rejectCall\(callId?: number, options?: RejectMessageOptions\): Promise\<void\>
拒绝来电。使用Promise异步回调。 拒绝来电。使用Promise异步回调。
...@@ -1236,11 +1249,12 @@ rejectCall(callId?: number, options?: RejectMessageOptions\): Promise<void\> ...@@ -1236,11 +1249,12 @@ rejectCall(callId?: number, options?: RejectMessageOptions\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1263,7 +1277,7 @@ call.reject(1, rejectMessageOptions).then(() => { ...@@ -1263,7 +1277,7 @@ call.reject(1, rejectMessageOptions).then(() => {
## call.rejectCall<sup>9+</sup> ## call.rejectCall<sup>9+</sup>
rejectCall\(callback: AsyncCallback<void\>\): void rejectCall\(callback: AsyncCallback\<void\>\): void
拒绝来电。使用callback异步回调。 拒绝来电。使用callback异步回调。
...@@ -1281,11 +1295,12 @@ rejectCall\(callback: AsyncCallback<void\>\): void ...@@ -1281,11 +1295,12 @@ rejectCall\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1303,7 +1318,7 @@ call.rejectCall((err) => { ...@@ -1303,7 +1318,7 @@ call.rejectCall((err) => {
## call.rejectCall<sup>9+</sup> ## call.rejectCall<sup>9+</sup>
rejectCall\(options: RejectMessageOptions, callback: AsyncCallback<void\>\): void rejectCall\(options: RejectMessageOptions, callback: AsyncCallback\<void\>\): void
拒绝来电。使用callback异步回调。 拒绝来电。使用callback异步回调。
...@@ -1322,11 +1337,12 @@ rejectCall\(options: RejectMessageOptions, callback: AsyncCallback<void\>\): voi ...@@ -1322,11 +1337,12 @@ rejectCall\(options: RejectMessageOptions, callback: AsyncCallback<void\>\): voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1347,7 +1363,7 @@ call.rejectCall(rejectMessageOptions, (err) => { ...@@ -1347,7 +1363,7 @@ call.rejectCall(rejectMessageOptions, (err) => {
## call.holdCall<sup>7+</sup> ## call.holdCall<sup>7+</sup>
holdCall\(callId: number, callback: AsyncCallback<void\>\): void holdCall\(callId: number, callback: AsyncCallback\<void\>\): void
保持通话。使用callback异步回调。 保持通话。使用callback异步回调。
...@@ -1366,11 +1382,12 @@ holdCall\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -1366,11 +1382,12 @@ holdCall\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1388,7 +1405,7 @@ call.holdCall(1, (err) => { ...@@ -1388,7 +1405,7 @@ call.holdCall(1, (err) => {
## call.holdCall<sup>7+</sup> ## call.holdCall<sup>7+</sup>
holdCall\(callId: number\): Promise<void\> holdCall\(callId: number\): Promise\<void\>
保持通话。使用Promise异步回调。 保持通话。使用Promise异步回调。
...@@ -1412,11 +1429,12 @@ holdCall\(callId: number\): Promise<void\> ...@@ -1412,11 +1429,12 @@ holdCall\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1435,7 +1453,7 @@ call.holdCall(1).then(() => { ...@@ -1435,7 +1453,7 @@ call.holdCall(1).then(() => {
## call.unHoldCall<sup>7+</sup> ## call.unHoldCall<sup>7+</sup>
unHoldCall\(callId: number, callback: AsyncCallback<void\>\): void unHoldCall\(callId: number, callback: AsyncCallback\<void\>\): void
取消保持通话。使用callback异步回调。 取消保持通话。使用callback异步回调。
...@@ -1454,11 +1472,12 @@ unHoldCall\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -1454,11 +1472,12 @@ unHoldCall\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1476,7 +1495,7 @@ call.unHoldCall(1, (err) => { ...@@ -1476,7 +1495,7 @@ call.unHoldCall(1, (err) => {
## call.unHoldCall<sup>7+</sup> ## call.unHoldCall<sup>7+</sup>
unHoldCall\(callId: number\): Promise<void\> unHoldCall\(callId: number\): Promise\<void\>
取消保持通话。使用Promise异步回调。 取消保持通话。使用Promise异步回调。
...@@ -1500,11 +1519,12 @@ unHoldCall\(callId: number\): Promise<void\> ...@@ -1500,11 +1519,12 @@ unHoldCall\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1523,7 +1543,7 @@ call.unHoldCall(1).then(() => { ...@@ -1523,7 +1543,7 @@ call.unHoldCall(1).then(() => {
## call.switchCall<sup>7+</sup> ## call.switchCall<sup>7+</sup>
switchCall\(callId: number, callback: AsyncCallback<void\>\): void switchCall\(callId: number, callback: AsyncCallback\<void\>\): void
切换呼叫。使用callback异步回调。 切换呼叫。使用callback异步回调。
...@@ -1542,11 +1562,12 @@ switchCall\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -1542,11 +1562,12 @@ switchCall\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1564,7 +1585,7 @@ call.switchCall(1, (err) => { ...@@ -1564,7 +1585,7 @@ call.switchCall(1, (err) => {
## call.switchCall<sup>7+</sup> ## call.switchCall<sup>7+</sup>
switchCall\(callId: number\): Promise<void\> switchCall\(callId: number\): Promise\<void\>
切换呼叫。使用Promise异步回调。 切换呼叫。使用Promise异步回调。
...@@ -1588,11 +1609,12 @@ switchCall\(callId: number\): Promise<void\> ...@@ -1588,11 +1609,12 @@ switchCall\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1611,7 +1633,7 @@ call.switchCall(1).then(() => { ...@@ -1611,7 +1633,7 @@ call.switchCall(1).then(() => {
## call.combineConference<sup>7+</sup> ## call.combineConference<sup>7+</sup>
combineConference\(callId: number, callback: AsyncCallback<void\>\): void combineConference\(callId: number, callback: AsyncCallback\<void\>\): void
合并通话,将两通电话合并成会议电话。使用callback异步回调。 合并通话,将两通电话合并成会议电话。使用callback异步回调。
...@@ -1628,15 +1650,15 @@ combineConference\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -1628,15 +1650,15 @@ combineConference\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1649,7 +1671,7 @@ call.combineConference(1, (err) => { ...@@ -1649,7 +1671,7 @@ call.combineConference(1, (err) => {
## call.combineConference<sup>7+</sup> ## call.combineConference<sup>7+</sup>
combineConference\(callId: number\): Promise<void\> combineConference\(callId: number\): Promise\<void\>
合并通话,将两通电话合并成会议电话。使用Promise异步回调。 合并通话,将两通电话合并成会议电话。使用Promise异步回调。
...@@ -1671,15 +1693,15 @@ combineConference\(callId: number\): Promise<void\> ...@@ -1671,15 +1693,15 @@ combineConference\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1693,7 +1715,7 @@ call.combineConference(1).then(() => { ...@@ -1693,7 +1715,7 @@ call.combineConference(1).then(() => {
## call.getMainCallId<sup>7+</sup> ## call.getMainCallId<sup>7+</sup>
getMainCallId\(callId: number, callback: AsyncCallback<number\>\): void getMainCallId\(callId: number, callback: AsyncCallback\<number\>\): void
获取主呼叫Id。使用callback异步回调。 获取主呼叫Id。使用callback异步回调。
...@@ -1710,15 +1732,15 @@ getMainCallId\(callId: number, callback: AsyncCallback<number\>\): void ...@@ -1710,15 +1732,15 @@ getMainCallId\(callId: number, callback: AsyncCallback<number\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1732,7 +1754,7 @@ call.getMainCallId(1, (err, data) => { ...@@ -1732,7 +1754,7 @@ call.getMainCallId(1, (err, data) => {
## call.getMainCallId<sup>7+</sup> ## call.getMainCallId<sup>7+</sup>
getMainCallId\(callId: number\): Promise<number\> getMainCallId\(callId: number\): Promise\<number\>
获取主呼叫Id。使用Promise异步回调。 获取主呼叫Id。使用Promise异步回调。
...@@ -1754,15 +1776,16 @@ getMainCallId\(callId: number\): Promise<number\> ...@@ -1754,15 +1776,16 @@ getMainCallId\(callId: number\): Promise<number\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1777,7 +1800,7 @@ promise.then(data => { ...@@ -1777,7 +1800,7 @@ promise.then(data => {
## call.getSubCallIdList<sup>7+</sup> ## call.getSubCallIdList<sup>7+</sup>
getSubCallIdList\(callId: number, callback: AsyncCallback<Array<string\>\>\): void getSubCallIdList\(callId: number, callback: AsyncCallback\<Array\<string\>\>\): void
获取子呼叫Id列表。使用callback异步回调。 获取子呼叫Id列表。使用callback异步回调。
...@@ -1794,15 +1817,15 @@ getSubCallIdList\(callId: number, callback: AsyncCallback<Array<string\>\>\): vo ...@@ -1794,15 +1817,15 @@ getSubCallIdList\(callId: number, callback: AsyncCallback<Array<string\>\>\): vo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1815,7 +1838,7 @@ call.getSubCallIdList(1, (err, data) => { ...@@ -1815,7 +1838,7 @@ call.getSubCallIdList(1, (err, data) => {
## call.getSubCallIdList<sup>7+</sup> ## call.getSubCallIdList<sup>7+</sup>
getSubCallIdList\(callId: number\): Promise<Array<string\>\> getSubCallIdList\(callId: number\): Promise\<Array\<string\>\>
获取子呼叫Id列表。使用Promise异步回调。 获取子呼叫Id列表。使用Promise异步回调。
...@@ -1837,15 +1860,15 @@ getSubCallIdList\(callId: number\): Promise<Array<string\>\> ...@@ -1837,15 +1860,15 @@ getSubCallIdList\(callId: number\): Promise<Array<string\>\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1860,7 +1883,7 @@ promise.then(data => { ...@@ -1860,7 +1883,7 @@ promise.then(data => {
## call.getCallIdListForConference<sup>7+</sup> ## call.getCallIdListForConference<sup>7+</sup>
getCallIdListForConference\(callId: number, callback: AsyncCallback<Array<string\>>\): void getCallIdListForConference\(callId: number, callback: AsyncCallback\<Array\<string\>\>\): void
获取会议的呼叫Id列表。使用callback异步回调。 获取会议的呼叫Id列表。使用callback异步回调。
...@@ -1877,15 +1900,15 @@ getCallIdListForConference\(callId: number, callback: AsyncCallback<Array<string ...@@ -1877,15 +1900,15 @@ getCallIdListForConference\(callId: number, callback: AsyncCallback<Array<string
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1898,7 +1921,7 @@ call.getCallIdListForConference(1, (err, data) => { ...@@ -1898,7 +1921,7 @@ call.getCallIdListForConference(1, (err, data) => {
## call.getCallIdListForConference<sup>7+</sup> ## call.getCallIdListForConference<sup>7+</sup>
getCallIdListForConference\(callId: number\): Promise<Array<string\>\> getCallIdListForConference\(callId: number\): Promise\<Array\<string\>\>
获取会议的呼叫Id列表。使用Promise异步回调。 获取会议的呼叫Id列表。使用Promise异步回调。
...@@ -1920,15 +1943,15 @@ getCallIdListForConference\(callId: number\): Promise<Array<string\>\> ...@@ -1920,15 +1943,15 @@ getCallIdListForConference\(callId: number\): Promise<Array<string\>\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1943,7 +1966,7 @@ promise.then(data => { ...@@ -1943,7 +1966,7 @@ promise.then(data => {
## call.getCallWaitingStatus<sup>7+</sup> ## call.getCallWaitingStatus<sup>7+</sup>
getCallWaitingStatus\(slotId: number, callback: AsyncCallback<CallWaitingStatus\>\): void getCallWaitingStatus\(slotId: number, callback: AsyncCallback\<CallWaitingStatus\>\): void
获取呼叫等待状态。使用callback异步回调。 获取呼叫等待状态。使用callback异步回调。
...@@ -1962,16 +1985,16 @@ getCallWaitingStatus\(slotId: number, callback: AsyncCallback<CallWaitingStatus\ ...@@ -1962,16 +1985,16 @@ getCallWaitingStatus\(slotId: number, callback: AsyncCallback<CallWaitingStatus\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -1984,7 +2007,7 @@ call.getCallWaitingStatus(0, (err, data) => { ...@@ -1984,7 +2007,7 @@ call.getCallWaitingStatus(0, (err, data) => {
## call.getCallWaitingStatus<sup>7+</sup> ## call.getCallWaitingStatus<sup>7+</sup>
getCallWaitingStatus\(slotId: number\): Promise<CallWaitingStatus\> getCallWaitingStatus\(slotId: number\): Promise\<CallWaitingStatus\>
获取呼叫等待状态。使用Promise异步回调。 获取呼叫等待状态。使用Promise异步回调。
...@@ -2008,16 +2031,16 @@ getCallWaitingStatus\(slotId: number\): Promise<CallWaitingStatus\> ...@@ -2008,16 +2031,16 @@ getCallWaitingStatus\(slotId: number\): Promise<CallWaitingStatus\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2032,7 +2055,7 @@ promise.then(data => { ...@@ -2032,7 +2055,7 @@ promise.then(data => {
## call.setCallWaiting<sup>7+</sup> ## call.setCallWaiting<sup>7+</sup>
setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback<void\>\): void setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback\<void\>\): void
设置呼叫等待。使用callback异步回调。 设置呼叫等待。使用callback异步回调。
...@@ -2052,16 +2075,16 @@ setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback<void\ ...@@ -2052,16 +2075,16 @@ setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback<void\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2074,7 +2097,7 @@ call.setCallWaiting(0, true, (err) => { ...@@ -2074,7 +2097,7 @@ call.setCallWaiting(0, true, (err) => {
## call.setCallWaiting<sup>7+</sup> ## call.setCallWaiting<sup>7+</sup>
setCallWaiting\(slotId: number, activate: boolean\): Promise<void\> setCallWaiting\(slotId: number, activate: boolean\): Promise\<void\>
设置呼叫等待。使用Promise异步回调。 设置呼叫等待。使用Promise异步回调。
...@@ -2099,16 +2122,16 @@ setCallWaiting\(slotId: number, activate: boolean\): Promise<void\> ...@@ -2099,16 +2122,16 @@ setCallWaiting\(slotId: number, activate: boolean\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2122,7 +2145,7 @@ call.setCallWaiting(0, true).then(() => { ...@@ -2122,7 +2145,7 @@ call.setCallWaiting(0, true).then(() => {
## call.startDTMF<sup>7+</sup> ## call.startDTMF<sup>7+</sup>
startDTMF\(callId: number, character: string, callback: AsyncCallback<void\>\): void startDTMF\(callId: number, character: string, callback: AsyncCallback\<void\>\): void
启动双音多频。使用callback异步回调。 启动双音多频。使用callback异步回调。
...@@ -2140,15 +2163,15 @@ startDTMF\(callId: number, character: string, callback: AsyncCallback<void\>\): ...@@ -2140,15 +2163,15 @@ startDTMF\(callId: number, character: string, callback: AsyncCallback<void\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2161,7 +2184,7 @@ call.startDTMF(1, "0", (err) => { ...@@ -2161,7 +2184,7 @@ call.startDTMF(1, "0", (err) => {
## call.startDTMF<sup>7+</sup> ## call.startDTMF<sup>7+</sup>
startDTMF\(callId: number, character: string\): Promise<void\> startDTMF\(callId: number, character: string\): Promise\<void\>
启动双音多频。使用Promise异步回调。 启动双音多频。使用Promise异步回调。
...@@ -2184,15 +2207,15 @@ startDTMF\(callId: number, character: string\): Promise<void\> ...@@ -2184,15 +2207,15 @@ startDTMF\(callId: number, character: string\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2206,7 +2229,7 @@ call.startDTMF(1, "0").then(() => { ...@@ -2206,7 +2229,7 @@ call.startDTMF(1, "0").then(() => {
## call.stopDTMF<sup>7+</sup> ## call.stopDTMF<sup>7+</sup>
stopDTMF\(callId: number, callback: AsyncCallback<void\>\): void stopDTMF\(callId: number, callback: AsyncCallback\<void\>\): void
停止双音多频。使用callback异步回调。 停止双音多频。使用callback异步回调。
...@@ -2223,15 +2246,15 @@ stopDTMF\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -2223,15 +2246,15 @@ stopDTMF\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2244,7 +2267,7 @@ call.stopDTMF(1, (err) => { ...@@ -2244,7 +2267,7 @@ call.stopDTMF(1, (err) => {
## call.stopDTMF<sup>7+</sup> ## call.stopDTMF<sup>7+</sup>
stopDTMF\(callId: number\): Promise<void\> stopDTMF\(callId: number\): Promise\<void\>
停止双音多频。使用Promise异步回调。 停止双音多频。使用Promise异步回调。
...@@ -2266,15 +2289,15 @@ stopDTMF\(callId: number\): Promise<void\> ...@@ -2266,15 +2289,15 @@ stopDTMF\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2288,7 +2311,7 @@ call.stopDTMF(1).then(() => { ...@@ -2288,7 +2311,7 @@ call.stopDTMF(1).then(() => {
## call.isInEmergencyCall<sup>7+</sup> ## call.isInEmergencyCall<sup>7+</sup>
isInEmergencyCall\(callback: AsyncCallback<boolean\>\): void isInEmergencyCall\(callback: AsyncCallback\<boolean\>\): void
判断是否正在处于紧急呼叫。使用callback异步回调。 判断是否正在处于紧急呼叫。使用callback异步回调。
...@@ -2306,11 +2329,12 @@ isInEmergencyCall\(callback: AsyncCallback<boolean\>\): void ...@@ -2306,11 +2329,12 @@ isInEmergencyCall\(callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2328,7 +2352,7 @@ call.isInEmergencyCall((err, data) => { ...@@ -2328,7 +2352,7 @@ call.isInEmergencyCall((err, data) => {
## call.isInEmergencyCall<sup>7+</sup> ## call.isInEmergencyCall<sup>7+</sup>
isInEmergencyCall\(\): Promise<boolean\> isInEmergencyCall\(\): Promise\<boolean\>
判断是否正在处于紧急呼叫。使用Promise异步回调。 判断是否正在处于紧急呼叫。使用Promise异步回调。
...@@ -2346,13 +2370,12 @@ isInEmergencyCall\(\): Promise<boolean\> ...@@ -2346,13 +2370,12 @@ isInEmergencyCall\(\): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -2370,7 +2393,7 @@ promise.then(data => { ...@@ -2370,7 +2393,7 @@ promise.then(data => {
## call.on('callDetailsChange')<sup>7+</sup> ## call.on('callDetailsChange')<sup>7+</sup>
on\(type: 'callDetailsChange', callback: Callback<CallAttributeOptions\>\): void on\(type: 'callDetailsChange', callback: Callback\<CallAttributeOptions\>\): void
订阅callDetailsChange事件。使用callback异步回调。 订阅callDetailsChange事件。使用callback异步回调。
...@@ -2389,11 +2412,12 @@ on\(type: 'callDetailsChange', callback: Callback<CallAttributeOptions\>\): void ...@@ -2389,11 +2412,12 @@ on\(type: 'callDetailsChange', callback: Callback<CallAttributeOptions\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2410,7 +2434,7 @@ call.on('callDetailsChange', data => { ...@@ -2410,7 +2434,7 @@ call.on('callDetailsChange', data => {
## call.on('callEventChange')<sup>8+</sup> ## call.on('callEventChange')<sup>8+</sup>
on\(type: 'callEventChange', callback: Callback<CallEventOptions\>\): void on\(type: 'callEventChange', callback: Callback\<CallEventOptions\>\): void
订阅callEventChange事件。使用callback异步回调。 订阅callEventChange事件。使用callback异步回调。
...@@ -2429,11 +2453,12 @@ on\(type: 'callEventChange', callback: Callback<CallEventOptions\>\): void ...@@ -2429,11 +2453,12 @@ on\(type: 'callEventChange', callback: Callback<CallEventOptions\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2450,7 +2475,7 @@ call.on('callEventChange', data => { ...@@ -2450,7 +2475,7 @@ call.on('callEventChange', data => {
## call.on('callDisconnectedCause')<sup>8+</sup> ## call.on('callDisconnectedCause')<sup>8+</sup>
on\(type: 'callDisconnectedCause', callback: Callback<DisconnectedDetails\>): void on\(type: 'callDisconnectedCause', callback: Callback\<DisconnectedDetails\>\): void
订阅callDisconnectedCause事件。使用callback异步回调。 订阅callDisconnectedCause事件。使用callback异步回调。
...@@ -2469,11 +2494,12 @@ on\(type: 'callDisconnectedCause', callback: Callback<DisconnectedDetails\>): vo ...@@ -2469,11 +2494,12 @@ on\(type: 'callDisconnectedCause', callback: Callback<DisconnectedDetails\>): vo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2490,7 +2516,7 @@ call.on('callDisconnectedCause', data => { ...@@ -2490,7 +2516,7 @@ call.on('callDisconnectedCause', data => {
## call.on('mmiCodeResult')<sup>9+</sup> ## call.on('mmiCodeResult')<sup>9+</sup>
on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void on\(type: 'mmiCodeResult', callback: Callback\<MmiCodeResults\>\): void
订阅mmiCodeResult事件。使用callback异步回调。 订阅mmiCodeResult事件。使用callback异步回调。
...@@ -2509,11 +2535,12 @@ on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void ...@@ -2509,11 +2535,12 @@ on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2530,7 +2557,7 @@ call.on('mmiCodeResult', data => { ...@@ -2530,7 +2557,7 @@ call.on('mmiCodeResult', data => {
## call.off('callDetailsChange')<sup>7+</sup> ## call.off('callDetailsChange')<sup>7+</sup>
off\(type: 'callDetailsChange', callback?: Callback<CallAttributeOptions\>\): void off\(type: 'callDetailsChange', callback?: Callback\<CallAttributeOptions\>\): void
取消订阅callDetailsChange事件。使用callback异步回调。 取消订阅callDetailsChange事件。使用callback异步回调。
...@@ -2549,11 +2576,12 @@ off\(type: 'callDetailsChange', callback?: Callback<CallAttributeOptions\>\): vo ...@@ -2549,11 +2576,12 @@ off\(type: 'callDetailsChange', callback?: Callback<CallAttributeOptions\>\): vo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2570,7 +2598,7 @@ call.off('callDetailsChange', data => { ...@@ -2570,7 +2598,7 @@ call.off('callDetailsChange', data => {
## call.off('callEventChange')<sup>8+</sup> ## call.off('callEventChange')<sup>8+</sup>
off\(type: 'callEventChange', callback?: Callback<CallEventOptions\>\): void off\(type: 'callEventChange', callback?: Callback\<CallEventOptions\>\): void
取消订阅callEventChange事件。使用callback异步回调。 取消订阅callEventChange事件。使用callback异步回调。
...@@ -2589,11 +2617,12 @@ off\(type: 'callEventChange', callback?: Callback<CallEventOptions\>\): void ...@@ -2589,11 +2617,12 @@ off\(type: 'callEventChange', callback?: Callback<CallEventOptions\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2610,7 +2639,7 @@ call.off('callEventChange', data => { ...@@ -2610,7 +2639,7 @@ call.off('callEventChange', data => {
## call.off('callDisconnectedCause')<sup>8+</sup> ## call.off('callDisconnectedCause')<sup>8+</sup>
off\(type: 'callDisconnectedCause', callback?: Callback<DisconnectedDetails\>\): void off\(type: 'callDisconnectedCause', callback?: Callback\<DisconnectedDetails\>\): void
取消订阅callDisconnectedCause事件。使用callback异步回调。 取消订阅callDisconnectedCause事件。使用callback异步回调。
...@@ -2629,11 +2658,12 @@ off\(type: 'callDisconnectedCause', callback?: Callback<DisconnectedDetails\>\): ...@@ -2629,11 +2658,12 @@ off\(type: 'callDisconnectedCause', callback?: Callback<DisconnectedDetails\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2650,7 +2680,7 @@ call.off('callDisconnectedCause', data => { ...@@ -2650,7 +2680,7 @@ call.off('callDisconnectedCause', data => {
## call.off('mmiCodeResult')<sup>9+</sup> ## call.off('mmiCodeResult')<sup>9+</sup>
off\(type: 'mmiCodeResult', callback?: Callback<MmiCodeResults\>\): void off\(type: 'mmiCodeResult', callback?: Callback\<MmiCodeResults\>\): void
取消订阅mmiCodeResult事件。使用callback异步回调。 取消订阅mmiCodeResult事件。使用callback异步回调。
...@@ -2669,11 +2699,12 @@ off\(type: 'mmiCodeResult', callback?: Callback<MmiCodeResults\>\): void ...@@ -2669,11 +2699,12 @@ off\(type: 'mmiCodeResult', callback?: Callback<MmiCodeResults\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2690,7 +2721,7 @@ call.off('mmiCodeResult', data => { ...@@ -2690,7 +2721,7 @@ call.off('mmiCodeResult', data => {
## call.isNewCallAllowed<sup>8+</sup> ## call.isNewCallAllowed<sup>8+</sup>
isNewCallAllowed\(callback: AsyncCallback<boolean\>\): void isNewCallAllowed\(callback: AsyncCallback\<boolean\>\): void
判断是否允许再拨打一通新电话。使用callback异步回调。 判断是否允许再拨打一通新电话。使用callback异步回调。
...@@ -2706,10 +2737,11 @@ isNewCallAllowed\(callback: AsyncCallback<boolean\>\): void ...@@ -2706,10 +2737,11 @@ isNewCallAllowed\(callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2727,7 +2759,7 @@ call.isNewCallAllowed((err, data) => { ...@@ -2727,7 +2759,7 @@ call.isNewCallAllowed((err, data) => {
## call.isNewCallAllowed<sup>8+</sup> ## call.isNewCallAllowed<sup>8+</sup>
isNewCallAllowed\(\): Promise<boolean\> isNewCallAllowed\(\): Promise\<boolean\>
判断是否允许再拨打一通新电话。使用Promise异步回调。 判断是否允许再拨打一通新电话。使用Promise异步回调。
...@@ -2743,12 +2775,11 @@ isNewCallAllowed\(\): Promise<boolean\> ...@@ -2743,12 +2775,11 @@ isNewCallAllowed\(\): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -2766,7 +2797,7 @@ promise.then(data => { ...@@ -2766,7 +2797,7 @@ promise.then(data => {
## call.separateConference<sup>8+</sup> ## call.separateConference<sup>8+</sup>
separateConference\(callId: number, callback: AsyncCallback<void\>\): void separateConference\(callId: number, callback: AsyncCallback\<void\>\): void
分离会议电话。使用callback异步回调。 分离会议电话。使用callback异步回调。
...@@ -2783,10 +2814,11 @@ separateConference\(callId: number, callback: AsyncCallback<void\>\): void ...@@ -2783,10 +2814,11 @@ separateConference\(callId: number, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2804,7 +2836,7 @@ call.separateConference(1, (err) => { ...@@ -2804,7 +2836,7 @@ call.separateConference(1, (err) => {
## call.separateConference<sup>8+</sup> ## call.separateConference<sup>8+</sup>
separateConference\(callId: number\): Promise<void\> separateConference\(callId: number\): Promise\<void\>
分离会议电话。使用Promise异步回调。 分离会议电话。使用Promise异步回调。
...@@ -2826,10 +2858,11 @@ separateConference\(callId: number\): Promise<void\> ...@@ -2826,10 +2858,11 @@ separateConference\(callId: number\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2848,7 +2881,7 @@ call.separateConference(1).then(() => { ...@@ -2848,7 +2881,7 @@ call.separateConference(1).then(() => {
## call.getCallRestrictionStatus<sup>8+</sup> ## call.getCallRestrictionStatus<sup>8+</sup>
getCallRestrictionStatus\(slotId: number, type: CallRestrictionType, callback: AsyncCallback<RestrictionStatus\>\): void getCallRestrictionStatus\(slotId: number, type: CallRestrictionType, callback: AsyncCallback\<RestrictionStatus\>\): void
获取呼叫限制状态。使用callback异步回调。 获取呼叫限制状态。使用callback异步回调。
...@@ -2868,16 +2901,16 @@ getCallRestrictionStatus\(slotId: number, type: CallRestrictionType, callback: A ...@@ -2868,16 +2901,16 @@ getCallRestrictionStatus\(slotId: number, type: CallRestrictionType, callback: A
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2890,7 +2923,7 @@ call.getCallRestrictionStatus(0, 1, (err, data) => { ...@@ -2890,7 +2923,7 @@ call.getCallRestrictionStatus(0, 1, (err, data) => {
## call.getCallRestrictionStatus<sup>8+</sup> ## call.getCallRestrictionStatus<sup>8+</sup>
getCallRestrictionStatus\(slotId: number, type: CallRestrictionType\): Promise<RestrictionStatus\> getCallRestrictionStatus\(slotId: number, type: CallRestrictionType\): Promise\<RestrictionStatus\>
获取呼叫限制状态。使用Promise异步回调。 获取呼叫限制状态。使用Promise异步回调。
...@@ -2915,16 +2948,16 @@ getCallRestrictionStatus\(slotId: number, type: CallRestrictionType\): Promise<R ...@@ -2915,16 +2948,16 @@ getCallRestrictionStatus\(slotId: number, type: CallRestrictionType\): Promise<R
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2939,7 +2972,7 @@ promise.then(data => { ...@@ -2939,7 +2972,7 @@ promise.then(data => {
## call.setCallRestriction<sup>8+</sup> ## call.setCallRestriction<sup>8+</sup>
setCallRestriction\(slotId: number, info: CallRestrictionInfo, callback: AsyncCallback<void\>\): void setCallRestriction\(slotId: number, info: CallRestrictionInfo, callback: AsyncCallback\<void\>\): void
设置呼叫限制状态。使用callback异步回调。 设置呼叫限制状态。使用callback异步回调。
...@@ -2959,16 +2992,16 @@ setCallRestriction\(slotId: number, info: CallRestrictionInfo, callback: AsyncCa ...@@ -2959,16 +2992,16 @@ setCallRestriction\(slotId: number, info: CallRestrictionInfo, callback: AsyncCa
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -2986,7 +3019,7 @@ call.setCallRestriction(0, callRestrictionInfo, (err) => { ...@@ -2986,7 +3019,7 @@ call.setCallRestriction(0, callRestrictionInfo, (err) => {
## call.setCallRestriction<sup>8+</sup> ## call.setCallRestriction<sup>8+</sup>
setCallRestriction\(slotId: number, info: CallRestrictionInfo\): Promise<void\> setCallRestriction\(slotId: number, info: CallRestrictionInfo\): Promise\<void\>
设置呼叫限制状态。使用Promise异步回调。 设置呼叫限制状态。使用Promise异步回调。
...@@ -3011,16 +3044,16 @@ setCallRestriction\(slotId: number, info: CallRestrictionInfo\): Promise<void\> ...@@ -3011,16 +3044,16 @@ setCallRestriction\(slotId: number, info: CallRestrictionInfo\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -3039,7 +3072,7 @@ call.setCallRestriction(0, callRestrictionInfo).then(() => { ...@@ -3039,7 +3072,7 @@ call.setCallRestriction(0, callRestrictionInfo).then(() => {
## call.getCallTransferInfo<sup>8+</sup> ## call.getCallTransferInfo<sup>8+</sup>
getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCallback<CallTransferResult\>\): void getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCallback\<CallTransferResult\>\): void
获取呼叫转移信息。使用callback异步回调。 获取呼叫转移信息。使用callback异步回调。
...@@ -3059,16 +3092,16 @@ getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCall ...@@ -3059,16 +3092,16 @@ getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCall
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -3081,7 +3114,7 @@ call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY, (err, data ...@@ -3081,7 +3114,7 @@ call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY, (err, data
## call.getCallTransferInfo<sup>8+</sup> ## call.getCallTransferInfo<sup>8+</sup>
getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransferResult\> getCallTransferInfo\(slotId: number, type: CallTransferType\): Promise\<CallTransferResult\>
获取呼叫转移信息。使用Promise异步回调。 获取呼叫转移信息。使用Promise异步回调。
...@@ -3106,16 +3139,16 @@ getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransf ...@@ -3106,16 +3139,16 @@ getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransf
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -3130,7 +3163,7 @@ promise.then(data => { ...@@ -3130,7 +3163,7 @@ promise.then(data => {
## call.setCallTransfer<sup>8+</sup> ## call.setCallTransfer<sup>8+</sup>
setCallTransfer\(slotId: number, info: CallTransferInfo, callback: AsyncCallback<void\>\): void setCallTransfer\(slotId: number, info: CallTransferInfo, callback: AsyncCallback\<void\>\): void
设置呼叫转移信息。使用callback异步回调。 设置呼叫转移信息。使用callback异步回调。
...@@ -3150,16 +3183,16 @@ setCallTransfer\(slotId: number, info: CallTransferInfo, callback: AsyncCallback ...@@ -3150,16 +3183,16 @@ setCallTransfer\(slotId: number, info: CallTransferInfo, callback: AsyncCallback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -3177,7 +3210,7 @@ call.setCallTransfer(0, callTransferInfo, (err) => { ...@@ -3177,7 +3210,7 @@ call.setCallTransfer(0, callTransferInfo, (err) => {
## call.setCallTransfer<sup>8+</sup> ## call.setCallTransfer<sup>8+</sup>
setCallTransfer\(slotId: number, info: CallTransferInfo): Promise<void\> setCallTransfer\(slotId: number, info: CallTransferInfo\): Promise\<void\>
设置呼叫转移信息。使用Promise异步回调。 设置呼叫转移信息。使用Promise异步回调。
...@@ -3202,16 +3235,16 @@ setCallTransfer\(slotId: number, info: CallTransferInfo): Promise<void\> ...@@ -3202,16 +3235,16 @@ setCallTransfer\(slotId: number, info: CallTransferInfo): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
...@@ -3230,7 +3263,7 @@ call.setCallTransfer(0, callTransferInfo).then(() => { ...@@ -3230,7 +3263,7 @@ call.setCallTransfer(0, callTransferInfo).then(() => {
## call.isRinging<sup>8+</sup> ## call.isRinging<sup>8+</sup>
isRinging\(callback: AsyncCallback<boolean\>\): void isRinging\(callback: AsyncCallback\<boolean\>\): void
判断是否正在响铃。使用callback异步回调。 判断是否正在响铃。使用callback异步回调。
...@@ -3248,11 +3281,12 @@ isRinging\(callback: AsyncCallback<boolean\>\): void ...@@ -3248,11 +3281,12 @@ isRinging\(callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3270,7 +3304,7 @@ call.isRinging((err, data) => { ...@@ -3270,7 +3304,7 @@ call.isRinging((err, data) => {
## call.isRinging<sup>8+</sup> ## call.isRinging<sup>8+</sup>
isRinging\(\): Promise<boolean\> isRinging\(\): Promise\<boolean\>
判断是否正在响铃。使用Promise异步回调。 判断是否正在响铃。使用Promise异步回调。
...@@ -3288,13 +3322,12 @@ isRinging\(\): Promise<boolean\> ...@@ -3288,13 +3322,12 @@ isRinging\(\): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -3312,7 +3345,7 @@ promise.then(data => { ...@@ -3312,7 +3345,7 @@ promise.then(data => {
## call.setMuted<sup>8+</sup> ## call.setMuted<sup>8+</sup>
setMuted\(callback: AsyncCallback<void\>\): void setMuted\(callback: AsyncCallback\<void\>\): void
设置通话中的静音。使用callback异步回调。 设置通话中的静音。使用callback异步回调。
...@@ -3328,10 +3361,11 @@ setMuted\(callback: AsyncCallback<void\>\): void ...@@ -3328,10 +3361,11 @@ setMuted\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3349,7 +3383,7 @@ call.setMuted((err) => { ...@@ -3349,7 +3383,7 @@ call.setMuted((err) => {
## call.setMuted<sup>8+</sup> ## call.setMuted<sup>8+</sup>
setMuted\(\): Promise<void\> setMuted\(\): Promise\<void\>
设置通话中的静音。使用Promise异步回调。 设置通话中的静音。使用Promise异步回调。
...@@ -3365,12 +3399,11 @@ setMuted\(\): Promise<void\> ...@@ -3365,12 +3399,11 @@ setMuted\(\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -3387,7 +3420,7 @@ call.setMuted().then(() => { ...@@ -3387,7 +3420,7 @@ call.setMuted().then(() => {
## call.cancelMuted<sup>8+</sup> ## call.cancelMuted<sup>8+</sup>
cancelMuted(callback: AsyncCallback<void\>): void cancelMuted\(callback: AsyncCallback\<void\>\): void
取消通话中的静音。使用callback异步回调。 取消通话中的静音。使用callback异步回调。
...@@ -3403,10 +3436,11 @@ cancelMuted(callback: AsyncCallback<void\>): void ...@@ -3403,10 +3436,11 @@ cancelMuted(callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3424,7 +3458,7 @@ call.cancelMuted((err) => { ...@@ -3424,7 +3458,7 @@ call.cancelMuted((err) => {
## call.cancelMuted<sup>8+</sup> ## call.cancelMuted<sup>8+</sup>
cancelMuted(): Promise<void\> cancelMuted\(\): Promise\<void\>
取消通话中的静音。使用Promise异步回调。 取消通话中的静音。使用Promise异步回调。
...@@ -3440,12 +3474,11 @@ cancelMuted(): Promise<void\> ...@@ -3440,12 +3474,11 @@ cancelMuted(): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -3462,7 +3495,7 @@ call.cancelMuted().then(() => { ...@@ -3462,7 +3495,7 @@ call.cancelMuted().then(() => {
## call.setAudioDevice<sup>8+</sup> ## call.setAudioDevice<sup>8+</sup>
setAudioDevice\(device: AudioDevice, callback: AsyncCallback<void\>\): void setAudioDevice\(device: AudioDevice, callback: AsyncCallback\<void\>\): void
设置通话音频设备。使用callback异步回调。 设置通话音频设备。使用callback异步回调。
...@@ -3479,10 +3512,11 @@ setAudioDevice\(device: AudioDevice, callback: AsyncCallback<void\>\): void ...@@ -3479,10 +3512,11 @@ setAudioDevice\(device: AudioDevice, callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3500,7 +3534,7 @@ call.setAudioDevice(1, (err) => { ...@@ -3500,7 +3534,7 @@ call.setAudioDevice(1, (err) => {
## call.setAudioDevice<sup>9+</sup> ## call.setAudioDevice<sup>9+</sup>
setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback<void\>\): void setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback\<void\>\): void
设置通话音频设备。使用callback异步回调。 设置通话音频设备。使用callback异步回调。
...@@ -3518,10 +3552,11 @@ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: Asyn ...@@ -3518,10 +3552,11 @@ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: Asyn
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3542,7 +3577,7 @@ call.setAudioDevice(1, audioDeviceOptions, (err) => { ...@@ -3542,7 +3577,7 @@ call.setAudioDevice(1, audioDeviceOptions, (err) => {
## call.setAudioDevice<sup>9+</sup> ## call.setAudioDevice<sup>9+</sup>
setAudioDevice(device: AudioDevice, options?: AudioDeviceOptions): Promise<void\> setAudioDevice\(device: AudioDevice, options?: AudioDeviceOptions\): Promise\<void\>
设置通话音频设备。使用Promise异步回调。 设置通话音频设备。使用Promise异步回调。
...@@ -3565,10 +3600,11 @@ setAudioDevice(device: AudioDevice, options?: AudioDeviceOptions): Promise<void\ ...@@ -3565,10 +3600,11 @@ setAudioDevice(device: AudioDevice, options?: AudioDeviceOptions): Promise<void\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3590,7 +3626,7 @@ call.setAudioDevice(1, audioDeviceOptions).then(() => { ...@@ -3590,7 +3626,7 @@ call.setAudioDevice(1, audioDeviceOptions).then(() => {
## call.joinConference<sup>8+</sup> ## call.joinConference<sup>8+</sup>
joinConference(mainCallId: number, callNumberList: Array<string\>, callback: AsyncCallback<void\>): void joinConference\(mainCallId: number, callNumberList: Array\<string\>, callback: AsyncCallback\<void\>\): void
加入会议。使用callback异步回调。 加入会议。使用callback异步回调。
...@@ -3608,10 +3644,11 @@ joinConference(mainCallId: number, callNumberList: Array<string\>, callback: Asy ...@@ -3608,10 +3644,11 @@ joinConference(mainCallId: number, callNumberList: Array<string\>, callback: Asy
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3631,7 +3668,7 @@ call.joinConference(1, callNumberList, (err) => { ...@@ -3631,7 +3668,7 @@ call.joinConference(1, callNumberList, (err) => {
## call.joinConference<sup>8+</sup> ## call.joinConference<sup>8+</sup>
joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void\> joinConference\(mainCallId: number, callNumberList: Array\<string\>\): Promise\<void\>
加入会议。使用Promise异步回调。 加入会议。使用Promise异步回调。
...@@ -3654,10 +3691,11 @@ joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void ...@@ -3654,10 +3691,11 @@ joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3679,7 +3717,7 @@ call.joinConference(1, callNumberList).then(() => { ...@@ -3679,7 +3717,7 @@ call.joinConference(1, callNumberList).then(() => {
## call.updateImsCallMode<sup>8+</sup> ## call.updateImsCallMode<sup>8+</sup>
updateImsCallMode(callId: number, mode: ImsCallMode, callback: AsyncCallback<void\>): void updateImsCallMode\(callId: number, mode: ImsCallMode, callback: AsyncCallback\<void\>\): void
更新Ims呼叫模式。使用callback异步回调。 更新Ims呼叫模式。使用callback异步回调。
...@@ -3697,10 +3735,11 @@ updateImsCallMode(callId: number, mode: ImsCallMode, callback: AsyncCallback<voi ...@@ -3697,10 +3735,11 @@ updateImsCallMode(callId: number, mode: ImsCallMode, callback: AsyncCallback<voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3717,7 +3756,7 @@ call.updateImsCallMode(1, 1, (err) => { ...@@ -3717,7 +3756,7 @@ call.updateImsCallMode(1, 1, (err) => {
## call.updateImsCallMode<sup>8+</sup> ## call.updateImsCallMode<sup>8+</sup>
updateImsCallMode(callId: number, mode: ImsCallMode): Promise<void\> updateImsCallMode\(callId: number, mode: ImsCallMode\): Promise\<void\>
更新Ims呼叫模式。使用Promise异步回调。 更新Ims呼叫模式。使用Promise异步回调。
...@@ -3740,10 +3779,11 @@ updateImsCallMode(callId: number, mode: ImsCallMode): Promise<void\> ...@@ -3740,10 +3779,11 @@ updateImsCallMode(callId: number, mode: ImsCallMode): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3762,7 +3802,7 @@ call.updateImsCallMode(1, 1).then(() => { ...@@ -3762,7 +3802,7 @@ call.updateImsCallMode(1, 1).then(() => {
## call.enableImsSwitch<sup>8+</sup> ## call.enableImsSwitch<sup>8+</sup>
enableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void enableImsSwitch\(slotId: number, callback: AsyncCallback\<void\>\): void
启用Ims开关。使用callback异步回调。 启用Ims开关。使用callback异步回调。
...@@ -3781,11 +3821,12 @@ enableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void ...@@ -3781,11 +3821,12 @@ enableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3802,7 +3843,7 @@ call.enableImsSwitch(0, (err) => { ...@@ -3802,7 +3843,7 @@ call.enableImsSwitch(0, (err) => {
## call.enableImsSwitch<sup>8+</sup> ## call.enableImsSwitch<sup>8+</sup>
enableImsSwitch(slotId: number): Promise<void\> enableImsSwitch\(slotId: number\): Promise\<void\>
启用Ims开关。使用Promise异步回调。 启用Ims开关。使用Promise异步回调。
...@@ -3826,11 +3867,12 @@ enableImsSwitch(slotId: number): Promise<void\> ...@@ -3826,11 +3867,12 @@ enableImsSwitch(slotId: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3849,7 +3891,7 @@ call.enableImsSwitch(0).then(() => { ...@@ -3849,7 +3891,7 @@ call.enableImsSwitch(0).then(() => {
## call.disableImsSwitch<sup>8+</sup> ## call.disableImsSwitch<sup>8+</sup>
disableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void disableImsSwitch\(slotId: number, callback: AsyncCallback\<void\>\): void
禁用Ims开关。使用callback异步回调。 禁用Ims开关。使用callback异步回调。
...@@ -3868,11 +3910,12 @@ disableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void ...@@ -3868,11 +3910,12 @@ disableImsSwitch(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3889,7 +3932,7 @@ call.disableImsSwitch(0, (err) => { ...@@ -3889,7 +3932,7 @@ call.disableImsSwitch(0, (err) => {
## call.disableImsSwitch<sup>8+</sup> ## call.disableImsSwitch<sup>8+</sup>
disableImsSwitch(slotId: number): Promise<void\> disableImsSwitch\(slotId: number\): Promise\<void\>
禁用Ims开关。使用Promise异步回调。 禁用Ims开关。使用Promise异步回调。
...@@ -3913,11 +3956,12 @@ disableImsSwitch(slotId: number): Promise<void\> ...@@ -3913,11 +3956,12 @@ disableImsSwitch(slotId: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3936,7 +3980,7 @@ call.disableImsSwitch(0).then(() => { ...@@ -3936,7 +3980,7 @@ call.disableImsSwitch(0).then(() => {
## call.isImsSwitchEnabled<sup>8+</sup> ## call.isImsSwitchEnabled<sup>8+</sup>
isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean\>): void isImsSwitchEnabled\(slotId: number, callback: AsyncCallback\<boolean\>\): void
判断Ims开关是否启用。使用callback异步回调。 判断Ims开关是否启用。使用callback异步回调。
...@@ -3953,10 +3997,11 @@ isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean\>): void ...@@ -3953,10 +3997,11 @@ isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3973,7 +4018,7 @@ call.isImsSwitchEnabled(0, (err, data) => { ...@@ -3973,7 +4018,7 @@ call.isImsSwitchEnabled(0, (err, data) => {
## call.isImsSwitchEnabled<sup>8+</sup> ## call.isImsSwitchEnabled<sup>8+</sup>
isImsSwitchEnabled(slotId: number): Promise<boolean\> isImsSwitchEnabled\(slotId: number\): Promise\<boolean\>
判断Ims开关是否启用。使用Promise异步回调。 判断Ims开关是否启用。使用Promise异步回调。
...@@ -3995,10 +4040,11 @@ isImsSwitchEnabled(slotId: number): Promise<boolean\> ...@@ -3995,10 +4040,11 @@ isImsSwitchEnabled(slotId: number): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -4025,10 +4071,10 @@ promise.then(data => { ...@@ -4025,10 +4071,10 @@ promise.then(data => {
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ------------------------ | ---------------------------------- | ---- | ----------------------------------------------------------------------------------------------- | | ------------------------ | ---------------------------------- | ---- | ----------------------------------------------------------------------------------------------- |
| extras | boolean | 否 | 根据extras的值判断是否为视频通话,默认为语音通话。<br/>- true:视频通话。<br/>- false:语音通话。 | | extras | boolean | 否 | 根据extras的值判断是否为视频通话,默认为语音通话。<br/>- true:视频通话。<br/>- false:语音通话。 |
| accountId <sup>8+</sup> | number | 否 | 帐户Id。<br/>- 0:卡槽1<br/>- 1:卡槽2<br/>此接口为系统接口。 | | accountId <sup>8+</sup> | number | 否 | 帐户Id。<br/>- 0:卡槽1<br/>- 1:卡槽2<br/> |
| videoState <sup>8+</sup> | [VideoStateType](#videostatetype7) | 否 | 视频状态类型。此接口为系统接口。 | | videoState <sup>8+</sup> | [VideoStateType](#videostatetype7) | 否 | 视频状态类型。 |
| dialScene <sup>8+</sup> | [DialScene](#dialscene8) | 否 | 拨号场景。此接口为系统接口。 | | dialScene <sup>8+</sup> | [DialScene](#dialscene8) | 否 | 拨号场景。 |
| dialType <sup>8+</sup> | [DialType](#dialtype8) | 否 | 拨号类型。此接口为系统接口。 | | dialType <sup>8+</sup> | [DialType](#dialtype8) | 否 | 拨号类型。 |
## DialCallOptions<sup>9+</sup> ## DialCallOptions<sup>9+</sup>
......
...@@ -15,7 +15,7 @@ import observer from '@ohos.telephony.observer'; ...@@ -15,7 +15,7 @@ import observer from '@ohos.telephony.observer';
## observer.on('networkStateChange') ## observer.on('networkStateChange')
on\(type: \'networkStateChange\', callback: Callback<NetworkState\>\): void; on\(type: \'networkStateChange\', callback: Callback\<NetworkState\>\): void;
订阅网络状态变化事件,使用callback方式作为异步方法。 订阅网络状态变化事件,使用callback方式作为异步方法。
...@@ -32,7 +32,7 @@ on\(type: \'networkStateChange\', callback: Callback<NetworkState\>\): void; ...@@ -32,7 +32,7 @@ on\(type: \'networkStateChange\', callback: Callback<NetworkState\>\): void;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -54,7 +54,7 @@ observer.on('networkStateChange', data => { ...@@ -54,7 +54,7 @@ observer.on('networkStateChange', data => {
## observer.on('networkStateChange') ## observer.on('networkStateChange')
on\(type: \'networkStateChange\', options: { slotId: number }, callback: Callback<NetworkState\>\): void; on\(type: \'networkStateChange\', options: { slotId: number }, callback: Callback\<NetworkState\>\): void;
订阅指定卡槽位的网络状态变化事件,使用callback方式作为异步方法。 订阅指定卡槽位的网络状态变化事件,使用callback方式作为异步方法。
...@@ -72,7 +72,7 @@ on\(type: \'networkStateChange\', options: { slotId: number }, callback: Callbac ...@@ -72,7 +72,7 @@ on\(type: \'networkStateChange\', options: { slotId: number }, callback: Callbac
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -94,7 +94,7 @@ observer.on('networkStateChange', {slotId: 0}, data => { ...@@ -94,7 +94,7 @@ observer.on('networkStateChange', {slotId: 0}, data => {
## observer.off('networkStateChange') ## observer.off('networkStateChange')
off\(type: \'networkStateChange\', callback?: Callback<NetworkState\>\): void; off\(type: \'networkStateChange\', callback?: Callback\<NetworkState\>\): void;
取消订阅网络状态变化事件,使用callback方式作为异步方法。 取消订阅网络状态变化事件,使用callback方式作为异步方法。
...@@ -111,6 +111,10 @@ off\(type: \'networkStateChange\', callback?: Callback<NetworkState\>\): void; ...@@ -111,6 +111,10 @@ off\(type: \'networkStateChange\', callback?: Callback<NetworkState\>\): void;
| type | string | 是 | 网络状态变化事件,参数固定为'networkStateChange'。 | | type | string | 是 | 网络状态变化事件,参数固定为'networkStateChange'。 |
| callback | Callback\<[NetworkState](js-apis-radio.md#networkstate)\> | 否 | 回调函数。参考radio的[NetworkState](js-apis-radio.md#networkstate) | | callback | Callback\<[NetworkState](js-apis-radio.md#networkstate)\> | 否 | 回调函数。参考radio的[NetworkState](js-apis-radio.md#networkstate) |
**错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 401 | Parameter error. | | 401 | Parameter error. |
...@@ -133,7 +137,7 @@ observer.off('networkStateChange'); ...@@ -133,7 +137,7 @@ observer.off('networkStateChange');
## observer.on('signalInfoChange') ## observer.on('signalInfoChange')
on\(type: \'signalInfoChange\', callback: Callback<Array<SignalInformation\>\>): void; on\(type: \'signalInfoChange\', callback: Callback\<Array\<SignalInformation\>\>): void;
订阅信号状态变化事件,使用callback方式作为异步方法。 订阅信号状态变化事件,使用callback方式作为异步方法。
...@@ -148,11 +152,10 @@ on\(type: \'signalInfoChange\', callback: Callback<Array<SignalInformation\>\>): ...@@ -148,11 +152,10 @@ on\(type: \'signalInfoChange\', callback: Callback<Array<SignalInformation\>\>):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -170,7 +173,7 @@ observer.on('signalInfoChange', data => { ...@@ -170,7 +173,7 @@ observer.on('signalInfoChange', data => {
## observer.on('signalInfoChange') ## observer.on('signalInfoChange')
on\(type: \'signalInfoChange\', options: { slotId: number }, callback: Callback<Array<SignalInformation\>\>): void; on\(type: \'signalInfoChange\', options: { slotId: number }, callback: Callback\<Array\<SignalInformation\>\>): void;
订阅指定卡槽位的信号状态变化事件,使用callback方式作为异步方法。 订阅指定卡槽位的信号状态变化事件,使用callback方式作为异步方法。
...@@ -186,11 +189,10 @@ on\(type: \'signalInfoChange\', options: { slotId: number }, callback: Callback< ...@@ -186,11 +189,10 @@ on\(type: \'signalInfoChange\', options: { slotId: number }, callback: Callback<
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -208,7 +210,7 @@ observer.on('signalInfoChange', {slotId: 0}, data => { ...@@ -208,7 +210,7 @@ observer.on('signalInfoChange', {slotId: 0}, data => {
## observer.off('signalInfoChange') ## observer.off('signalInfoChange')
off\(type: \'signalInfoChange\', callback?: Callback<Array<SignalInformation\>\>): void; off\(type: \'signalInfoChange\', callback?: Callback\<Array\<SignalInformation\>\>): void;
取消订阅信号状态变化事件,使用callback方式作为异步方法。 取消订阅信号状态变化事件,使用callback方式作为异步方法。
...@@ -227,7 +229,7 @@ off\(type: \'signalInfoChange\', callback?: Callback<Array<SignalInformation\>\> ...@@ -227,7 +229,7 @@ off\(type: \'signalInfoChange\', callback?: Callback<Array<SignalInformation\>\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -251,7 +253,7 @@ observer.off('signalInfoChange'); ...@@ -251,7 +253,7 @@ observer.off('signalInfoChange');
## observer.on('cellInfoChange')<sup>8+</sup> ## observer.on('cellInfoChange')<sup>8+</sup>
on\(type: \'cellInfoChange\', callback: Callback<CellInformation\>\): void; on\(type: \'cellInfoChange\', callback: Callback\<Array\<CellInformation\>\>\): void;
订阅小区信息变化事件,使用callback方式作为异步方法。 订阅小区信息变化事件,使用callback方式作为异步方法。
...@@ -270,9 +272,12 @@ on\(type: \'cellInfoChange\', callback: Callback<CellInformation\>\): void; ...@@ -270,9 +272,12 @@ on\(type: \'cellInfoChange\', callback: Callback<CellInformation\>\): void;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -290,7 +295,7 @@ observer.on('cellInfoChange', data => { ...@@ -290,7 +295,7 @@ observer.on('cellInfoChange', data => {
## observer.on('cellInfoChange')<sup>8+</sup> ## observer.on('cellInfoChange')<sup>8+</sup>
on\(type: \'cellInfoChange\', options: { slotId: number }, callback: Callback<CellInformation\>\): void; on\(type: \'cellInfoChange\', options: { slotId: number }, callback: Callback\<Array\<CellInformation\>\>\): void;
订阅指定卡槽位的小区信息变化事件,使用callback方式作为异步方法。 订阅指定卡槽位的小区信息变化事件,使用callback方式作为异步方法。
...@@ -310,9 +315,12 @@ on\(type: \'cellInfoChange\', options: { slotId: number }, callback: Callback<Ce ...@@ -310,9 +315,12 @@ on\(type: \'cellInfoChange\', options: { slotId: number }, callback: Callback<Ce
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -330,7 +338,7 @@ observer.on('cellInfoChange', {slotId: 0}, data => { ...@@ -330,7 +338,7 @@ observer.on('cellInfoChange', {slotId: 0}, data => {
## observer.off('cellInfoChange')<sup>8+</sup> ## observer.off('cellInfoChange')<sup>8+</sup>
off\(type: \'cellInfoChange\', callback?: Callback<CellInformation\>\): void; off\(type: \'cellInfoChange\', callback?: Callback\<Array\<CellInformation\>\>\): void;
取消订阅小区信息变化事件,使用callback方式作为异步方法。 取消订阅小区信息变化事件,使用callback方式作为异步方法。
...@@ -349,8 +357,13 @@ off\(type: \'cellInfoChange\', callback?: Callback<CellInformation\>\): void; ...@@ -349,8 +357,13 @@ off\(type: \'cellInfoChange\', callback?: Callback<CellInformation\>\): void;
| type | string | 是 | 小区信息变化事件,固定为'cellInfoChange'。 | | type | string | 是 | 小区信息变化事件,固定为'cellInfoChange'。 |
| callback | Callback\<[CellInformation](js-apis-radio.md#cellinformation8)\> | 否 | 回调函数。| | callback | Callback\<[CellInformation](js-apis-radio.md#cellinformation8)\> | 否 | 回调函数。|
**错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -386,7 +399,7 @@ on(type: 'callStateChange', callback: Callback\<{ state: CallState, number: stri ...@@ -386,7 +399,7 @@ on(type: 'callStateChange', callback: Callback\<{ state: CallState, number: stri
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -423,7 +436,7 @@ on(type: 'callStateChange', options: { slotId: number }, callback: Callback<{ st ...@@ -423,7 +436,7 @@ on(type: 'callStateChange', options: { slotId: number }, callback: Callback<{ st
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -463,7 +476,7 @@ off(type: 'callStateChange', callback?: Callback<{ state: CallState, number: str ...@@ -463,7 +476,7 @@ off(type: 'callStateChange', callback?: Callback<{ state: CallState, number: str
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -503,7 +516,7 @@ on\(type: 'cellularDataConnectionStateChange', callback: Callback\<{ state: Data ...@@ -503,7 +516,7 @@ on\(type: 'cellularDataConnectionStateChange', callback: Callback\<{ state: Data
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -540,7 +553,7 @@ on\(type: 'cellularDataConnectionStateChange', options: { slotId: number }, call ...@@ -540,7 +553,7 @@ on\(type: 'cellularDataConnectionStateChange', options: { slotId: number }, call
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -580,7 +593,7 @@ off\(type: 'cellularDataConnectionStateChange', callback?: Callback\<{ state: D ...@@ -580,7 +593,7 @@ off\(type: 'cellularDataConnectionStateChange', callback?: Callback\<{ state: D
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -620,7 +633,7 @@ on\(type: 'cellularDataFlowChange', callback: Callback\<DataFlowType\>\): void; ...@@ -620,7 +633,7 @@ on\(type: 'cellularDataFlowChange', callback: Callback\<DataFlowType\>\): void;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -657,7 +670,7 @@ on\(type: 'cellularDataFlowChange', options: { slotId: number }, callback: Call ...@@ -657,7 +670,7 @@ on\(type: 'cellularDataFlowChange', options: { slotId: number }, callback: Call
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -697,7 +710,7 @@ off\(type: 'cellularDataFlowChange', callback?: Callback\<DataFlowType\>\): void ...@@ -697,7 +710,7 @@ off\(type: 'cellularDataFlowChange', callback?: Callback\<DataFlowType\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -737,7 +750,7 @@ on\(type: 'simStateChange', callback: Callback\<SimStateData\>\): void; ...@@ -737,7 +750,7 @@ on\(type: 'simStateChange', callback: Callback\<SimStateData\>\): void;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -774,7 +787,7 @@ on\(type: 'simStateChange', options: { slotId: number }, callback: Callback\<Sim ...@@ -774,7 +787,7 @@ on\(type: 'simStateChange', options: { slotId: number }, callback: Callback\<Sim
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -814,7 +827,7 @@ off\(type: 'simStateChange', callback?: Callback\<SimStateData\>\): void; ...@@ -814,7 +827,7 @@ off\(type: 'simStateChange', callback?: Callback\<SimStateData\>\): void;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
......
...@@ -32,7 +32,7 @@ getRadioTech\(slotId: number, callback: AsyncCallback<\{psRadioTech: RadioTechno ...@@ -32,7 +32,7 @@ getRadioTech\(slotId: number, callback: AsyncCallback<\{psRadioTech: RadioTechno
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -77,7 +77,7 @@ getRadioTech\(slotId: number\): Promise<\{psRadioTech: RadioTechnology, csRadioT ...@@ -77,7 +77,7 @@ getRadioTech\(slotId: number\): Promise<\{psRadioTech: RadioTechnology, csRadioT
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -103,7 +103,7 @@ promise.then(data => { ...@@ -103,7 +103,7 @@ promise.then(data => {
## radio.getNetworkState ## radio.getNetworkState
getNetworkState\(callback: AsyncCallback<NetworkState\>\): void getNetworkState\(callback: AsyncCallback\<NetworkState\>\): void
获取网络状态。使用callback异步回调。 获取网络状态。使用callback异步回调。
...@@ -119,7 +119,7 @@ getNetworkState\(callback: AsyncCallback<NetworkState\>\): void ...@@ -119,7 +119,7 @@ getNetworkState\(callback: AsyncCallback<NetworkState\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -141,7 +141,7 @@ radio.getNetworkState((err, data) => { ...@@ -141,7 +141,7 @@ radio.getNetworkState((err, data) => {
## radio.getNetworkState ## radio.getNetworkState
getNetworkState\(slotId: number, callback: AsyncCallback<NetworkState\>\): void getNetworkState\(slotId: number, callback: AsyncCallback\<NetworkState\>\): void
获取网络状态。使用callback异步回调。 获取网络状态。使用callback异步回调。
...@@ -158,7 +158,7 @@ getNetworkState\(slotId: number, callback: AsyncCallback<NetworkState\>\): void ...@@ -158,7 +158,7 @@ getNetworkState\(slotId: number, callback: AsyncCallback<NetworkState\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -181,7 +181,7 @@ radio.getNetworkState(slotId, (err, data) => { ...@@ -181,7 +181,7 @@ radio.getNetworkState(slotId, (err, data) => {
## radio.getNetworkState ## radio.getNetworkState
getNetworkState\(slotId?: number\): Promise<NetworkState\> getNetworkState\(slotId?: number\): Promise\<NetworkState\>
获取网络状态。使用Promise异步回调。 获取网络状态。使用Promise异步回调。
...@@ -203,7 +203,7 @@ getNetworkState\(slotId?: number\): Promise<NetworkState\> ...@@ -203,7 +203,7 @@ getNetworkState\(slotId?: number\): Promise<NetworkState\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -229,7 +229,7 @@ promise.then(data => { ...@@ -229,7 +229,7 @@ promise.then(data => {
## radio.getNetworkSelectionMode ## radio.getNetworkSelectionMode
getNetworkSelectionMode\(slotId: number, callback: AsyncCallback<NetworkSelectionMode\>\): void getNetworkSelectionMode\(slotId: number, callback: AsyncCallback\<NetworkSelectionMode\>\): void
获取当前选网模式。使用callback异步回调。 获取当前选网模式。使用callback异步回调。
...@@ -244,7 +244,7 @@ getNetworkSelectionMode\(slotId: number, callback: AsyncCallback<NetworkSelectio ...@@ -244,7 +244,7 @@ getNetworkSelectionMode\(slotId: number, callback: AsyncCallback<NetworkSelectio
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -266,7 +266,7 @@ radio.getNetworkSelectionMode(slotId, (err, data) => { ...@@ -266,7 +266,7 @@ radio.getNetworkSelectionMode(slotId, (err, data) => {
## radio.getNetworkSelectionMode ## radio.getNetworkSelectionMode
getNetworkSelectionMode\(slotId: number\): Promise<NetworkSelectionMode\> getNetworkSelectionMode\(slotId: number\): Promise\<NetworkSelectionMode\>
获取当前选网模式。使用Promise异步回调。 获取当前选网模式。使用Promise异步回调。
...@@ -286,7 +286,7 @@ getNetworkSelectionMode\(slotId: number\): Promise<NetworkSelectionMode\> ...@@ -286,7 +286,7 @@ getNetworkSelectionMode\(slotId: number\): Promise<NetworkSelectionMode\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -311,7 +311,7 @@ promise.then(data => { ...@@ -311,7 +311,7 @@ promise.then(data => {
## radio.getISOCountryCodeForNetwork<sup>7+</sup> ## radio.getISOCountryCodeForNetwork<sup>7+</sup>
getISOCountryCodeForNetwork\(slotId: number, callback: AsyncCallback<string\>\): void getISOCountryCodeForNetwork\(slotId: number, callback: AsyncCallback\<string\>\): void
获取注册网络所在国家的ISO国家码。使用callback异步回调。 获取注册网络所在国家的ISO国家码。使用callback异步回调。
...@@ -326,7 +326,7 @@ getISOCountryCodeForNetwork\(slotId: number, callback: AsyncCallback<string\>\): ...@@ -326,7 +326,7 @@ getISOCountryCodeForNetwork\(slotId: number, callback: AsyncCallback<string\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -348,7 +348,7 @@ radio.getISOCountryCodeForNetwork(slotId, (err, data) => { ...@@ -348,7 +348,7 @@ radio.getISOCountryCodeForNetwork(slotId, (err, data) => {
## radio.getISOCountryCodeForNetwork<sup>7+</sup> ## radio.getISOCountryCodeForNetwork<sup>7+</sup>
getISOCountryCodeForNetwork\(slotId: number\): Promise<string\> getISOCountryCodeForNetwork\(slotId: number\): Promise\<string\>
获取注册网络所在国家的ISO国家码。使用Promise异步回调。 获取注册网络所在国家的ISO国家码。使用Promise异步回调。
...@@ -368,7 +368,7 @@ getISOCountryCodeForNetwork\(slotId: number\): Promise<string\> ...@@ -368,7 +368,7 @@ getISOCountryCodeForNetwork\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -407,7 +407,7 @@ getPrimarySlotId\(callback: AsyncCallback\<number\>\): void ...@@ -407,7 +407,7 @@ getPrimarySlotId\(callback: AsyncCallback\<number\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -441,11 +441,10 @@ getPrimarySlotId\(\): Promise\<number\> ...@@ -441,11 +441,10 @@ getPrimarySlotId\(\): Promise\<number\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -464,7 +463,7 @@ promise.then(data => { ...@@ -464,7 +463,7 @@ promise.then(data => {
## radio.getSignalInformation<sup>7+</sup> ## radio.getSignalInformation<sup>7+</sup>
getSignalInformation\(slotId: number, callback: AsyncCallback<Array<SignalInformation\>\>\): void getSignalInformation\(slotId: number, callback: AsyncCallback\<Array\<SignalInformation\>\>\): void
获取指定SIM卡槽对应的注册网络信号强度信息列表。使用callback异步回调。 获取指定SIM卡槽对应的注册网络信号强度信息列表。使用callback异步回调。
...@@ -479,7 +478,7 @@ getSignalInformation\(slotId: number, callback: AsyncCallback<Array<SignalInform ...@@ -479,7 +478,7 @@ getSignalInformation\(slotId: number, callback: AsyncCallback<Array<SignalInform
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -501,7 +500,7 @@ radio.getSignalInformation(slotId, (err, data) => { ...@@ -501,7 +500,7 @@ radio.getSignalInformation(slotId, (err, data) => {
## radio.getSignalInformation<sup>7+</sup> ## radio.getSignalInformation<sup>7+</sup>
getSignalInformation\(slotId: number\): Promise<Array<SignalInformation\>\> getSignalInformation\(slotId: number\): Promise\<Array\<SignalInformation\>\>
获取指定SIM卡槽对应的注册网络信号强度信息列表。使用Promise异步回调。 获取指定SIM卡槽对应的注册网络信号强度信息列表。使用Promise异步回调。
...@@ -521,7 +520,7 @@ getSignalInformation\(slotId: number\): Promise<Array<SignalInformation\>\> ...@@ -521,7 +520,7 @@ getSignalInformation\(slotId: number\): Promise<Array<SignalInformation\>\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -654,7 +653,7 @@ console.log("Result: "+ result); ...@@ -654,7 +653,7 @@ console.log("Result: "+ result);
## radio.isRadioOn<sup>7+</sup> ## radio.isRadioOn<sup>7+</sup>
isRadioOn\(callback: AsyncCallback<boolean\>\): void isRadioOn\(callback: AsyncCallback\<boolean\>\): void
判断主卡的Radio是否打开。使用callback异步回调。 判断主卡的Radio是否打开。使用callback异步回调。
...@@ -670,7 +669,7 @@ isRadioOn\(callback: AsyncCallback<boolean\>\): void ...@@ -670,7 +669,7 @@ isRadioOn\(callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -692,7 +691,7 @@ radio.isRadioOn((err, data) => { ...@@ -692,7 +691,7 @@ radio.isRadioOn((err, data) => {
## radio.isRadioOn<sup>7+</sup> ## radio.isRadioOn<sup>7+</sup>
isRadioOn\(slotId: number, callback: AsyncCallback<boolean\>\): void isRadioOn\(slotId: number, callback: AsyncCallback\<boolean\>\): void
判断指定卡槽位的Radio是否打开。使用callback异步回调。 判断指定卡槽位的Radio是否打开。使用callback异步回调。
...@@ -709,7 +708,7 @@ isRadioOn\(slotId: number, callback: AsyncCallback<boolean\>\): void ...@@ -709,7 +708,7 @@ isRadioOn\(slotId: number, callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -732,7 +731,7 @@ radio.isRadioOn(slotId, (err, data) => { ...@@ -732,7 +731,7 @@ radio.isRadioOn(slotId, (err, data) => {
## radio.isRadioOn<sup>7+</sup> ## radio.isRadioOn<sup>7+</sup>
isRadioOn\(slotId?: number\): Promise<boolean\> isRadioOn\(slotId?: number\): Promise\<boolean\>
判断Radio是否打开。使用Promise异步回调。 判断Radio是否打开。使用Promise异步回调。
...@@ -754,7 +753,7 @@ isRadioOn\(slotId?: number\): Promise<boolean\> ...@@ -754,7 +753,7 @@ isRadioOn\(slotId?: number\): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -780,7 +779,7 @@ promise.then(data => { ...@@ -780,7 +779,7 @@ promise.then(data => {
## radio.getOperatorName<sup>7+</sup> ## radio.getOperatorName<sup>7+</sup>
getOperatorName\(slotId: number, callback: AsyncCallback<string\>\): void getOperatorName\(slotId: number, callback: AsyncCallback\<string\>\): void
获取运营商名称。使用callback异步回调。 获取运营商名称。使用callback异步回调。
...@@ -795,7 +794,7 @@ getOperatorName\(slotId: number, callback: AsyncCallback<string\>\): void ...@@ -795,7 +794,7 @@ getOperatorName\(slotId: number, callback: AsyncCallback<string\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -817,7 +816,7 @@ radio.getOperatorName(slotId, (err, data) => { ...@@ -817,7 +816,7 @@ radio.getOperatorName(slotId, (err, data) => {
## radio.getOperatorName<sup>7+</sup> ## radio.getOperatorName<sup>7+</sup>
getOperatorName\(slotId: number\): Promise<string\> getOperatorName\(slotId: number\): Promise\<string\>
获取运营商名称。使用Promise异步回调。 获取运营商名称。使用Promise异步回调。
...@@ -837,7 +836,7 @@ getOperatorName\(slotId: number\): Promise<string\> ...@@ -837,7 +836,7 @@ getOperatorName\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -861,7 +860,7 @@ promise.then(data => { ...@@ -861,7 +860,7 @@ promise.then(data => {
## radio.setPrimarySlotId<sup>8+</sup> ## radio.setPrimarySlotId<sup>8+</sup>
setPrimarySlotId(slotId: number, callback: AsyncCallback<void\>): void setPrimarySlotId\(slotId: number, callback: AsyncCallback\<void\>\): void
设置主卡所在卡槽的索引号。使用callback异步回调。 设置主卡所在卡槽的索引号。使用callback异步回调。
...@@ -880,11 +879,12 @@ setPrimarySlotId(slotId: number, callback: AsyncCallback<void\>): void ...@@ -880,11 +879,12 @@ setPrimarySlotId(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -928,11 +928,12 @@ setPrimarySlotId\(slotId: number\): Promise\<void\> ...@@ -928,11 +928,12 @@ setPrimarySlotId\(slotId: number\): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -954,7 +955,7 @@ promise.then(() => { ...@@ -954,7 +955,7 @@ promise.then(() => {
## radio.getIMEI<sup>8+</sup> ## radio.getIMEI<sup>8+</sup>
getIMEI(callback: AsyncCallback<string\>): void getIMEI\(callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的IMEI。使用callback异步回调。 获取设备的指定卡槽的IMEI。使用callback异步回调。
...@@ -972,11 +973,12 @@ getIMEI(callback: AsyncCallback<string\>): void ...@@ -972,11 +973,12 @@ getIMEI(callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -994,7 +996,7 @@ radio.getIMEI((err, data) => { ...@@ -994,7 +996,7 @@ radio.getIMEI((err, data) => {
## radio.getIMEI<sup>8+</sup> ## radio.getIMEI<sup>8+</sup>
getIMEI(slotId: number, callback: AsyncCallback<string\>): void getIMEI\(slotId: number, callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的IMEI。使用callback异步回调。 获取设备的指定卡槽的IMEI。使用callback异步回调。
...@@ -1013,11 +1015,12 @@ getIMEI(slotId: number, callback: AsyncCallback<string\>): void ...@@ -1013,11 +1015,12 @@ getIMEI(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1036,7 +1039,7 @@ radio.getIMEI(slotId, (err, data) => { ...@@ -1036,7 +1039,7 @@ radio.getIMEI(slotId, (err, data) => {
## radio.getIMEI<sup>8+</sup> ## radio.getIMEI<sup>8+</sup>
getIMEI(slotId?: number): Promise<string\> getIMEI\(slotId?: number\): Promise\<string\>
获取设备的指定卡槽的IMEI。使用Promise异步回调。 获取设备的指定卡槽的IMEI。使用Promise异步回调。
...@@ -1060,11 +1063,12 @@ getIMEI(slotId?: number): Promise<string\> ...@@ -1060,11 +1063,12 @@ getIMEI(slotId?: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1085,7 +1089,7 @@ promise.then(data => { ...@@ -1085,7 +1089,7 @@ promise.then(data => {
## radio.getMEID<sup>8+</sup> ## radio.getMEID<sup>8+</sup>
getMEID(callback: AsyncCallback<string\>): void getMEID\(callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的MEID。使用callback异步回调。 获取设备的指定卡槽的MEID。使用callback异步回调。
...@@ -1103,11 +1107,12 @@ getMEID(callback: AsyncCallback<string\>): void ...@@ -1103,11 +1107,12 @@ getMEID(callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1125,7 +1130,7 @@ radio.getMEID((err, data) => { ...@@ -1125,7 +1130,7 @@ radio.getMEID((err, data) => {
## radio.getMEID<sup>8+</sup> ## radio.getMEID<sup>8+</sup>
getMEID(slotId: number, callback: AsyncCallback<string\>): void getMEID\(slotId: number, callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的MEID。使用callback异步回调。 获取设备的指定卡槽的MEID。使用callback异步回调。
...@@ -1144,11 +1149,12 @@ getMEID(slotId: number, callback: AsyncCallback<string\>): void ...@@ -1144,11 +1149,12 @@ getMEID(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1167,7 +1173,7 @@ radio.getMEID(slotId, (err, data) => { ...@@ -1167,7 +1173,7 @@ radio.getMEID(slotId, (err, data) => {
## radio.getMEID<sup>8+</sup> ## radio.getMEID<sup>8+</sup>
getMEID(slotId?: number): Promise<string\> getMEID\(slotId?: number\): Promise\<string\>
获取设备的指定卡槽的MEID。使用Promise异步回调。 获取设备的指定卡槽的MEID。使用Promise异步回调。
...@@ -1191,11 +1197,12 @@ getMEID(slotId?: number): Promise<string\> ...@@ -1191,11 +1197,12 @@ getMEID(slotId?: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1216,7 +1223,7 @@ promise.then(data => { ...@@ -1216,7 +1223,7 @@ promise.then(data => {
## radio.getUniqueDeviceId<sup>8+</sup> ## radio.getUniqueDeviceId<sup>8+</sup>
getUniqueDeviceId(callback: AsyncCallback<string\>): void getUniqueDeviceId\(callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的唯一设备ID。使用callback异步回调。 获取设备的指定卡槽的唯一设备ID。使用callback异步回调。
...@@ -1234,11 +1241,12 @@ getUniqueDeviceId(callback: AsyncCallback<string\>): void ...@@ -1234,11 +1241,12 @@ getUniqueDeviceId(callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1256,7 +1264,7 @@ radio.getUniqueDeviceId((err, data) => { ...@@ -1256,7 +1264,7 @@ radio.getUniqueDeviceId((err, data) => {
## radio.getUniqueDeviceId<sup>8+</sup> ## radio.getUniqueDeviceId<sup>8+</sup>
getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void getUniqueDeviceId\(slotId: number, callback: AsyncCallback\<string\>\): void
获取设备的指定卡槽的唯一设备ID。使用callback异步回调。 获取设备的指定卡槽的唯一设备ID。使用callback异步回调。
...@@ -1275,11 +1283,12 @@ getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void ...@@ -1275,11 +1283,12 @@ getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1298,7 +1307,7 @@ radio.getUniqueDeviceId(slotId, (err, data) => { ...@@ -1298,7 +1307,7 @@ radio.getUniqueDeviceId(slotId, (err, data) => {
## radio.getUniqueDeviceId<sup>8+</sup> ## radio.getUniqueDeviceId<sup>8+</sup>
getUniqueDeviceId(slotId?: number): Promise<string\> getUniqueDeviceId\(slotId?: number\): Promise\<string\>
获取设备的指定卡槽的唯一设备ID。使用Promise异步回调。 获取设备的指定卡槽的唯一设备ID。使用Promise异步回调。
...@@ -1322,11 +1331,12 @@ getUniqueDeviceId(slotId?: number): Promise<string\> ...@@ -1322,11 +1331,12 @@ getUniqueDeviceId(slotId?: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1347,7 +1357,7 @@ promise.then(data => { ...@@ -1347,7 +1357,7 @@ promise.then(data => {
## radio.sendUpdateCellLocationRequest<sup>8+</sup> ## radio.sendUpdateCellLocationRequest<sup>8+</sup>
sendUpdateCellLocationRequest\(callback: AsyncCallback<void\>\): void sendUpdateCellLocationRequest\(callback: AsyncCallback\<void\>\): void
发送更新小区位置请求。使用callback异步回调。 发送更新小区位置请求。使用callback异步回调。
...@@ -1365,11 +1375,12 @@ sendUpdateCellLocationRequest\(callback: AsyncCallback<void\>\): void ...@@ -1365,11 +1375,12 @@ sendUpdateCellLocationRequest\(callback: AsyncCallback<void\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1386,7 +1397,7 @@ radio.sendUpdateCellLocationRequest((err) => { ...@@ -1386,7 +1397,7 @@ radio.sendUpdateCellLocationRequest((err) => {
## radio.sendUpdateCellLocationRequest<sup>8+</sup> ## radio.sendUpdateCellLocationRequest<sup>8+</sup>
sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\): void sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback\<void\>\): void
发送更新小区位置请求。使用callback异步回调。 发送更新小区位置请求。使用callback异步回调。
...@@ -1405,11 +1416,12 @@ sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\): ...@@ -1405,11 +1416,12 @@ sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1427,7 +1439,7 @@ radio.sendUpdateCellLocationRequest(slotId, (err) => { ...@@ -1427,7 +1439,7 @@ radio.sendUpdateCellLocationRequest(slotId, (err) => {
## radio.sendUpdateCellLocationRequest<sup>8+</sup> ## radio.sendUpdateCellLocationRequest<sup>8+</sup>
sendUpdateCellLocationRequest\(slotId?: number): Promise<void\> sendUpdateCellLocationRequest\(slotId?: number\): Promise\<void\>
发送更新小区位置请求。使用Promise异步回调。 发送更新小区位置请求。使用Promise异步回调。
...@@ -1451,11 +1463,12 @@ sendUpdateCellLocationRequest\(slotId?: number): Promise<void\> ...@@ -1451,11 +1463,12 @@ sendUpdateCellLocationRequest\(slotId?: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1475,7 +1488,7 @@ radio.sendUpdateCellLocationRequest(slotId).then(() => { ...@@ -1475,7 +1488,7 @@ radio.sendUpdateCellLocationRequest(slotId).then(() => {
## radio.getCellInformation<sup>8+</sup> ## radio.getCellInformation<sup>8+</sup>
getCellInformation(callback: AsyncCallback<Array<CellInformation\>>): void getCellInformation\(callback: AsyncCallback\<Array\<CellInformation\>\>\): void
获取小区信息。使用callback异步回调。 获取小区信息。使用callback异步回调。
...@@ -1493,11 +1506,12 @@ getCellInformation(callback: AsyncCallback<Array<CellInformation\>>): void ...@@ -1493,11 +1506,12 @@ getCellInformation(callback: AsyncCallback<Array<CellInformation\>>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1515,7 +1529,7 @@ radio.getCellInformation((err, data) => { ...@@ -1515,7 +1529,7 @@ radio.getCellInformation((err, data) => {
## radio.getCellInformation<sup>8+</sup> ## radio.getCellInformation<sup>8+</sup>
getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation\>\>): void getCellInformation\(slotId: number, callback: AsyncCallback\<Array\<CellInformation\>\>\): void
获取小区信息。使用callback异步回调。 获取小区信息。使用callback异步回调。
...@@ -1534,11 +1548,12 @@ getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation ...@@ -1534,11 +1548,12 @@ getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1557,7 +1572,7 @@ radio.getCellInformation(slotId, (err, data) => { ...@@ -1557,7 +1572,7 @@ radio.getCellInformation(slotId, (err, data) => {
## radio.getCellInformation<sup>8+</sup> ## radio.getCellInformation<sup>8+</sup>
getCellInformation(slotId?: number): Promise<Array<CellInformation\>\> getCellInformation\(slotId?: number\): Promise\<Array\<CellInformation\>\>
获取小区信息。使用Promise异步回调。 获取小区信息。使用Promise异步回调。
...@@ -1581,11 +1596,12 @@ getCellInformation(slotId?: number): Promise<Array<CellInformation\>\> ...@@ -1581,11 +1596,12 @@ getCellInformation(slotId?: number): Promise<Array<CellInformation\>\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1606,7 +1622,7 @@ promise.then(data => { ...@@ -1606,7 +1622,7 @@ promise.then(data => {
## radio.setNetworkSelectionMode ## radio.setNetworkSelectionMode
setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCallback<void\>\): void setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCallback\<void\>\): void
设置网络选择模式。使用callback异步回调。 设置网络选择模式。使用callback异步回调。
...@@ -1625,11 +1641,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa ...@@ -1625,11 +1641,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1658,7 +1675,7 @@ radio.setNetworkSelectionMode(networkSelectionModeOptions, (err) => { ...@@ -1658,7 +1675,7 @@ radio.setNetworkSelectionMode(networkSelectionModeOptions, (err) => {
## radio.setNetworkSelectionMode ## radio.setNetworkSelectionMode
setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\> setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise\<void\>
设置网络选择模式。使用Promise异步回调。 设置网络选择模式。使用Promise异步回调。
...@@ -1682,11 +1699,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\> ...@@ -1682,11 +1699,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1718,7 +1736,7 @@ promise.then(() => { ...@@ -1718,7 +1736,7 @@ promise.then(() => {
## radio.getNetworkSearchInformation ## radio.getNetworkSearchInformation
getNetworkSearchInformation\(slotId: number, callback: AsyncCallback<NetworkSearchResult\>\): void getNetworkSearchInformation\(slotId: number, callback: AsyncCallback\<NetworkSearchResult\>\): void
获取网络搜索信息。使用callback异步回调。 获取网络搜索信息。使用callback异步回调。
...@@ -1737,11 +1755,12 @@ getNetworkSearchInformation\(slotId: number, callback: AsyncCallback<NetworkSear ...@@ -1737,11 +1755,12 @@ getNetworkSearchInformation\(slotId: number, callback: AsyncCallback<NetworkSear
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1758,7 +1777,7 @@ radio.getNetworkSearchInformation(0, (err, data) => { ...@@ -1758,7 +1777,7 @@ radio.getNetworkSearchInformation(0, (err, data) => {
## radio.getNetworkSearchInformation ## radio.getNetworkSearchInformation
getNetworkSearchInformation\(slotId: number\): Promise<NetworkSearchResult\> getNetworkSearchInformation\(slotId: number\): Promise\<NetworkSearchResult\>
获取网络搜索信息。使用Promise异步回调。 获取网络搜索信息。使用Promise异步回调。
...@@ -1782,11 +1801,12 @@ getNetworkSearchInformation\(slotId: number\): Promise<NetworkSearchResult\> ...@@ -1782,11 +1801,12 @@ getNetworkSearchInformation\(slotId: number\): Promise<NetworkSearchResult\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1806,7 +1826,7 @@ promise.then(data => { ...@@ -1806,7 +1826,7 @@ promise.then(data => {
## radio.getNrOptionMode<sup>8+</sup> ## radio.getNrOptionMode<sup>8+</sup>
getNrOptionMode(callback: AsyncCallback<NrOptionMode\>): void getNrOptionMode\(callback: AsyncCallback\<NrOptionMode\>\): void
获取Nr选项模式 。使用callback异步回调。 获取Nr选项模式 。使用callback异步回调。
...@@ -1822,10 +1842,11 @@ getNrOptionMode(callback: AsyncCallback<NrOptionMode\>): void ...@@ -1822,10 +1842,11 @@ getNrOptionMode(callback: AsyncCallback<NrOptionMode\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1843,7 +1864,7 @@ radio.getNrOptionMode((err, data) => { ...@@ -1843,7 +1864,7 @@ radio.getNrOptionMode((err, data) => {
## radio.getNrOptionMode<sup>8+</sup> ## radio.getNrOptionMode<sup>8+</sup>
getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void getNrOptionMode\(slotId: number, callback: AsyncCallback\<NrOptionMode\>\): void
获取Nr选项模式 。使用callback异步回调。 获取Nr选项模式 。使用callback异步回调。
...@@ -1860,10 +1881,11 @@ getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void ...@@ -1860,10 +1881,11 @@ getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1882,7 +1904,7 @@ radio.getNrOptionMode(slotId, (err, data) => { ...@@ -1882,7 +1904,7 @@ radio.getNrOptionMode(slotId, (err, data) => {
## radio.getNrOptionMode<sup>8+</sup> ## radio.getNrOptionMode<sup>8+</sup>
getNrOptionMode(slotId?: number): Promise<NrOptionMode\> getNrOptionMode\(slotId?: number\): Promise\<NrOptionMode\>
获取Nr选项模式 。使用Promise异步回调。 获取Nr选项模式 。使用Promise异步回调。
...@@ -1904,10 +1926,11 @@ getNrOptionMode(slotId?: number): Promise<NrOptionMode\> ...@@ -1904,10 +1926,11 @@ getNrOptionMode(slotId?: number): Promise<NrOptionMode\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1928,7 +1951,7 @@ promise.then(data => { ...@@ -1928,7 +1951,7 @@ promise.then(data => {
## radio.turnOnRadio<sup>7+</sup> ## radio.turnOnRadio<sup>7+</sup>
turnOnRadio(callback: AsyncCallback<void\>): void turnOnRadio\(callback: AsyncCallback\<void\>\): void
打开Radio。使用callback异步回调。 打开Radio。使用callback异步回调。
...@@ -1946,11 +1969,12 @@ turnOnRadio(callback: AsyncCallback<void\>): void ...@@ -1946,11 +1969,12 @@ turnOnRadio(callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1968,7 +1992,7 @@ radio.turnOnRadio((err) => { ...@@ -1968,7 +1992,7 @@ radio.turnOnRadio((err) => {
## radio.turnOnRadio<sup>7+</sup> ## radio.turnOnRadio<sup>7+</sup>
turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void turnOnRadio\(slotId: number, callback: AsyncCallback\<void\>\): void
打开Radio。使用callback异步回调。 打开Radio。使用callback异步回调。
...@@ -1987,11 +2011,12 @@ turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void ...@@ -1987,11 +2011,12 @@ turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2010,7 +2035,7 @@ radio.turnOnRadio(slotId, (err) => { ...@@ -2010,7 +2035,7 @@ radio.turnOnRadio(slotId, (err) => {
## radio.turnOnRadio<sup>7+</sup> ## radio.turnOnRadio<sup>7+</sup>
turnOnRadio(slotId?: number): Promise<void\> turnOnRadio(slotId?: number): Promise\<void\>
打开Radio。使用Promise异步回调。 打开Radio。使用Promise异步回调。
...@@ -2034,11 +2059,12 @@ turnOnRadio(slotId?: number): Promise<void\> ...@@ -2034,11 +2059,12 @@ turnOnRadio(slotId?: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2058,7 +2084,7 @@ radio.turnOnRadio(slotId).then(() => { ...@@ -2058,7 +2084,7 @@ radio.turnOnRadio(slotId).then(() => {
## radio.turnOffRadio<sup>7+</sup> ## radio.turnOffRadio<sup>7+</sup>
turnOffRadio(callback: AsyncCallback<void\>): void turnOffRadio\(callback: AsyncCallback\<void\>\): void
关闭Radio。使用callback异步回调。 关闭Radio。使用callback异步回调。
...@@ -2076,11 +2102,12 @@ turnOffRadio(callback: AsyncCallback<void\>): void ...@@ -2076,11 +2102,12 @@ turnOffRadio(callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2098,7 +2125,7 @@ radio.turnOffRadio((err) => { ...@@ -2098,7 +2125,7 @@ radio.turnOffRadio((err) => {
## radio.turnOffRadio<sup>7+</sup> ## radio.turnOffRadio<sup>7+</sup>
turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void turnOffRadio\(slotId: number, callback: AsyncCallback\<void\>\): void
关闭Radio。使用callback异步回调。 关闭Radio。使用callback异步回调。
...@@ -2117,11 +2144,12 @@ turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void ...@@ -2117,11 +2144,12 @@ turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2140,7 +2168,7 @@ radio.turnOffRadio(slotId, (err) => { ...@@ -2140,7 +2168,7 @@ radio.turnOffRadio(slotId, (err) => {
## radio.turnOffRadio<sup>7+</sup> ## radio.turnOffRadio<sup>7+</sup>
turnOffRadio(slotId?: number): Promise<void\> turnOffRadio\(slotId?: number\): Promise\<void\>
关闭Radio。使用Promise异步回调。 关闭Radio。使用Promise异步回调。
...@@ -2164,11 +2192,12 @@ turnOffRadio(slotId?: number): Promise<void\> ...@@ -2164,11 +2192,12 @@ turnOffRadio(slotId?: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2188,7 +2217,7 @@ radio.turnOffRadio(slotId).then(() => { ...@@ -2188,7 +2217,7 @@ radio.turnOffRadio(slotId).then(() => {
## radio.setPreferredNetwork<sup>8+</sup> ## radio.setPreferredNetwork<sup>8+</sup>
setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback: AsyncCallback<void\>\): void setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback: AsyncCallback\<void\>\): void
设置首选网络。使用callback异步回调。 设置首选网络。使用callback异步回调。
...@@ -2208,11 +2237,12 @@ setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback ...@@ -2208,11 +2237,12 @@ setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2230,7 +2260,7 @@ radio.setPreferredNetwork(slotId, radio.PreferredNetworkMode.PREFERRED_NETWORK_M ...@@ -2230,7 +2260,7 @@ radio.setPreferredNetwork(slotId, radio.PreferredNetworkMode.PREFERRED_NETWORK_M
## radio.setPreferredNetwork<sup>8+</sup> ## radio.setPreferredNetwork<sup>8+</sup>
setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise<void\> setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode\): Promise\<void\>
设置首选网络。使用Promise异步回调。 设置首选网络。使用Promise异步回调。
...@@ -2255,11 +2285,12 @@ setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise< ...@@ -2255,11 +2285,12 @@ setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise<
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2279,7 +2310,7 @@ radio.setPreferredNetwork(slotId, radio.PreferredNetworkMode.PREFERRED_NETWORK_M ...@@ -2279,7 +2310,7 @@ radio.setPreferredNetwork(slotId, radio.PreferredNetworkMode.PREFERRED_NETWORK_M
## radio.getPreferredNetwork<sup>8+</sup> ## radio.getPreferredNetwork<sup>8+</sup>
getPreferredNetwork\(slotId: number, callback: AsyncCallback<PreferredNetworkMode\>\): void getPreferredNetwork\(slotId: number, callback: AsyncCallback\<PreferredNetworkMode\>\): void
获取首选网络。使用callback异步回调。 获取首选网络。使用callback异步回调。
...@@ -2298,11 +2329,12 @@ getPreferredNetwork\(slotId: number, callback: AsyncCallback<PreferredNetworkMod ...@@ -2298,11 +2329,12 @@ getPreferredNetwork\(slotId: number, callback: AsyncCallback<PreferredNetworkMod
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2319,7 +2351,7 @@ radio.getPreferredNetwork(0, (err, data) => { ...@@ -2319,7 +2351,7 @@ radio.getPreferredNetwork(0, (err, data) => {
## radio.getPreferredNetwork<sup>8+</sup> ## radio.getPreferredNetwork<sup>8+</sup>
getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode\> getPreferredNetwork\(slotId: number\): Promise\<PreferredNetworkMode\>
获取首选网络。使用Promise异步回调。 获取首选网络。使用Promise异步回调。
...@@ -2343,11 +2375,12 @@ getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode\> ...@@ -2343,11 +2375,12 @@ getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2367,7 +2400,7 @@ promise.then(data => { ...@@ -2367,7 +2400,7 @@ promise.then(data => {
## radio.getImsRegInfo<sup>9+</sup> ## radio.getImsRegInfo<sup>9+</sup>
getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<ImsRegInfo\>): void getImsRegInfo\(slotId: number, imsType: ImsServiceType, callback: AsyncCallback\<ImsRegInfo\>\): void
获取特定IMS服务类型的IMS注册状态信息。使用callback异步回调。 获取特定IMS服务类型的IMS注册状态信息。使用callback异步回调。
...@@ -2387,11 +2420,12 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I ...@@ -2387,11 +2420,12 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2408,7 +2442,7 @@ radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => { ...@@ -2408,7 +2442,7 @@ radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
## radio.getImsRegInfo<sup>9+</sup> ## radio.getImsRegInfo<sup>9+</sup>
getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\> getImsRegInfo\(slotId: number, imsType: ImsServiceType\): Promise\<ImsRegInfo\>
获取特定IMS服务类型的IMS注册状态信息。使用Promise异步回调。 获取特定IMS服务类型的IMS注册状态信息。使用Promise异步回调。
...@@ -2433,11 +2467,12 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\> ...@@ -2433,11 +2467,12 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2457,7 +2492,7 @@ promise.then(data => { ...@@ -2457,7 +2492,7 @@ promise.then(data => {
## radio.on('imsRegStateChange')<sup>9+</sup> ## radio.on('imsRegStateChange')<sup>9+</sup>
on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback<ImsRegInfo\>): void on\(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: Callback\<ImsRegInfo\>\): void
订阅imsRegStateChange事件,使用callback异步回调。 订阅imsRegStateChange事件,使用callback异步回调。
...@@ -2478,11 +2513,12 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: ...@@ -2478,11 +2513,12 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback:
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2499,7 +2535,7 @@ radio.on('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, data => { ...@@ -2499,7 +2535,7 @@ radio.on('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, data => {
## radio.off('imsRegStateChange')<sup>9+</sup> ## radio.off('imsRegStateChange')<sup>9+</sup>
off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback<ImsRegInfo\>): void off\(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback?: Callback\<ImsRegInfo\>\): void
取消订阅imsRegStateChange事件,使用callback异步回调。 取消订阅imsRegStateChange事件,使用callback异步回调。
...@@ -2520,11 +2556,12 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback ...@@ -2520,11 +2556,12 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
......
...@@ -15,7 +15,7 @@ import sim from '@ohos.telephony.sim'; ...@@ -15,7 +15,7 @@ import sim from '@ohos.telephony.sim';
## sim.isSimActive<sup>7+</sup> ## sim.isSimActive<sup>7+</sup>
isSimActive\(slotId: number, callback: AsyncCallback<boolean\>\): void isSimActive\(slotId: number, callback: AsyncCallback\<boolean\>\): void
获取指定卡槽SIM卡是否激活。使用callback异步回调。 获取指定卡槽SIM卡是否激活。使用callback异步回调。
...@@ -39,7 +39,7 @@ sim.isSimActive(0, (err, data) => { ...@@ -39,7 +39,7 @@ sim.isSimActive(0, (err, data) => {
## sim.isSimActive<sup>7+</sup> ## sim.isSimActive<sup>7+</sup>
isSimActive\(slotId: number\): Promise<boolean\> isSimActive\(slotId: number\): Promise\<boolean\>
获取指定卡槽SIM卡是否激活。使用Promise异步回调。 获取指定卡槽SIM卡是否激活。使用Promise异步回调。
...@@ -71,7 +71,7 @@ promise.then(data => { ...@@ -71,7 +71,7 @@ promise.then(data => {
## sim.getDefaultVoiceSlotId<sup>7+</sup> ## sim.getDefaultVoiceSlotId<sup>7+</sup>
getDefaultVoiceSlotId\(callback: AsyncCallback<number\>\): void getDefaultVoiceSlotId\(callback: AsyncCallback\<number\>\): void
获取默认语音业务的卡槽ID。使用callback异步回调。 获取默认语音业务的卡槽ID。使用callback异步回调。
...@@ -94,7 +94,7 @@ sim.getDefaultVoiceSlotId((err, data) => { ...@@ -94,7 +94,7 @@ sim.getDefaultVoiceSlotId((err, data) => {
## sim.getDefaultVoiceSlotId<sup>7+</sup> ## sim.getDefaultVoiceSlotId<sup>7+</sup>
getDefaultVoiceSlotId\(\): Promise<number\> getDefaultVoiceSlotId\(\): Promise\<number\>
获取默认语音业务的卡槽ID。使用Promise异步回调。 获取默认语音业务的卡槽ID。使用Promise异步回调。
...@@ -119,7 +119,7 @@ promise.then(data => { ...@@ -119,7 +119,7 @@ promise.then(data => {
## sim.hasOperatorPrivileges<sup>7+</sup> ## sim.hasOperatorPrivileges<sup>7+</sup>
hasOperatorPrivileges(slotId: number, callback: AsyncCallback\<boolean\>): void hasOperatorPrivileges\(slotId: number, callback: AsyncCallback\<boolean\>\): void
检查应用(调用者)是否已被授予运营商权限。使用callback异步回调。 检查应用(调用者)是否已被授予运营商权限。使用callback异步回调。
...@@ -134,7 +134,7 @@ hasOperatorPrivileges(slotId: number, callback: AsyncCallback\<boolean\>): void ...@@ -134,7 +134,7 @@ hasOperatorPrivileges(slotId: number, callback: AsyncCallback\<boolean\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -154,7 +154,7 @@ sim.hasOperatorPrivileges(0, (err, data) => { ...@@ -154,7 +154,7 @@ sim.hasOperatorPrivileges(0, (err, data) => {
## sim.hasOperatorPrivileges<sup>7+</sup> ## sim.hasOperatorPrivileges<sup>7+</sup>
hasOperatorPrivileges(slotId: number): Promise<boolean\> hasOperatorPrivileges\(slotId: number\): Promise\<boolean\>
检查应用(调用者)是否已被授予运营商权限。使用Promise异步回调。 检查应用(调用者)是否已被授予运营商权限。使用Promise异步回调。
...@@ -174,7 +174,7 @@ hasOperatorPrivileges(slotId: number): Promise<boolean\> ...@@ -174,7 +174,7 @@ hasOperatorPrivileges(slotId: number): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -197,7 +197,7 @@ promise.then(data => { ...@@ -197,7 +197,7 @@ promise.then(data => {
## sim.getISOCountryCodeForSim ## sim.getISOCountryCodeForSim
getISOCountryCodeForSim\(slotId: number, callback: AsyncCallback<string\>\): void getISOCountryCodeForSim\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽SIM卡的ISO国家码。使用callback异步回调。 获取指定卡槽SIM卡的ISO国家码。使用callback异步回调。
...@@ -212,7 +212,7 @@ getISOCountryCodeForSim\(slotId: number, callback: AsyncCallback<string\>\): voi ...@@ -212,7 +212,7 @@ getISOCountryCodeForSim\(slotId: number, callback: AsyncCallback<string\>\): voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -234,7 +234,7 @@ sim.getISOCountryCodeForSim(0, (err, data) => { ...@@ -234,7 +234,7 @@ sim.getISOCountryCodeForSim(0, (err, data) => {
## sim.getISOCountryCodeForSim ## sim.getISOCountryCodeForSim
getISOCountryCodeForSim\(slotId: number\): Promise<string\> getISOCountryCodeForSim\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的ISO国家码。使用Promise异步回调。 获取指定卡槽SIM卡的ISO国家码。使用Promise异步回调。
...@@ -254,7 +254,7 @@ getISOCountryCodeForSim\(slotId: number\): Promise<string\> ...@@ -254,7 +254,7 @@ getISOCountryCodeForSim\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -279,7 +279,7 @@ promise.then(data => { ...@@ -279,7 +279,7 @@ promise.then(data => {
## sim.getSimOperatorNumeric ## sim.getSimOperatorNumeric
getSimOperatorNumeric\(slotId: number, callback: AsyncCallback<string\>\): void getSimOperatorNumeric\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽SIM卡的归属PLMN(Public Land Mobile Network)号。使用callback异步回调。 获取指定卡槽SIM卡的归属PLMN(Public Land Mobile Network)号。使用callback异步回调。
...@@ -294,7 +294,7 @@ getSimOperatorNumeric\(slotId: number, callback: AsyncCallback<string\>\): void ...@@ -294,7 +294,7 @@ getSimOperatorNumeric\(slotId: number, callback: AsyncCallback<string\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -316,7 +316,7 @@ sim.getSimOperatorNumeric(0, (err, data) => { ...@@ -316,7 +316,7 @@ sim.getSimOperatorNumeric(0, (err, data) => {
## sim.getSimOperatorNumeric ## sim.getSimOperatorNumeric
getSimOperatorNumeric\(slotId: number\): Promise<string\> getSimOperatorNumeric\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的归属PLMN(Public Land Mobile Network)号。使用Promise异步回调。 获取指定卡槽SIM卡的归属PLMN(Public Land Mobile Network)号。使用Promise异步回调。
...@@ -336,7 +336,7 @@ getSimOperatorNumeric\(slotId: number\): Promise<string\> ...@@ -336,7 +336,7 @@ getSimOperatorNumeric\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -361,7 +361,7 @@ promise.then(data => { ...@@ -361,7 +361,7 @@ promise.then(data => {
## sim.getSimSpn ## sim.getSimSpn
getSimSpn\(slotId: number, callback: AsyncCallback<string\>\): void getSimSpn\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽SIM卡的服务提供商名称(Service Provider Name,SPN)。使用callback异步回调。 获取指定卡槽SIM卡的服务提供商名称(Service Provider Name,SPN)。使用callback异步回调。
...@@ -376,7 +376,7 @@ getSimSpn\(slotId: number, callback: AsyncCallback<string\>\): void ...@@ -376,7 +376,7 @@ getSimSpn\(slotId: number, callback: AsyncCallback<string\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -398,7 +398,7 @@ sim.getSimSpn(0, (err, data) => { ...@@ -398,7 +398,7 @@ sim.getSimSpn(0, (err, data) => {
## sim.getSimSpn ## sim.getSimSpn
getSimSpn\(slotId: number\): Promise<string\> getSimSpn\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的服务提供商名称(Service Provider Name,SPN)。使用Promise异步回调。 获取指定卡槽SIM卡的服务提供商名称(Service Provider Name,SPN)。使用Promise异步回调。
...@@ -418,7 +418,7 @@ getSimSpn\(slotId: number\): Promise<string\> ...@@ -418,7 +418,7 @@ getSimSpn\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -443,7 +443,7 @@ promise.then(data => { ...@@ -443,7 +443,7 @@ promise.then(data => {
## sim.getSimState ## sim.getSimState
getSimState\(slotId: number, callback: AsyncCallback<SimState\>\): void getSimState\(slotId: number, callback: AsyncCallback\<SimState\>\): void
获取指定卡槽的SIM卡状态。使用callback异步回调。 获取指定卡槽的SIM卡状态。使用callback异步回调。
...@@ -458,7 +458,7 @@ getSimState\(slotId: number, callback: AsyncCallback<SimState\>\): void ...@@ -458,7 +458,7 @@ getSimState\(slotId: number, callback: AsyncCallback<SimState\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -479,7 +479,7 @@ sim.getSimState(0, (err, data) => { ...@@ -479,7 +479,7 @@ sim.getSimState(0, (err, data) => {
## sim.getSimState ## sim.getSimState
getSimState\(slotId: number\): Promise<SimState\> getSimState\(slotId: number\): Promise\<SimState\>
获取指定卡槽的SIM卡状态。使用Promise异步回调。 获取指定卡槽的SIM卡状态。使用Promise异步回调。
...@@ -499,7 +499,7 @@ getSimState\(slotId: number\): Promise<SimState\> ...@@ -499,7 +499,7 @@ getSimState\(slotId: number\): Promise<SimState\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -522,7 +522,7 @@ promise.then(data => { ...@@ -522,7 +522,7 @@ promise.then(data => {
## sim.getCardType<sup>7+</sup> ## sim.getCardType<sup>7+</sup>
getCardType\(slotId: number, callback: AsyncCallback<CardType\>\): void getCardType\(slotId: number, callback: AsyncCallback\<CardType\>\): void
获取指定卡槽SIM卡的卡类型。使用callback异步回调。 获取指定卡槽SIM卡的卡类型。使用callback异步回调。
...@@ -537,7 +537,7 @@ getCardType\(slotId: number, callback: AsyncCallback<CardType\>\): void ...@@ -537,7 +537,7 @@ getCardType\(slotId: number, callback: AsyncCallback<CardType\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -559,7 +559,7 @@ sim.getCardType(0, (err, data) => { ...@@ -559,7 +559,7 @@ sim.getCardType(0, (err, data) => {
## sim.getCardType<sup>7+</sup> ## sim.getCardType<sup>7+</sup>
getCardType\(slotId: number\): Promise<CardType\> getCardType\(slotId: number\): Promise\<CardType\>
获取指定卡槽SIM卡的卡类型。使用Promise异步回调。 获取指定卡槽SIM卡的卡类型。使用Promise异步回调。
...@@ -579,7 +579,7 @@ getCardType\(slotId: number\): Promise<CardType\> ...@@ -579,7 +579,7 @@ getCardType\(slotId: number\): Promise<CardType\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -604,7 +604,7 @@ promise.then(data => { ...@@ -604,7 +604,7 @@ promise.then(data => {
## sim.hasSimCard<sup>7+</sup> ## sim.hasSimCard<sup>7+</sup>
hasSimCard\(slotId: number, callback: AsyncCallback<boolean\>\): void hasSimCard\(slotId: number, callback: AsyncCallback\<boolean\>\): void
获取指定卡槽SIM卡是否插卡。使用callback异步回调。 获取指定卡槽SIM卡是否插卡。使用callback异步回调。
...@@ -619,7 +619,7 @@ hasSimCard\(slotId: number, callback: AsyncCallback<boolean\>\): void ...@@ -619,7 +619,7 @@ hasSimCard\(slotId: number, callback: AsyncCallback<boolean\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -640,7 +640,7 @@ sim.hasSimCard(0, (err, data) => { ...@@ -640,7 +640,7 @@ sim.hasSimCard(0, (err, data) => {
## sim.hasSimCard<sup>7+</sup> ## sim.hasSimCard<sup>7+</sup>
hasSimCard\(slotId: number\): Promise<boolean\> hasSimCard\(slotId: number\): Promise\<boolean\>
获取指定卡槽SIM卡是否插卡。使用Promise异步回调。 获取指定卡槽SIM卡是否插卡。使用Promise异步回调。
...@@ -660,7 +660,7 @@ hasSimCard\(slotId: number\): Promise<boolean\> ...@@ -660,7 +660,7 @@ hasSimCard\(slotId: number\): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -683,7 +683,7 @@ promise.then(data => { ...@@ -683,7 +683,7 @@ promise.then(data => {
## sim.getSimAccountInfo<sup>7+</sup> ## sim.getSimAccountInfo<sup>7+</sup>
getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo\>): void getSimAccountInfo\(slotId: number, callback: AsyncCallback\<IccAccountInfo\>\): void
获取SIM卡账户信息。使用callback异步回调。 获取SIM卡账户信息。使用callback异步回调。
...@@ -702,11 +702,12 @@ getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo\>): voi ...@@ -702,11 +702,12 @@ getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo\>): voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -726,7 +727,7 @@ sim.getSimAccountInfo(0, (err, data) => { ...@@ -726,7 +727,7 @@ sim.getSimAccountInfo(0, (err, data) => {
## sim.getSimAccountInfo<sup>7+</sup> ## sim.getSimAccountInfo<sup>7+</sup>
getSimAccountInfo(slotId: number): Promise<IccAccountInfo\> getSimAccountInfo\(slotId: number\): Promise\<IccAccountInfo\>
获取SIM卡账户信息。使用Promise异步回调。 获取SIM卡账户信息。使用Promise异步回调。
...@@ -750,11 +751,12 @@ getSimAccountInfo(slotId: number): Promise<IccAccountInfo\> ...@@ -750,11 +751,12 @@ getSimAccountInfo(slotId: number): Promise<IccAccountInfo\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -776,7 +778,7 @@ promise.then(data => { ...@@ -776,7 +778,7 @@ promise.then(data => {
## sim.getActiveSimAccountInfoList<sup>8+</sup> ## sim.getActiveSimAccountInfoList<sup>8+</sup>
getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): void getActiveSimAccountInfoList\(callback: AsyncCallback\<Array\<IccAccountInfo\>\>\): void
获取活跃SIM卡账户信息列表。使用callback异步回调。 获取活跃SIM卡账户信息列表。使用callback异步回调。
...@@ -794,12 +796,12 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo ...@@ -794,12 +796,12 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
...@@ -817,7 +819,7 @@ sim.getActiveSimAccountInfoList((err, data) => { ...@@ -817,7 +819,7 @@ sim.getActiveSimAccountInfoList((err, data) => {
## sim.getActiveSimAccountInfoList<sup>8+</sup> ## sim.getActiveSimAccountInfoList<sup>8+</sup>
getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo\>>; getActiveSimAccountInfoList\(\): Promise\<Array\<IccAccountInfo\>\>;
获取活跃SIM卡账户信息列表。使用Promise异步回调。 获取活跃SIM卡账户信息列表。使用Promise异步回调。
...@@ -835,13 +837,12 @@ getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo\>>; ...@@ -835,13 +837,12 @@ getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo\>>;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300004 | Do not have sim card. | | 8300004 | Do not have sim card. |
...@@ -860,7 +861,7 @@ promise.then(data => { ...@@ -860,7 +861,7 @@ promise.then(data => {
## sim.setDefaultVoiceSlotId<sup>7+</sup> ## sim.setDefaultVoiceSlotId<sup>7+</sup>
setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void\>): void setDefaultVoiceSlotId\(slotId: number, callback: AsyncCallback\<void\>\): void
设置默认语音业务的卡槽ID。使用callback异步回调。 设置默认语音业务的卡槽ID。使用callback异步回调。
...@@ -879,11 +880,12 @@ setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void\>): void ...@@ -879,11 +880,12 @@ setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -903,7 +905,7 @@ sim.setDefaultVoiceSlotId(0, (err) => { ...@@ -903,7 +905,7 @@ sim.setDefaultVoiceSlotId(0, (err) => {
## sim.setDefaultVoiceSlotId<sup>7+</sup> ## sim.setDefaultVoiceSlotId<sup>7+</sup>
setDefaultVoiceSlotId(slotId: number): Promise\<void\> setDefaultVoiceSlotId\(slotId: number\): Promise\<void\>
设置默认语音业务的卡槽ID。使用Promise异步回调。 设置默认语音业务的卡槽ID。使用Promise异步回调。
...@@ -927,11 +929,12 @@ setDefaultVoiceSlotId(slotId: number): Promise\<void\> ...@@ -927,11 +929,12 @@ setDefaultVoiceSlotId(slotId: number): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -953,7 +956,7 @@ promise.then(() => { ...@@ -953,7 +956,7 @@ promise.then(() => {
## sim.setShowName<sup>8+</sup> ## sim.setShowName<sup>8+</sup>
setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): void setShowName\(slotId: number, name: string, callback: AsyncCallback\<void\>\): void
设置指定卡槽SIM卡显示的名称。使用callback异步回调。 设置指定卡槽SIM卡显示的名称。使用callback异步回调。
...@@ -973,11 +976,12 @@ setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): voi ...@@ -973,11 +976,12 @@ setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1021,11 +1025,12 @@ setShowName\(slotId: number, name: string\): Promise\<void\> ...@@ -1021,11 +1025,12 @@ setShowName\(slotId: number, name: string\): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1047,7 +1052,7 @@ promise.then(() => { ...@@ -1047,7 +1052,7 @@ promise.then(() => {
## sim.getShowName<sup>8+</sup> ## sim.getShowName<sup>8+</sup>
getShowName(slotId: number, callback: AsyncCallback<string\>): void getShowName\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽SIM卡的名称。使用callback异步回调。 获取指定卡槽SIM卡的名称。使用callback异步回调。
...@@ -1066,11 +1071,12 @@ getShowName(slotId: number, callback: AsyncCallback<string\>): void ...@@ -1066,11 +1071,12 @@ getShowName(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1089,7 +1095,7 @@ sim.getShowName(0, (err, data) => { ...@@ -1089,7 +1095,7 @@ sim.getShowName(0, (err, data) => {
## sim.getShowName<sup>8+</sup> ## sim.getShowName<sup>8+</sup>
getShowName(slotId: number): Promise<string\> getShowName\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的名称。使用Promise异步回调。 获取指定卡槽SIM卡的名称。使用Promise异步回调。
...@@ -1113,11 +1119,12 @@ getShowName(slotId: number): Promise<string\> ...@@ -1113,11 +1119,12 @@ getShowName(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1138,7 +1145,7 @@ promise.then(data => { ...@@ -1138,7 +1145,7 @@ promise.then(data => {
## sim.setShowNumber<sup>8+</sup> ## sim.setShowNumber<sup>8+</sup>
setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\): void setShowNumber\(slotId: number, number: string, callback: AsyncCallback\<void\>\): void
设置指定卡槽SIM卡的号码。使用callback异步回调。 设置指定卡槽SIM卡的号码。使用callback异步回调。
...@@ -1158,11 +1165,12 @@ setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\): ...@@ -1158,11 +1165,12 @@ setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1207,11 +1215,12 @@ setShowNumber\(slotId: number, number: string\): Promise\<void\> ...@@ -1207,11 +1215,12 @@ setShowNumber\(slotId: number, number: string\): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1233,7 +1242,7 @@ promise.then(() => { ...@@ -1233,7 +1242,7 @@ promise.then(() => {
## sim.getShowNumber<sup>8+</sup> ## sim.getShowNumber<sup>8+</sup>
getShowNumber(slotId: number, callback: AsyncCallback<string\>): void getShowNumber\(slotId: number, callback: AsyncCallback\<string\>): void
获取指定卡槽SIM卡的号码。使用callback异步回调。 获取指定卡槽SIM卡的号码。使用callback异步回调。
...@@ -1252,11 +1261,12 @@ getShowNumber(slotId: number, callback: AsyncCallback<string\>): void ...@@ -1252,11 +1261,12 @@ getShowNumber(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1275,7 +1285,7 @@ sim.getShowNumber(0, (err, data) => { ...@@ -1275,7 +1285,7 @@ sim.getShowNumber(0, (err, data) => {
## sim.getShowNumber<sup>8+</sup> ## sim.getShowNumber<sup>8+</sup>
getShowNumber(slotId: number): Promise<string\> getShowNumber\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的号码。使用Promise异步回调。 获取指定卡槽SIM卡的号码。使用Promise异步回调。
...@@ -1299,11 +1309,12 @@ getShowNumber(slotId: number): Promise<string\> ...@@ -1299,11 +1309,12 @@ getShowNumber(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1324,7 +1335,7 @@ promise.then(data => { ...@@ -1324,7 +1335,7 @@ promise.then(data => {
## sim.activateSim<sup>8+</sup> ## sim.activateSim<sup>8+</sup>
activateSim(slotId: number, callback: AsyncCallback<void\>): void activateSim\(slotId: number, callback: AsyncCallback\<void\>\): void
激活指定卡槽SIM卡。使用callback异步回调。 激活指定卡槽SIM卡。使用callback异步回调。
...@@ -1343,11 +1354,12 @@ activateSim(slotId: number, callback: AsyncCallback<void\>): void ...@@ -1343,11 +1354,12 @@ activateSim(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1366,7 +1378,7 @@ sim.activateSim(0, (err) => { ...@@ -1366,7 +1378,7 @@ sim.activateSim(0, (err) => {
## sim.activateSim<sup>8+</sup> ## sim.activateSim<sup>8+</sup>
activateSim(slotId: number): Promise\<void\> activateSim\(slotId: number\): Promise\<void\>
激活指定卡槽SIM卡。使用Promise异步回调。 激活指定卡槽SIM卡。使用Promise异步回调。
...@@ -1390,11 +1402,12 @@ activateSim(slotId: number): Promise\<void\> ...@@ -1390,11 +1402,12 @@ activateSim(slotId: number): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1415,7 +1428,7 @@ promise.then(() => { ...@@ -1415,7 +1428,7 @@ promise.then(() => {
## sim.deactivateSim<sup>8+</sup> ## sim.deactivateSim<sup>8+</sup>
deactivateSim(slotId: number, callback: AsyncCallback<void\>): void deactivateSim\(slotId: number, callback: AsyncCallback\<void\>\): void
禁用指定卡槽SIM卡。使用callback异步回调。 禁用指定卡槽SIM卡。使用callback异步回调。
...@@ -1434,11 +1447,12 @@ deactivateSim(slotId: number, callback: AsyncCallback<void\>): void ...@@ -1434,11 +1447,12 @@ deactivateSim(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1457,7 +1471,7 @@ sim.deactivateSim(0, (err) => { ...@@ -1457,7 +1471,7 @@ sim.deactivateSim(0, (err) => {
## sim.deactivateSim<sup>8+</sup> ## sim.deactivateSim<sup>8+</sup>
deactivateSim(slotId: number): Promise\<void\> deactivateSim\(slotId: number\): Promise\<void\>
禁用指定卡槽SIM卡。使用Promise异步回调。 禁用指定卡槽SIM卡。使用Promise异步回调。
...@@ -1481,11 +1495,12 @@ deactivateSim(slotId: number): Promise\<void\> ...@@ -1481,11 +1495,12 @@ deactivateSim(slotId: number): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1506,7 +1521,7 @@ promise.then(() => { ...@@ -1506,7 +1521,7 @@ promise.then(() => {
## sim.setLockState<sup>7+</sup> ## sim.setLockState<sup>7+</sup>
setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStatusResponse\>): void setLockState\(slotId: number, options: LockInfo, callback: AsyncCallback\<LockStatusResponse\>\): void
设置指定卡槽SIM卡的锁状态。使用callback异步回调。 设置指定卡槽SIM卡的锁状态。使用callback异步回调。
...@@ -1526,11 +1541,12 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat ...@@ -1526,11 +1541,12 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1555,7 +1571,7 @@ sim.setLockState(0, lockInfo, (err, data) => { ...@@ -1555,7 +1571,7 @@ sim.setLockState(0, lockInfo, (err, data) => {
## sim.setLockState<sup>7+</sup> ## sim.setLockState<sup>7+</sup>
setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\> setLockState\(slotId: number, options: LockInfo\): Promise\<LockStatusResponse\>
设置指定卡槽SIM卡的锁状态。使用Promise异步回调。 设置指定卡槽SIM卡的锁状态。使用Promise异步回调。
...@@ -1580,11 +1596,12 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\> ...@@ -1580,11 +1596,12 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1611,7 +1628,7 @@ promise.then(data => { ...@@ -1611,7 +1628,7 @@ promise.then(data => {
## sim.getLockState<sup>8+</sup> ## sim.getLockState<sup>8+</sup>
getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockState\>): void getLockState\(slotId: number, lockType: LockType, callback: AsyncCallback\<LockState\>\): void
获取指定卡槽SIM卡的锁状态。使用callback异步回调。 获取指定卡槽SIM卡的锁状态。使用callback异步回调。
...@@ -1631,11 +1648,12 @@ getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockSta ...@@ -1631,11 +1648,12 @@ getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockSta
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1655,7 +1673,7 @@ sim.getLockState(0, 1, (err, data) => { ...@@ -1655,7 +1673,7 @@ sim.getLockState(0, 1, (err, data) => {
## sim.getLockState<sup>8+</sup> ## sim.getLockState<sup>8+</sup>
getLockState(slotId: number, lockType: LockType): Promise<LockState\> getLockState\(slotId: number, lockType: LockType\): Promise\<LockState\>
获取指定卡槽SIM卡的锁状态。使用Promise异步回调。 获取指定卡槽SIM卡的锁状态。使用Promise异步回调。
...@@ -1680,11 +1698,12 @@ getLockState(slotId: number, lockType: LockType): Promise<LockState\> ...@@ -1680,11 +1698,12 @@ getLockState(slotId: number, lockType: LockType): Promise<LockState\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1706,7 +1725,7 @@ promise.then(data => { ...@@ -1706,7 +1725,7 @@ promise.then(data => {
## sim.alterPin<sup>7+</sup> ## sim.alterPin<sup>7+</sup>
alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback<LockStatusResponse\>): void alterPin\(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback\<LockStatusResponse\>\): void
更改Pin密码。使用callback异步回调。 更改Pin密码。使用callback异步回调。
...@@ -1727,11 +1746,12 @@ alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback ...@@ -1727,11 +1746,12 @@ alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1751,7 +1771,7 @@ sim.alterPin(0, "1234", "0000", (err, data) => { ...@@ -1751,7 +1771,7 @@ sim.alterPin(0, "1234", "0000", (err, data) => {
## sim.alterPin<sup>7+</sup> ## sim.alterPin<sup>7+</sup>
alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResponse\>; alterPin\(slotId: number, newPin: string, oldPin: string\): Promise\<LockStatusResponse\>;
更改Pin密码。使用Promise异步回调。 更改Pin密码。使用Promise异步回调。
...@@ -1777,11 +1797,12 @@ alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResp ...@@ -1777,11 +1797,12 @@ alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResp
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1803,7 +1824,7 @@ promise.then(data => { ...@@ -1803,7 +1824,7 @@ promise.then(data => {
## sim.alterPin2<sup>8+</sup> ## sim.alterPin2<sup>8+</sup>
alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallback<LockStatusResponse\>): void alterPin2\(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallback\<LockStatusResponse\>\): void
更改Pin2密码。使用callback异步回调。 更改Pin2密码。使用callback异步回调。
...@@ -1824,11 +1845,12 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallb ...@@ -1824,11 +1845,12 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallb
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1848,7 +1870,7 @@ sim.alterPin2(0, "1234", "0000", (err, data) => { ...@@ -1848,7 +1870,7 @@ sim.alterPin2(0, "1234", "0000", (err, data) => {
## sim.alterPin2<sup>8+</sup> ## sim.alterPin2<sup>8+</sup>
alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusResponse\> alterPin2\(slotId: number, newPin2: string, oldPin2: string\): Promise\<LockStatusResponse\>
更改Pin2密码。使用Promise异步回调。 更改Pin2密码。使用Promise异步回调。
...@@ -1874,11 +1896,12 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusR ...@@ -1874,11 +1896,12 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusR
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1900,7 +1923,7 @@ promise.then(data => { ...@@ -1900,7 +1923,7 @@ promise.then(data => {
## sim.unlockPin<sup>7+</sup> ## sim.unlockPin<sup>7+</sup>
unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPin\(slotId: number, pin: string, callback: AsyncCallback\<LockStatusResponse\>\): void
解锁指定卡槽SIM卡密码。使用callback异步回调。 解锁指定卡槽SIM卡密码。使用callback异步回调。
...@@ -1920,11 +1943,12 @@ unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusRespons ...@@ -1920,11 +1943,12 @@ unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusRespons
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1945,7 +1969,7 @@ sim.unlockPin(0, pin, (err, data) => { ...@@ -1945,7 +1969,7 @@ sim.unlockPin(0, pin, (err, data) => {
## sim.unlockPin<sup>7+</sup> ## sim.unlockPin<sup>7+</sup>
unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\> unlockPin\(slotId: number, pin: string\): Promise\<LockStatusResponse\>
解锁指定卡槽SIM卡密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码。使用Promise异步回调。
...@@ -1970,11 +1994,12 @@ unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\> ...@@ -1970,11 +1994,12 @@ unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1997,7 +2022,7 @@ promise.then(data => { ...@@ -1997,7 +2022,7 @@ promise.then(data => {
## sim.unlockPuk<sup>7+</sup> ## sim.unlockPuk<sup>7+</sup>
unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPuk\(slotId: number, newPin: string, puk: string, callback: AsyncCallback\<LockStatusResponse\>\): void
解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。
...@@ -2018,11 +2043,12 @@ unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<L ...@@ -2018,11 +2043,12 @@ unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<L
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2044,7 +2070,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => { ...@@ -2044,7 +2070,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => {
## sim.unlockPuk<sup>7+</sup> ## sim.unlockPuk<sup>7+</sup>
unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusResponse\> unlockPuk\(slotId: number, newPin: string, puk: string\): Promise\<LockStatusResponse\>
解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。
...@@ -2070,11 +2096,12 @@ unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusRes ...@@ -2070,11 +2096,12 @@ unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusRes
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2098,7 +2125,7 @@ promise.then(data => { ...@@ -2098,7 +2125,7 @@ promise.then(data => {
## sim.unlockPin2<sup>8+</sup> ## sim.unlockPin2<sup>8+</sup>
unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPin2\(slotId: number, pin2: string, callback: AsyncCallback\<LockStatusResponse\>\): void
解锁指定卡槽SIM卡密码。使用callback异步回调。 解锁指定卡槽SIM卡密码。使用callback异步回调。
...@@ -2118,11 +2145,12 @@ unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusRespo ...@@ -2118,11 +2145,12 @@ unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusRespo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2143,7 +2171,7 @@ sim.unlockPin2(0, pin2, (err, data) => { ...@@ -2143,7 +2171,7 @@ sim.unlockPin2(0, pin2, (err, data) => {
## sim.unlockPin2<sup>8+</sup> ## sim.unlockPin2<sup>8+</sup>
unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\> unlockPin2\(slotId: number, pin2: string\): Promise\<LockStatusResponse\>
解锁指定卡槽SIM卡密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码。使用Promise异步回调。
...@@ -2168,11 +2196,12 @@ unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\> ...@@ -2168,11 +2196,12 @@ unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2195,7 +2224,7 @@ promise.then(data => { ...@@ -2195,7 +2224,7 @@ promise.then(data => {
## sim.unlockPuk2<sup>8+</sup> ## sim.unlockPuk2<sup>8+</sup>
unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPuk2\(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback\<LockStatusResponse\>\): void
解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。
...@@ -2216,7 +2245,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallbac ...@@ -2216,7 +2245,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallbac
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2242,7 +2271,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => { ...@@ -2242,7 +2271,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => {
## sim.unlockPuk2<sup>8+</sup> ## sim.unlockPuk2<sup>8+</sup>
unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatusResponse\> unlockPuk2\(slotId: number, newPin2: string, puk2: string\): Promise\<LockStatusResponse\>
解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。
...@@ -2268,7 +2297,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatus ...@@ -2268,7 +2297,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatus
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -2316,7 +2345,7 @@ console.log("Result: "+ sim.getMaxSimCount()) ...@@ -2316,7 +2345,7 @@ console.log("Result: "+ sim.getMaxSimCount())
## sim.getSimIccId<sup>7+</sup> ## sim.getSimIccId<sup>7+</sup>
getSimIccId(slotId: number, callback: AsyncCallback<string\>): void getSimIccId\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽SIM卡的ICCID。使用callback异步回调。 获取指定卡槽SIM卡的ICCID。使用callback异步回调。
...@@ -2335,11 +2364,12 @@ getSimIccId(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2335,11 +2364,12 @@ getSimIccId(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2358,7 +2388,7 @@ sim.getSimIccId(0, (err, data) => { ...@@ -2358,7 +2388,7 @@ sim.getSimIccId(0, (err, data) => {
## sim.getSimIccId<sup>7+</sup> ## sim.getSimIccId<sup>7+</sup>
getSimIccId(slotId: number): Promise<string\> getSimIccId\(slotId: number\): Promise\<string\>
获取指定卡槽SIM卡的ICCID。使用Promise异步回调。 获取指定卡槽SIM卡的ICCID。使用Promise异步回调。
...@@ -2382,11 +2412,12 @@ getSimIccId(slotId: number): Promise<string\> ...@@ -2382,11 +2412,12 @@ getSimIccId(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2407,7 +2438,7 @@ promise.then(data => { ...@@ -2407,7 +2438,7 @@ promise.then(data => {
## sim.getVoiceMailIdentifier<sup>8+</sup> ## sim.getVoiceMailIdentifier<sup>8+</sup>
getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string\>): void getVoiceMailIdentifier\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽中SIM卡语音信箱的alpha标识符。使用callback异步回调。 获取指定卡槽中SIM卡语音信箱的alpha标识符。使用callback异步回调。
...@@ -2426,11 +2457,12 @@ getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2426,11 +2457,12 @@ getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2449,7 +2481,7 @@ sim.getVoiceMailIdentifier(0, (err, data) => { ...@@ -2449,7 +2481,7 @@ sim.getVoiceMailIdentifier(0, (err, data) => {
## sim.getVoiceMailIdentifier<sup>8+</sup> ## sim.getVoiceMailIdentifier<sup>8+</sup>
getVoiceMailIdentifier(slotId: number): Promise<string\> getVoiceMailIdentifier\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡语音信箱的alpha标识符。使用Promise异步回调。 获取指定卡槽中SIM卡语音信箱的alpha标识符。使用Promise异步回调。
...@@ -2473,11 +2505,12 @@ getVoiceMailIdentifier(slotId: number): Promise<string\> ...@@ -2473,11 +2505,12 @@ getVoiceMailIdentifier(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2498,7 +2531,7 @@ promise.then(data => { ...@@ -2498,7 +2531,7 @@ promise.then(data => {
## sim.getVoiceMailNumber<sup>8+</sup> ## sim.getVoiceMailNumber<sup>8+</sup>
getVoiceMailNumber(slotId: number, callback: AsyncCallback<string\>): void getVoiceMailNumber\(slotId: number, callback: AsyncCallback\<string\>): void
获取指定卡槽中SIM卡的语音信箱号。使用callback异步回调。 获取指定卡槽中SIM卡的语音信箱号。使用callback异步回调。
...@@ -2517,11 +2550,12 @@ getVoiceMailNumber(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2517,11 +2550,12 @@ getVoiceMailNumber(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2540,7 +2574,7 @@ sim.getVoiceMailNumber(0, (err, data) => { ...@@ -2540,7 +2574,7 @@ sim.getVoiceMailNumber(0, (err, data) => {
## sim.getVoiceMailNumber<sup>8+</sup> ## sim.getVoiceMailNumber<sup>8+</sup>
getVoiceMailNumber(slotId: number): Promise<string\> getVoiceMailNumber\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡的语音信箱号。使用Promise异步回调。 获取指定卡槽中SIM卡的语音信箱号。使用Promise异步回调。
...@@ -2564,11 +2598,12 @@ getVoiceMailNumber(slotId: number): Promise<string\> ...@@ -2564,11 +2598,12 @@ getVoiceMailNumber(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2590,7 +2625,7 @@ promise.then(data => { ...@@ -2590,7 +2625,7 @@ promise.then(data => {
## sim.setVoiceMailInfo<sup>8+</sup> ## sim.setVoiceMailInfo<sup>8+</sup>
setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: AsyncCallback<void\>): void setVoiceMailInfo\(slotId: number, mailName: string, mailNumber: string, callback: AsyncCallback\<void\>\): void
设置语音邮件信息。使用callback异步回调。 设置语音邮件信息。使用callback异步回调。
...@@ -2611,11 +2646,12 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: ...@@ -2611,11 +2646,12 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback:
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2635,7 +2671,7 @@ sim.setVoiceMailInfo(0, "mail", "xxx@xxx.com", (err) => { ...@@ -2635,7 +2671,7 @@ sim.setVoiceMailInfo(0, "mail", "xxx@xxx.com", (err) => {
## sim.setVoiceMailInfo<sup>8+</sup> ## sim.setVoiceMailInfo<sup>8+</sup>
setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<void\> setVoiceMailInfo\(slotId: number, mailName: string, mailNumber: string\): Promise\<void\>
设置语音邮件信息。使用Promise异步回调。 设置语音邮件信息。使用Promise异步回调。
...@@ -2661,11 +2697,12 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise< ...@@ -2661,11 +2697,12 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2687,7 +2724,7 @@ promise.then(() => { ...@@ -2687,7 +2724,7 @@ promise.then(() => {
## sim.getSimTelephoneNumber<sup>8+</sup> ## sim.getSimTelephoneNumber<sup>8+</sup>
getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string\>): void getSimTelephoneNumber\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽中SIM卡的MSISDN。使用callback异步回调。 获取指定卡槽中SIM卡的MSISDN。使用callback异步回调。
...@@ -2706,11 +2743,12 @@ getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2706,11 +2743,12 @@ getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2729,7 +2767,7 @@ sim.getSimTelephoneNumber(0, (err, data) => { ...@@ -2729,7 +2767,7 @@ sim.getSimTelephoneNumber(0, (err, data) => {
## sim.getSimTelephoneNumber<sup>8+</sup> ## sim.getSimTelephoneNumber<sup>8+</sup>
getSimTelephoneNumber(slotId: number): Promise<string\> getSimTelephoneNumber\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡的MSISDN。使用Promise异步回调。 获取指定卡槽中SIM卡的MSISDN。使用Promise异步回调。
...@@ -2753,11 +2791,12 @@ getSimTelephoneNumber(slotId: number): Promise<string\> ...@@ -2753,11 +2791,12 @@ getSimTelephoneNumber(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2778,7 +2817,7 @@ promise.then(data => { ...@@ -2778,7 +2817,7 @@ promise.then(data => {
## sim.getSimGid1<sup>7+</sup> ## sim.getSimGid1<sup>7+</sup>
getSimGid1(slotId: number, callback: AsyncCallback<string\>): void getSimGid1\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽中SIM卡的组标识符级别1(GID1)。使用callback异步回调。 获取指定卡槽中SIM卡的组标识符级别1(GID1)。使用callback异步回调。
...@@ -2797,11 +2836,12 @@ getSimGid1(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2797,11 +2836,12 @@ getSimGid1(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2820,7 +2860,7 @@ sim.getSimGid1(0, (err, data) => { ...@@ -2820,7 +2860,7 @@ sim.getSimGid1(0, (err, data) => {
## sim.getSimGid1<sup>7+</sup> ## sim.getSimGid1<sup>7+</sup>
getSimGid1(slotId: number): Promise<string\> getSimGid1\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡的组标识符级别1(GID1)。使用Promise异步回调。 获取指定卡槽中SIM卡的组标识符级别1(GID1)。使用Promise异步回调。
...@@ -2844,11 +2884,12 @@ getSimGid1(slotId: number): Promise<string\> ...@@ -2844,11 +2884,12 @@ getSimGid1(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2869,7 +2910,7 @@ promise.then(data => { ...@@ -2869,7 +2910,7 @@ promise.then(data => {
## sim.getIMSI ## sim.getIMSI
getIMSI(slotId: number, callback: AsyncCallback<string\>): void getIMSI\(slotId: number, callback: AsyncCallback\<string\>\): void
获取国际移动用户识别码。使用callback异步回调。 获取国际移动用户识别码。使用callback异步回调。
...@@ -2888,11 +2929,12 @@ getIMSI(slotId: number, callback: AsyncCallback<string\>): void ...@@ -2888,11 +2929,12 @@ getIMSI(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2911,7 +2953,7 @@ sim.getIMSI(0, (err, data) => { ...@@ -2911,7 +2953,7 @@ sim.getIMSI(0, (err, data) => {
## sim.getIMSI ## sim.getIMSI
getIMSI(slotId: number): Promise<string\> getIMSI\(slotId: number\): Promise\<string\>
获取国际移动用户识别码。使用Promise异步回调。 获取国际移动用户识别码。使用Promise异步回调。
...@@ -2935,11 +2977,12 @@ getIMSI(slotId: number): Promise<string\> ...@@ -2935,11 +2977,12 @@ getIMSI(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -2960,7 +3003,7 @@ promise.then(data => { ...@@ -2960,7 +3003,7 @@ promise.then(data => {
## sim.getOperatorConfigs<sup>8+</sup> ## sim.getOperatorConfigs<sup>8+</sup>
getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig\>>): void getOperatorConfigs\(slotId: number, callback: AsyncCallback\<Array\<OperatorConfig\>\>\): void
获取运营商配置。使用callback异步回调。 获取运营商配置。使用callback异步回调。
...@@ -2979,11 +3022,12 @@ getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig\ ...@@ -2979,11 +3022,12 @@ getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3001,7 +3045,7 @@ sim.getOperatorConfigs(0, (err, data) => { ...@@ -3001,7 +3045,7 @@ sim.getOperatorConfigs(0, (err, data) => {
## sim.getOperatorConfigs<sup>8+</sup> ## sim.getOperatorConfigs<sup>8+</sup>
getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig\>> getOperatorConfigs\(slotId: number\): Promise\<Array\<OperatorConfig\>\>
获取运营商配置。使用Promise异步回调。 获取运营商配置。使用Promise异步回调。
...@@ -3025,11 +3069,12 @@ getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig\>> ...@@ -3025,11 +3069,12 @@ getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig\>>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3049,7 +3094,7 @@ promise.then(data => { ...@@ -3049,7 +3094,7 @@ promise.then(data => {
## sim.queryIccDiallingNumbers<sup>8+</sup> ## sim.queryIccDiallingNumbers<sup>8+</sup>
queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallback<Array<DiallingNumbersInfo\>>): void queryIccDiallingNumbers\(slotId: number, type: ContactType, callback: AsyncCallback\<Array\<DiallingNumbersInfo\>\>\): void
查询SIM卡联系人号码。使用callback异步回调。 查询SIM卡联系人号码。使用callback异步回调。
...@@ -3069,11 +3114,12 @@ queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallba ...@@ -3069,11 +3114,12 @@ queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallba
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3093,7 +3139,7 @@ sim.queryIccDiallingNumbers(0, 1, (err, data) => { ...@@ -3093,7 +3139,7 @@ sim.queryIccDiallingNumbers(0, 1, (err, data) => {
## sim.queryIccDiallingNumbers<sup>8+</sup> ## sim.queryIccDiallingNumbers<sup>8+</sup>
queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<DiallingNumbersInfo\>> queryIccDiallingNumbers\(slotId: number, type: ContactType\): Promise\<Array\<DiallingNumbersInfo\>\>
查询SIM卡联系人号码。使用Promise异步回调。 查询SIM卡联系人号码。使用Promise异步回调。
...@@ -3118,11 +3164,12 @@ queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<Dialli ...@@ -3118,11 +3164,12 @@ queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<Dialli
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3144,7 +3191,7 @@ promise.then(data => { ...@@ -3144,7 +3191,7 @@ promise.then(data => {
## sim.addIccDiallingNumbers<sup>8+</sup> ## sim.addIccDiallingNumbers<sup>8+</sup>
addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void\>): void addIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback\<void\>\): void
添加SIM卡联系人号码。使用callback异步回调。 添加SIM卡联系人号码。使用callback异步回调。
...@@ -3165,11 +3212,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -3165,11 +3212,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3194,7 +3242,7 @@ sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersIno ...@@ -3194,7 +3242,7 @@ sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersIno
## sim.addIccDiallingNumbers<sup>8+</sup> ## sim.addIccDiallingNumbers<sup>8+</sup>
addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void\> addIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo\): Promise\<void\>
添加SIM卡联系人号码。使用Promise异步回调。 添加SIM卡联系人号码。使用Promise异步回调。
...@@ -3220,11 +3268,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -3220,11 +3268,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3250,7 +3299,7 @@ promise.then(() => { ...@@ -3250,7 +3299,7 @@ promise.then(() => {
## sim.delIccDiallingNumbers<sup>8+</sup> ## sim.delIccDiallingNumbers<sup>8+</sup>
delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void\>): void delIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback\<void\>\): void
删除SIM卡联系人号码。使用callback异步回调。 删除SIM卡联系人号码。使用callback异步回调。
...@@ -3271,11 +3320,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -3271,11 +3320,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3301,7 +3351,7 @@ sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersIno ...@@ -3301,7 +3351,7 @@ sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersIno
## sim.delIccDiallingNumbers<sup>8+</sup> ## sim.delIccDiallingNumbers<sup>8+</sup>
delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void\> delIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo\): Promise\<void\>
删除SIM卡联系人号码。使用Promise异步回调。 删除SIM卡联系人号码。使用Promise异步回调。
...@@ -3327,11 +3377,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -3327,11 +3377,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3357,7 +3408,7 @@ promise.then(() => { ...@@ -3357,7 +3408,7 @@ promise.then(() => {
## sim.updateIccDiallingNumbers<sup>8+</sup> ## sim.updateIccDiallingNumbers<sup>8+</sup>
updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback<void\>): void updateIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo, callback: AsyncCallback\<void\>\): void
更新SIM卡联系人号码。使用callback异步回调。 更新SIM卡联系人号码。使用callback异步回调。
...@@ -3378,11 +3429,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia ...@@ -3378,11 +3429,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3408,7 +3460,7 @@ sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbers ...@@ -3408,7 +3460,7 @@ sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbers
## sim.updateIccDiallingNumbers<sup>8+</sup> ## sim.updateIccDiallingNumbers<sup>8+</sup>
updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo): Promise<void\> updateIccDiallingNumbers\(slotId: number, type: ContactType, diallingNumbers: DiallingNumbersInfo\): Promise\<void\>
更新SIM卡联系人号码。使用Promise异步回调。 更新SIM卡联系人号码。使用Promise异步回调。
...@@ -3434,11 +3486,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia ...@@ -3434,11 +3486,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3465,7 +3518,7 @@ promise.then(() => { ...@@ -3465,7 +3518,7 @@ promise.then(() => {
## sim.sendEnvelopeCmd<sup>8+</sup> ## sim.sendEnvelopeCmd<sup>8+</sup>
sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void\>): void sendEnvelopeCmd\(slotId: number, cmd: string, callback: AsyncCallback\<void\>\): void
发送信封命令。使用callback异步回调。 发送信封命令。使用callback异步回调。
...@@ -3485,11 +3538,12 @@ sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void\>): vo ...@@ -3485,11 +3538,12 @@ sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void\>): vo
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3508,7 +3562,7 @@ sim.sendEnvelopeCmd(0, "ls", (err) => { ...@@ -3508,7 +3562,7 @@ sim.sendEnvelopeCmd(0, "ls", (err) => {
## sim.sendEnvelopeCmd<sup>8+</sup> ## sim.sendEnvelopeCmd<sup>8+</sup>
sendEnvelopeCmd(slotId: number, cmd: string): Promise<void\> sendEnvelopeCmd\(slotId: number, cmd: string\): Promise\<void\>
发送信封命令。使用Promise异步回调。 发送信封命令。使用Promise异步回调。
...@@ -3533,11 +3587,12 @@ sendEnvelopeCmd(slotId: number, cmd: string): Promise<void\> ...@@ -3533,11 +3587,12 @@ sendEnvelopeCmd(slotId: number, cmd: string): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3558,7 +3613,7 @@ promise.then(() => { ...@@ -3558,7 +3613,7 @@ promise.then(() => {
## sim.sendTerminalResponseCmd<sup>8+</sup> ## sim.sendTerminalResponseCmd<sup>8+</sup>
sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<void\>): void sendTerminalResponseCmd\(slotId: number, cmd: string, callback: AsyncCallback\<void\>\): void
发送终端响应命令。使用callback异步回调。 发送终端响应命令。使用callback异步回调。
...@@ -3578,11 +3633,12 @@ sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<voi ...@@ -3578,11 +3633,12 @@ sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<voi
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3601,7 +3657,7 @@ sim.sendTerminalResponseCmd(0, "ls", (err) => { ...@@ -3601,7 +3657,7 @@ sim.sendTerminalResponseCmd(0, "ls", (err) => {
## sim.sendTerminalResponseCmd<sup>8+</sup> ## sim.sendTerminalResponseCmd<sup>8+</sup>
sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void\> sendTerminalResponseCmd\(slotId: number, cmd: string\): Promise\<void\>
发送终端响应命令。使用Promise异步回调。 发送终端响应命令。使用Promise异步回调。
...@@ -3626,11 +3682,12 @@ sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void\> ...@@ -3626,11 +3682,12 @@ sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3652,7 +3709,7 @@ promise.then(() => { ...@@ -3652,7 +3709,7 @@ promise.then(() => {
## sim.unlockSimLock<sup>8+</sup> ## sim.unlockSimLock<sup>8+</sup>
unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<LockStatusResponse\>): void unlockSimLock\(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback\<LockStatusResponse\>\): void
解锁SIM卡锁。使用callback异步回调。 解锁SIM卡锁。使用callback异步回调。
...@@ -3672,11 +3729,12 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L ...@@ -3672,11 +3729,12 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3700,7 +3758,7 @@ sim.unlockSimLock(0, persoLockInfo, (err, data) => { ...@@ -3700,7 +3758,7 @@ sim.unlockSimLock(0, persoLockInfo, (err, data) => {
## sim.unlockSimLock<sup>8+</sup> ## sim.unlockSimLock<sup>8+</sup>
unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusResponse\> unlockSimLock\(slotId: number, lockInfo: PersoLockInfo\): Promise\<LockStatusResponse\>
解锁SIM卡锁。使用Promise异步回调。 解锁SIM卡锁。使用Promise异步回调。
...@@ -3725,11 +3783,12 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon ...@@ -3725,11 +3783,12 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -3755,7 +3814,7 @@ promise.then(data => { ...@@ -3755,7 +3814,7 @@ promise.then(data => {
## sim.getOpKey<sup>9+</sup> ## sim.getOpKey<sup>9+</sup>
getOpKey(slotId: number, callback: AsyncCallback<string\>): void getOpKey\(slotId: number, callback: AsyncCallback\<string\>): void
获取指定卡槽中SIM卡的opkey。使用callback异步回调。 获取指定卡槽中SIM卡的opkey。使用callback异步回调。
...@@ -3770,7 +3829,7 @@ getOpKey(slotId: number, callback: AsyncCallback<string\>): void ...@@ -3770,7 +3829,7 @@ getOpKey(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3800,7 +3859,7 @@ try { ...@@ -3800,7 +3859,7 @@ try {
## sim.getOpKey<sup>9+</sup> ## sim.getOpKey<sup>9+</sup>
getOpKey(slotId: number): Promise<string\> getOpKey\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡的opkey。使用Promise异步回调。 获取指定卡槽中SIM卡的opkey。使用Promise异步回调。
...@@ -3820,7 +3879,7 @@ getOpKey(slotId: number): Promise<string\> ...@@ -3820,7 +3879,7 @@ getOpKey(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3844,7 +3903,7 @@ try { ...@@ -3844,7 +3903,7 @@ try {
## sim.getOpName<sup>9+</sup> ## sim.getOpName<sup>9+</sup>
getOpName(slotId: number, callback: AsyncCallback<string\>): void getOpName\(slotId: number, callback: AsyncCallback\<string\>\): void
获取指定卡槽中SIM卡的OpName。使用callback异步回调。 获取指定卡槽中SIM卡的OpName。使用callback异步回调。
...@@ -3859,7 +3918,7 @@ getOpName(slotId: number, callback: AsyncCallback<string\>): void ...@@ -3859,7 +3918,7 @@ getOpName(slotId: number, callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -3889,7 +3948,7 @@ try { ...@@ -3889,7 +3948,7 @@ try {
## sim.getOpName<sup>9+</sup> ## sim.getOpName<sup>9+</sup>
getOpName(slotId: number): Promise<string\> getOpName\(slotId: number\): Promise\<string\>
获取指定卡槽中SIM卡的OpName。使用Promise异步回调。 获取指定卡槽中SIM卡的OpName。使用Promise异步回调。
...@@ -3909,7 +3968,7 @@ getOpName(slotId: number): Promise<string\> ...@@ -3909,7 +3968,7 @@ getOpName(slotId: number): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
......
...@@ -14,7 +14,7 @@ import sms from '@ohos.telephony.sms'; ...@@ -14,7 +14,7 @@ import sms from '@ohos.telephony.sms';
## sms.createMessage ## sms.createMessage
createMessage\(pdu: Array&lt;number&gt;, specification: string, callback: AsyncCallback<ShortMessage\>\): void createMessage\(pdu: Array&lt;number&gt;, specification: string, callback: AsyncCallback\<ShortMessage\>\): void
根据协议数据单元(PDU)和指定的短信协议创建短信实例。使用callback异步回调。 根据协议数据单元(PDU)和指定的短信协议创建短信实例。使用callback异步回调。
...@@ -28,6 +28,18 @@ createMessage\(pdu: Array&lt;number&gt;, specification: string, callback: AsyncC ...@@ -28,6 +28,18 @@ createMessage\(pdu: Array&lt;number&gt;, specification: string, callback: AsyncC
| specification | string | 是 | 短信协议类型。<br/>- 3gpp:表示GSM/UMTS/LTE SMS<br/>- 3gpp2:表示CDMA SMS | | specification | string | 是 | 短信协议类型。<br/>- 3gpp:表示GSM/UMTS/LTE SMS<br/>- 3gpp2:表示CDMA SMS |
| callback | AsyncCallback&lt;[ShortMessage](#shortmessage)&gt; | 是 | 回调函数。 | | callback | AsyncCallback&lt;[ShortMessage](#shortmessage)&gt; | 是 | 回调函数。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 |
| -------- | -------------------------------------------- |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
```js ```js
...@@ -42,7 +54,7 @@ sms.createMessage(pdu, specification, (err, data) => { ...@@ -42,7 +54,7 @@ sms.createMessage(pdu, specification, (err, data) => {
## sms.createMessage ## sms.createMessage
createMessage\(pdu: Array&lt;number&gt;, specification: string\): Promise<ShortMessage\> createMessage\(pdu: Array&lt;number&gt;, specification: string\): Promise\<ShortMessage\>
根据协议数据单元(PDU)和指定的短信协议创建短信实例。使用Promise异步回调。 根据协议数据单元(PDU)和指定的短信协议创建短信实例。使用Promise异步回调。
...@@ -61,6 +73,18 @@ createMessage\(pdu: Array&lt;number&gt;, specification: string\): Promise<ShortM ...@@ -61,6 +73,18 @@ createMessage\(pdu: Array&lt;number&gt;, specification: string\): Promise<ShortM
| -------------------------------------------- | --------------------------------- | | -------------------------------------------- | --------------------------------- |
| Promise&lt;[ShortMessage](#shortmessage)&gt; | 以Promise形式返回创建的短信实例。 | | Promise&lt;[ShortMessage](#shortmessage)&gt; | 以Promise形式返回创建的短信实例。 |
**错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 |
| -------- | -------------------------------------------- |
| 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. |
| 8300999 | Unknown error code. |
**示例:** **示例:**
```js ```js
...@@ -77,7 +101,7 @@ promise.then(data => { ...@@ -77,7 +101,7 @@ promise.then(data => {
## sms.sendMessage ## sms.sendMessage
sendMessage(options: SendMessageOptions): void sendMessage\(options: SendMessageOptions\): void
发送短信。 发送短信。
...@@ -93,7 +117,7 @@ sendMessage(options: SendMessageOptions): void ...@@ -93,7 +117,7 @@ sendMessage(options: SendMessageOptions): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -192,11 +216,12 @@ setDefaultSmsSlotId\(slotId: number, callback: AsyncCallback&lt;void&gt;\): void ...@@ -192,11 +216,12 @@ setDefaultSmsSlotId\(slotId: number, callback: AsyncCallback&lt;void&gt;\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -239,11 +264,12 @@ setDefaultSmsSlotId\(slotId: number\): Promise&lt;void&gt; ...@@ -239,11 +264,12 @@ setDefaultSmsSlotId\(slotId: number\): Promise&lt;void&gt;
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -264,7 +290,7 @@ promise.then(() => { ...@@ -264,7 +290,7 @@ promise.then(() => {
## sms.setSmscAddr<sup>7+</sup> ## sms.setSmscAddr<sup>7+</sup>
setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback<void\>\): void setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback\<void\>\): void
设置短信服务中心(SMSC)地址。使用callback异步回调。 设置短信服务中心(SMSC)地址。使用callback异步回调。
...@@ -284,11 +310,12 @@ setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback<void\>\): ...@@ -284,11 +310,12 @@ setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback<void\>\):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -333,11 +360,12 @@ setSmscAddr\(slotId: number, smscAddr: string\): Promise\<void\> ...@@ -333,11 +360,12 @@ setSmscAddr\(slotId: number, smscAddr: string\): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -360,7 +388,7 @@ promise.then(() => { ...@@ -360,7 +388,7 @@ promise.then(() => {
## sms.getSmscAddr<sup>7+</sup> ## sms.getSmscAddr<sup>7+</sup>
getSmscAddr\(slotId: number, callback: AsyncCallback<string\>\): void getSmscAddr\(slotId: number, callback: AsyncCallback\<string\>\): void
获取短信服务中心(SMSC)地址。使用callback异步回调。 获取短信服务中心(SMSC)地址。使用callback异步回调。
...@@ -379,11 +407,12 @@ getSmscAddr\(slotId: number, callback: AsyncCallback<string\>\): void ...@@ -379,11 +407,12 @@ getSmscAddr\(slotId: number, callback: AsyncCallback<string\>\): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -402,7 +431,7 @@ sms.getSmscAddr(slotId, (err, data) => { ...@@ -402,7 +431,7 @@ sms.getSmscAddr(slotId, (err, data) => {
## sms.getSmscAddr<sup>7+</sup> ## sms.getSmscAddr<sup>7+</sup>
getSmscAddr\(slotId: number\): Promise<string\> getSmscAddr\(slotId: number\): Promise\<string\>
获取短信服务中心(SMSC)地址。使用Promise异步回调。 获取短信服务中心(SMSC)地址。使用Promise异步回调。
...@@ -426,11 +455,12 @@ getSmscAddr\(slotId: number\): Promise<string\> ...@@ -426,11 +455,12 @@ getSmscAddr\(slotId: number\): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -451,7 +481,7 @@ promise.then(data => { ...@@ -451,7 +481,7 @@ promise.then(data => {
## sms.hasSmsCapability<sup>7+</sup> ## sms.hasSmsCapability<sup>7+</sup>
hasSmsCapability(): boolean hasSmsCapability\(\): boolean
检查当前设备是否具备短信发送和接收能力,该方法是同步方法。 检查当前设备是否具备短信发送和接收能力,该方法是同步方法。
...@@ -470,7 +500,7 @@ console.log(`hasSmsCapability: ${JSON.stringify(result)}`); ...@@ -470,7 +500,7 @@ console.log(`hasSmsCapability: ${JSON.stringify(result)}`);
## sms.splitMessage<sup>8+</sup> ## sms.splitMessage<sup>8+</sup>
splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void splitMessage\(content: string, callback: AsyncCallback\<Array\<string\>\>\): void
将长短信拆分为多个片段。使用callback异步回调。 将长短信拆分为多个片段。使用callback异步回调。
...@@ -489,11 +519,12 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void ...@@ -489,11 +519,12 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -512,7 +543,7 @@ sms.splitMessage(content, (err, data) => { ...@@ -512,7 +543,7 @@ sms.splitMessage(content, (err, data) => {
## sms.splitMessage<sup>8+</sup> ## sms.splitMessage<sup>8+</sup>
splitMessage(content: string): Promise<Array<string\>> splitMessage\(content: string\): Promise\<Array\<string\>\>
将长短信拆分为多个片段。使用Promise异步回调。 将长短信拆分为多个片段。使用Promise异步回调。
...@@ -536,11 +567,12 @@ splitMessage(content: string): Promise<Array<string\>> ...@@ -536,11 +567,12 @@ splitMessage(content: string): Promise<Array<string\>>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -561,7 +593,7 @@ promise.then(data => { ...@@ -561,7 +593,7 @@ promise.then(data => {
## sms.addSimMessage<sup>7+</sup> ## sms.addSimMessage<sup>7+</sup>
addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void addSimMessage\(options: SimMessageOptions, callback: AsyncCallback\<void\>\): void
添加SIM卡消息。使用callback异步回调。 添加SIM卡消息。使用callback异步回调。
...@@ -580,11 +612,12 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void ...@@ -580,11 +612,12 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -608,7 +641,7 @@ sms.addSimMessage(simMessageOptions, (err) => { ...@@ -608,7 +641,7 @@ sms.addSimMessage(simMessageOptions, (err) => {
## sms.addSimMessage<sup>7+</sup> ## sms.addSimMessage<sup>7+</sup>
addSimMessage(options: SimMessageOptions): Promise<void\> addSimMessage\(options: SimMessageOptions\): Promise\<void\>
添加SIM卡消息。使用Promise异步回调。 添加SIM卡消息。使用Promise异步回调。
...@@ -632,11 +665,12 @@ addSimMessage(options: SimMessageOptions): Promise<void\> ...@@ -632,11 +665,12 @@ addSimMessage(options: SimMessageOptions): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -662,7 +696,7 @@ promise.then(() => { ...@@ -662,7 +696,7 @@ promise.then(() => {
## sms.delSimMessage<sup>7+</sup> ## sms.delSimMessage<sup>7+</sup>
delSimMessage(slotId: number, msgIndex: number, callback: AsyncCallback<void\>): void delSimMessage\(slotId: number, msgIndex: number, callback: AsyncCallback\<void\>\): void
删除SIM卡消息。使用callback异步回调。 删除SIM卡消息。使用callback异步回调。
...@@ -682,11 +716,12 @@ delSimMessage(slotId: number, msgIndex: number, callback: AsyncCallback<void\>): ...@@ -682,11 +716,12 @@ delSimMessage(slotId: number, msgIndex: number, callback: AsyncCallback<void\>):
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -706,7 +741,7 @@ sms.delSimMessage(slotId, msgIndex, (err) => { ...@@ -706,7 +741,7 @@ sms.delSimMessage(slotId, msgIndex, (err) => {
## sms.delSimMessage<sup>7+</sup> ## sms.delSimMessage<sup>7+</sup>
delSimMessage(slotId: number, msgIndex: number): Promise<void\> delSimMessage\(slotId: number, msgIndex: number\): Promise\<void\>
删除SIM卡信息。使用Promise异步回调。 删除SIM卡信息。使用Promise异步回调。
...@@ -731,11 +766,12 @@ delSimMessage(slotId: number, msgIndex: number): Promise<void\> ...@@ -731,11 +766,12 @@ delSimMessage(slotId: number, msgIndex: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -757,7 +793,7 @@ promise.then(() => { ...@@ -757,7 +793,7 @@ promise.then(() => {
## sms.updateSimMessage<sup>7+</sup> ## sms.updateSimMessage<sup>7+</sup>
updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\>): void updateSimMessage\(options: UpdateSimMessageOptions, callback: AsyncCallback\<void\>\): void
更新SIM卡消息。使用callback异步回调。 更新SIM卡消息。使用callback异步回调。
...@@ -776,11 +812,12 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\ ...@@ -776,11 +812,12 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -805,7 +842,7 @@ sms.updateSimMessage(updateSimMessageOptions, (err) => { ...@@ -805,7 +842,7 @@ sms.updateSimMessage(updateSimMessageOptions, (err) => {
## sms.updateSimMessage<sup>7+</sup> ## sms.updateSimMessage<sup>7+</sup>
updateSimMessage(options: UpdateSimMessageOptions): Promise<void\> updateSimMessage\(options: UpdateSimMessageOptions\): Promise\<void\>
更新SIM卡消息。使用Promise异步回调。 更新SIM卡消息。使用Promise异步回调。
...@@ -829,11 +866,12 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\> ...@@ -829,11 +866,12 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -860,7 +898,7 @@ promise.then(() => { ...@@ -860,7 +898,7 @@ promise.then(() => {
## sms.getAllSimMessages<sup>7+</sup> ## sms.getAllSimMessages<sup>7+</sup>
getAllSimMessages(slotId: number, callback: AsyncCallback<Array<SimShortMessage\>>): void getAllSimMessages\(slotId: number, callback: AsyncCallback\<Array\<SimShortMessage\>\>\): void
获取所有SIM卡消息。使用callback异步回调。 获取所有SIM卡消息。使用callback异步回调。
...@@ -879,11 +917,12 @@ getAllSimMessages(slotId: number, callback: AsyncCallback<Array<SimShortMessage\ ...@@ -879,11 +917,12 @@ getAllSimMessages(slotId: number, callback: AsyncCallback<Array<SimShortMessage\
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -902,7 +941,7 @@ sms.getAllSimMessages(slotId, (err, data) => { ...@@ -902,7 +941,7 @@ sms.getAllSimMessages(slotId, (err, data) => {
## sms.getAllSimMessages<sup>7+</sup> ## sms.getAllSimMessages<sup>7+</sup>
getAllSimMessages(slotId: number): Promise<Array<SimShortMessage\>> getAllSimMessages\(slotId: number\): Promise\<Array\<SimShortMessage\>\>
获取所有SIM卡消息。使用Promise异步回调。 获取所有SIM卡消息。使用Promise异步回调。
...@@ -926,11 +965,12 @@ getAllSimMessages(slotId: number): Promise<Array<SimShortMessage\>> ...@@ -926,11 +965,12 @@ getAllSimMessages(slotId: number): Promise<Array<SimShortMessage\>>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -951,7 +991,7 @@ promise.then(data => { ...@@ -951,7 +991,7 @@ promise.then(data => {
## sms.setCBConfig<sup>7+</sup> ## sms.setCBConfig<sup>7+</sup>
setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void setCBConfig\(options: CBConfigOptions, callback: AsyncCallback\<void\>\): void
设置小区广播配置。使用callback异步回调。 设置小区广播配置。使用callback异步回调。
...@@ -970,11 +1010,12 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void ...@@ -970,11 +1010,12 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -999,7 +1040,7 @@ sms.setCBConfig(cbConfigOptions, (err) => { ...@@ -999,7 +1040,7 @@ sms.setCBConfig(cbConfigOptions, (err) => {
## sms.setCBConfig<sup>7+</sup> ## sms.setCBConfig<sup>7+</sup>
setCBConfig(options: CBConfigOptions): Promise<void\> setCBConfig\(options: CBConfigOptions\): Promise\<void\>
设置小区广播配置。使用Promise异步回调。 设置小区广播配置。使用Promise异步回调。
...@@ -1023,11 +1064,12 @@ setCBConfig(options: CBConfigOptions): Promise<void\> ...@@ -1023,11 +1064,12 @@ setCBConfig(options: CBConfigOptions): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1054,7 +1096,7 @@ promise.then(() => { ...@@ -1054,7 +1096,7 @@ promise.then(() => {
## sms.getSmsSegmentsInfo<sup>8+</sup> ## sms.getSmsSegmentsInfo<sup>8+</sup>
getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean, callback: AsyncCallback<SmsSegmentsInfo\>): void getSmsSegmentsInfo\(slotId: number, message: string, force7bit: boolean, callback: AsyncCallback\<SmsSegmentsInfo\>\): void
获取短信段信息。使用callback异步回调。 获取短信段信息。使用callback异步回调。
...@@ -1073,10 +1115,11 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean, callback ...@@ -1073,10 +1115,11 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean, callback
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1095,7 +1138,7 @@ sms.getSmsSegmentsInfo(slotId, "message", false, (err, data) => { ...@@ -1095,7 +1138,7 @@ sms.getSmsSegmentsInfo(slotId, "message", false, (err, data) => {
## sms.getSmsSegmentsInfo<sup>8+</sup> ## sms.getSmsSegmentsInfo<sup>8+</sup>
getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise<SmsSegmentsInfo\> getSmsSegmentsInfo\(slotId: number, message: string, force7bit: boolean\): Promise\<SmsSegmentsInfo\>
获取短信段信息。使用Promise异步回调。 获取短信段信息。使用Promise异步回调。
...@@ -1119,10 +1162,11 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise ...@@ -1119,10 +1162,11 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1143,7 +1187,7 @@ promise.then(data => { ...@@ -1143,7 +1187,7 @@ promise.then(data => {
## sms.isImsSmsSupported<sup>8+</sup> ## sms.isImsSmsSupported<sup>8+</sup>
isImsSmsSupported(slotId: number, callback: AsyncCallback<boolean\>): void isImsSmsSupported\(slotId: number, callback: AsyncCallback\<boolean\>\): void
如果IMS已注册并且在IMS上支持SMS,则支持通过IMS发送SMS。使用callback异步回调。 如果IMS已注册并且在IMS上支持SMS,则支持通过IMS发送SMS。使用callback异步回调。
...@@ -1160,10 +1204,11 @@ isImsSmsSupported(slotId: number, callback: AsyncCallback<boolean\>): void ...@@ -1160,10 +1204,11 @@ isImsSmsSupported(slotId: number, callback: AsyncCallback<boolean\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1182,7 +1227,7 @@ sms.isImsSmsSupported(slotId, (err, data) => { ...@@ -1182,7 +1227,7 @@ sms.isImsSmsSupported(slotId, (err, data) => {
## sms.isImsSmsSupported<sup>8+</sup> ## sms.isImsSmsSupported<sup>8+</sup>
isImsSmsSupported(slotId: number): Promise<boolean\> isImsSmsSupported\(slotId: number\): Promise\<boolean\>
如果IMS已注册并且在IMS上支持SMS,则支持通过IMS发送SMS。使用Promise异步回调。 如果IMS已注册并且在IMS上支持SMS,则支持通过IMS发送SMS。使用Promise异步回调。
...@@ -1204,10 +1249,11 @@ isImsSmsSupported(slotId: number): Promise<boolean\> ...@@ -1204,10 +1249,11 @@ isImsSmsSupported(slotId: number): Promise<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1228,7 +1274,7 @@ promise.then(data => { ...@@ -1228,7 +1274,7 @@ promise.then(data => {
## sms.getImsShortMessageFormat<sup>8+</sup> ## sms.getImsShortMessageFormat<sup>8+</sup>
getImsShortMessageFormat(callback: AsyncCallback<string\>): void getImsShortMessageFormat\(callback: AsyncCallback\<string\>\): void
获取IMS上支持的SMS格式。使用callback异步回调。 获取IMS上支持的SMS格式。使用callback异步回调。
...@@ -1244,10 +1290,11 @@ getImsShortMessageFormat(callback: AsyncCallback<string\>): void ...@@ -1244,10 +1290,11 @@ getImsShortMessageFormat(callback: AsyncCallback<string\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -1265,7 +1312,7 @@ sms.getImsShortMessageFormat((err, data) => { ...@@ -1265,7 +1312,7 @@ sms.getImsShortMessageFormat((err, data) => {
## sms.getImsShortMessageFormat<sup>8+</sup> ## sms.getImsShortMessageFormat<sup>8+</sup>
getImsShortMessageFormat(): Promise<string\> getImsShortMessageFormat\(\): Promise\<string\>
获取IMS上支持的SMS格式。使用Promise异步回调。 获取IMS上支持的SMS格式。使用Promise异步回调。
...@@ -1281,12 +1328,11 @@ getImsShortMessageFormat(): Promise<string\> ...@@ -1281,12 +1328,11 @@ getImsShortMessageFormat(): Promise<string\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -1304,7 +1350,7 @@ promise.then(data => { ...@@ -1304,7 +1350,7 @@ promise.then(data => {
## sms.decodeMms<sup>8+</sup> ## sms.decodeMms<sup>8+</sup>
decodeMms(mmsFilePathName: string | Array<number\>, callback: AsyncCallback<MmsInformation\>): void decodeMms\(mmsFilePathName: string | Array\<number\>, callback: AsyncCallback\<MmsInformation\>\): void
彩信解码。使用callback异步回调。 彩信解码。使用callback异步回调。
...@@ -1321,7 +1367,7 @@ decodeMms(mmsFilePathName: string | Array<number\>, callback: AsyncCallback<MmsI ...@@ -1321,7 +1367,7 @@ decodeMms(mmsFilePathName: string | Array<number\>, callback: AsyncCallback<MmsI
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1343,7 +1389,7 @@ sms.decodeMms(mmsFilePathName, (err, data) => { ...@@ -1343,7 +1389,7 @@ sms.decodeMms(mmsFilePathName, (err, data) => {
## sms.decodeMms<sup>8+</sup> ## sms.decodeMms<sup>8+</sup>
decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\> decodeMms\(mmsFilePathName: string | Array\<number\>\): Promise\<MmsInformation\>
彩信解码。使用Promise异步回调。 彩信解码。使用Promise异步回调。
...@@ -1365,7 +1411,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\> ...@@ -1365,7 +1411,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1389,7 +1435,7 @@ promise.then(data => { ...@@ -1389,7 +1435,7 @@ promise.then(data => {
## sms.encodeMms<sup>8+</sup> ## sms.encodeMms<sup>8+</sup>
encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number\>>): void encodeMms\(mms: MmsInformation, callback: AsyncCallback\<Array\<number\>\>\): void
彩信编码。使用callback异步回调。 彩信编码。使用callback异步回调。
...@@ -1406,7 +1452,7 @@ encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number\>>): void ...@@ -1406,7 +1452,7 @@ encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number\>>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -1436,7 +1482,7 @@ sms.encodeMms(mmsInformation, (err, data) => { ...@@ -1436,7 +1482,7 @@ sms.encodeMms(mmsInformation, (err, data) => {
## sms.encodeMms<sup>8+</sup> ## sms.encodeMms<sup>8+</sup>
encodeMms(mms: MmsInformation): Promise<Array<number\>> encodeMms\(mms: MmsInformation\): Promise\<Array\<number\>\>
彩信编码。使用Promise异步回调。 彩信编码。使用Promise异步回调。
...@@ -1458,7 +1504,7 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>> ...@@ -1458,7 +1504,7 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
......
...@@ -100,11 +100,12 @@ setDefaultCellularDataSlotId(slotId: number, callback: AsyncCallback\<void\>): v ...@@ -100,11 +100,12 @@ setDefaultCellularDataSlotId(slotId: number, callback: AsyncCallback\<void\>): v
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -147,11 +148,12 @@ setDefaultCellularDataSlotId(slotId: number): Promise\<void\> ...@@ -147,11 +148,12 @@ setDefaultCellularDataSlotId(slotId: number): Promise\<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -283,7 +285,7 @@ isCellularDataEnabled(callback: AsyncCallback\<boolean\>): void ...@@ -283,7 +285,7 @@ isCellularDataEnabled(callback: AsyncCallback\<boolean\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -320,13 +322,12 @@ isCellularDataEnabled(): Promise\<boolean\> ...@@ -320,13 +322,12 @@ isCellularDataEnabled(): Promise\<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -361,7 +362,7 @@ isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback\<boolean\>) ...@@ -361,7 +362,7 @@ isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback\<boolean\>)
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -404,7 +405,7 @@ isCellularDataRoamingEnabled(slotId: number): Promise\<boolean\> ...@@ -404,7 +405,7 @@ isCellularDataRoamingEnabled(slotId: number): Promise\<boolean\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
...@@ -428,7 +429,7 @@ promise.then((data) => { ...@@ -428,7 +429,7 @@ promise.then((data) => {
## data.enableCellularData ## data.enableCellularData
enableCellularData(callback: AsyncCallback<void\>): void enableCellularData(callback: AsyncCallback\<void\>): void
启用蜂窝数据服务,使用callback方式作为异步方法。 启用蜂窝数据服务,使用callback方式作为异步方法。
...@@ -446,11 +447,12 @@ enableCellularData(callback: AsyncCallback<void\>): void ...@@ -446,11 +447,12 @@ enableCellularData(callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -467,7 +469,7 @@ data.enableCellularData((err) => { ...@@ -467,7 +469,7 @@ data.enableCellularData((err) => {
## data.enableCellularData ## data.enableCellularData
enableCellularData(): Promise<void\> enableCellularData(): Promise\<void\>
启用蜂窝数据服务,使用Promise方式作为异步方法。 启用蜂窝数据服务,使用Promise方式作为异步方法。
...@@ -485,13 +487,12 @@ enableCellularData(): Promise<void\> ...@@ -485,13 +487,12 @@ enableCellularData(): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -509,7 +510,7 @@ promise.then(() => { ...@@ -509,7 +510,7 @@ promise.then(() => {
## data.disableCellularData ## data.disableCellularData
disableCellularData(callback: AsyncCallback<void\>): void disableCellularData(callback: AsyncCallback\<void\>): void
禁用蜂窝数据服务,使用callback方式作为异步方法。 禁用蜂窝数据服务,使用callback方式作为异步方法。
...@@ -527,11 +528,12 @@ disableCellularData(callback: AsyncCallback<void\>): void ...@@ -527,11 +528,12 @@ disableCellularData(callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -548,7 +550,7 @@ data.disableCellularData((err) => { ...@@ -548,7 +550,7 @@ data.disableCellularData((err) => {
## data.disableCellularData ## data.disableCellularData
disableCellularData(): Promise<void\> disableCellularData(): Promise\<void\>
禁用蜂窝数据服务,使用Promise方式作为异步方法。 禁用蜂窝数据服务,使用Promise方式作为异步方法。
...@@ -566,13 +568,12 @@ disableCellularData(): Promise<void\> ...@@ -566,13 +568,12 @@ disableCellularData(): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 401 | Parameter error. | | 202 | Non-system applications use system APIs. |
| 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
| 8300003 | System internal error. | | 8300003 | System internal error. |
| 8300999 | Unknown error code. | | 8300999 | Unknown error code. |
...@@ -590,7 +591,7 @@ promise.then(() => { ...@@ -590,7 +591,7 @@ promise.then(() => {
## data.enableCellularDataRoaming ## data.enableCellularDataRoaming
enableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void enableCellularDataRoaming(slotId: number, callback: AsyncCallback\<void\>): void
启用蜂窝数据漫游,使用callback方式作为异步方法。 启用蜂窝数据漫游,使用callback方式作为异步方法。
...@@ -609,11 +610,12 @@ enableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void ...@@ -609,11 +610,12 @@ enableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -630,7 +632,7 @@ data.enableCellularDataRoaming(0, (err) => { ...@@ -630,7 +632,7 @@ data.enableCellularDataRoaming(0, (err) => {
## data.enableCellularDataRoaming ## data.enableCellularDataRoaming
enableCellularDataRoaming(slotId: number): Promise<void\> enableCellularDataRoaming(slotId: number): Promise\<void\>
启用蜂窝数据漫游,使用Promise方式作为异步方法。 启用蜂窝数据漫游,使用Promise方式作为异步方法。
...@@ -654,11 +656,12 @@ enableCellularDataRoaming(slotId: number): Promise<void\> ...@@ -654,11 +656,12 @@ enableCellularDataRoaming(slotId: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -678,7 +681,7 @@ promise.then(() => { ...@@ -678,7 +681,7 @@ promise.then(() => {
## data.disableCellularDataRoaming ## data.disableCellularDataRoaming
disableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void disableCellularDataRoaming(slotId: number, callback: AsyncCallback\<void\>): void
禁用蜂窝数据漫游,使用callback方式作为异步方法。 禁用蜂窝数据漫游,使用callback方式作为异步方法。
...@@ -697,11 +700,12 @@ disableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void ...@@ -697,11 +700,12 @@ disableCellularDataRoaming(slotId: number, callback: AsyncCallback<void\>): void
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
...@@ -718,7 +722,7 @@ data.disableCellularDataRoaming(0, (err) => { ...@@ -718,7 +722,7 @@ data.disableCellularDataRoaming(0, (err) => {
## data.disableCellularDataRoaming ## data.disableCellularDataRoaming
disableCellularDataRoaming(slotId: number): Promise<void\> disableCellularDataRoaming(slotId: number): Promise\<void\>
禁用蜂窝数据漫游,使用Promise方式作为异步方法。 禁用蜂窝数据漫游,使用Promise方式作为异步方法。
...@@ -742,11 +746,12 @@ disableCellularDataRoaming(slotId: number): Promise<void\> ...@@ -742,11 +746,12 @@ disableCellularDataRoaming(slotId: number): Promise<void\>
**错误码:** **错误码:**
以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)错误码 以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| -------- | -------------------------------------------- | | -------- | -------------------------------------------- |
| 201 | Permission denied. | | 201 | Permission denied. |
| 202 | Non-system applications use system APIs. |
| 401 | Parameter error. | | 401 | Parameter error. |
| 8300001 | Invalid parameter value. | | 8300001 | Invalid parameter value. |
| 8300002 | Operation failed. Cannot connect to service. | | 8300002 | Operation failed. Cannot connect to service. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册