提交 76796f9f 编写于 作者: S shawn_he

update doc

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 aff329ec
......@@ -70,7 +70,7 @@ let promise = radio.getRadioTech(slotId);
promise.then(data => {
console.log(`getRadioTech success, data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getRadioTech fail, err->${JSON.stringify(err)}`);
console.log(`getRadioTech failed, err->${JSON.stringify(err)}`);
});
```
......@@ -157,7 +157,7 @@ let promise = radio.getNetworkState(slotId);
promise.then(data => {
console.log(`getNetworkState success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getNetworkState fail, promise: err->${JSON.stringify(err)}`);
console.log(`getNetworkState failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -215,7 +215,7 @@ let promise = radio.getNetworkSelectionMode(slotId);
promise.then(data => {
console.log(`getNetworkSelectionMode success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getNetworkSelectionMode fail, promise: err->${JSON.stringify(err)}`);
console.log(`getNetworkSelectionMode failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -273,7 +273,7 @@ let promise = radio.getISOCountryCodeForNetwork(slotId);
promise.then(data => {
console.log(`getISOCountryCodeForNetwork success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getISOCountryCodeForNetwork fail, promise: err->${JSON.stringify(err)}`);
console.log(`getISOCountryCodeForNetwork failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -322,7 +322,7 @@ let promise = radio.getPrimarySlotId();
promise.then(data => {
console.log(`getPrimarySlotId success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getPrimarySlotId fail, promise: err->${JSON.stringify(err)}`);
console.error(`getPrimarySlotId failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -380,7 +380,7 @@ let promise = radio.getSignalInformation(slotId);
promise.then(data => {
console.log(`getSignalInformation success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getSignalInformation fail, promise: err->${JSON.stringify(err)}`);
console.error(`getSignalInformation failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -496,7 +496,7 @@ let promise = radio.isRadioOn(slotId);
promise.then(data => {
console.log(`isRadioOn success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`isRadioOn fail, promise: err->${JSON.stringify(err)}`);
console.error(`isRadioOn failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -554,7 +554,7 @@ let promise = radio.getOperatorName(slotId);
promise.then(data => {
console.log(`getOperatorName success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getOperatorName fail, promise: err->${JSON.stringify(err)}`);
console.log(`getOperatorName failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -564,7 +564,7 @@ setPrimarySlotId(slotId: number, callback: AsyncCallback<void\>): void
Sets the ID of the slot in which the primary card is located. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -593,7 +593,7 @@ setPrimarySlotId\(slotId: number\): Promise\<void\>
Sets the ID of the slot in which the primary card is located. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -619,7 +619,7 @@ let promise = radio.setPrimarySlotId(slotId);
promise.then(data => {
console.log(`setPrimarySlotId success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`setPrimarySlotId fail, promise: err->${JSON.stringify(err)}`);
console.log(`setPrimarySlotId failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -629,7 +629,7 @@ getIMEI(callback: AsyncCallback<string\>): void
Obtains the IMEI of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -656,7 +656,7 @@ getIMEI(slotId: number, callback: AsyncCallback<string\>): void
Obtains the IMEI of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -685,7 +685,7 @@ getIMEI(slotId?: number): Promise<string\>
Obtains the IMEI of the SIM card in a card slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -711,7 +711,7 @@ let promise = radio.getIMEI(slotId);
promise.then(data => {
console.log(`getIMEI success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getIMEI fail, promise: err->${JSON.stringify(err)}`);
console.error(`getIMEI failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -721,7 +721,7 @@ getMEID(callback: AsyncCallback<string\>): void
Obtains the MEID of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -748,7 +748,7 @@ getMEID(slotId: number, callback: AsyncCallback<string\>): void
Obtains the MEID of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -777,7 +777,7 @@ getMEID(slotId?: number): Promise<string\>
Obtains the MEID of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -803,7 +803,7 @@ let promise = radio.getMEID(slotId);
promise.then(data => {
console.log(`getMEID success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getMEID fail, promise: err->${JSON.stringify(err)}`);
console.error(`getMEID failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -813,7 +813,7 @@ getUniqueDeviceId(callback: AsyncCallback<string\>): void
Obtains the unique device ID of the SIM card in a card slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -840,7 +840,7 @@ getUniqueDeviceId(slotId: number, callback: AsyncCallback<string\>): void
Obtains the unique device ID of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -869,7 +869,7 @@ getUniqueDeviceId(slotId?: number): Promise<string\>
Obtains the unique device ID of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -895,7 +895,7 @@ let promise = radio.getUniqueDeviceId(slotId);
promise.then(data => {
console.log(`getUniqueDeviceId success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getUniqueDeviceId fail, promise: err->${JSON.stringify(err)}`);
console.error(`getUniqueDeviceId failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -905,7 +905,7 @@ sendUpdateCellLocationRequest\(callback: AsyncCallback<void\>\): void
Sends a cell location update request. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -929,7 +929,7 @@ sendUpdateCellLocationRequest\(slotId: number, callback: AsyncCallback<void\>\):
Sends a cell location update request for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -955,7 +955,7 @@ sendUpdateCellLocationRequest\(slotId?: number): Promise<void\>
Sends a cell location update request for the SIM card in the specified slot.This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -979,7 +979,7 @@ let promise = radio.sendUpdateCellLocationRequest(slotId);
promise.then(data => {
console.log(`sendUpdateCellLocationRequest success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`sendUpdateCellLocationRequest fail, promise: err->${JSON.stringify(err)}`);
console.log(`sendUpdateCellLocationRequest failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -989,7 +989,7 @@ getCellInformation(callback: AsyncCallback<Array<CellInformation\>>): void
Obtains cell information. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION
......@@ -1016,7 +1016,7 @@ getCellInformation(slotId: number, callback: AsyncCallback<Array<CellInformation
Obtains cell information for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION
......@@ -1045,7 +1045,7 @@ getCellInformation(slotId?: number): Promise<Array<CellInformation\>\>
Obtains cell information for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permissions**: ohos.permission.LOCATION
......@@ -1071,7 +1071,7 @@ let promise = radio.getCellInformation(slotId);
promise.then(data => {
console.log(`getCellInformation success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getCellInformation fail, promise: err->${JSON.stringify(err)}`);
console.error(`getCellInformation failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1081,7 +1081,7 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa
Sets the network selection mode. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1120,7 +1120,7 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\>
Sets the network selection mode. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1157,7 +1157,7 @@ let promise = radio.setNetworkSelectionMode(networkSelectionModeOptions);
promise.then(data => {
console.log(`setNetworkSelectionMode success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`setNetworkSelectionMode fail, promise: err->${JSON.stringify(err)}`);
console.log(`setNetworkSelectionMode failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1167,7 +1167,7 @@ getNetworkSearchInformation\(slotId: number, callback: AsyncCallback<NetworkSear
Obtains network search information for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1194,7 +1194,7 @@ getNetworkSearchInformation\(slotId: number\): Promise<void\>
Obtains network search information for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1219,7 +1219,7 @@ let promise = radio.getNetworkSearchInformation(0);
promise.then(data => {
console.log(`getNetworkSearchInformation success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getNetworkSearchInformation fail, promise: err->${JSON.stringify(err)}`);
console.log(`getNetworkSearchInformation failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1229,7 +1229,7 @@ getNrOptionMode(callback: AsyncCallback<NrOptionMode\>): void
Obtains the NR option mode. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1254,7 +1254,7 @@ getNrOptionMode(slotId: number, callback: AsyncCallback<NrOptionMode\>): void
Obtains the NR option mode for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1281,7 +1281,7 @@ getNrOptionMode(slotId?: number): Promise<NrOptionMode\>
Obtains the NR option mode for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1305,7 +1305,7 @@ let promise = radio.getNrOptionMode(slotId);
promise.then(data => {
console.log(`getNrOptionMode success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getNrOptionMode fail, promise: err->${JSON.stringify(err)}`);
console.error(`getNrOptionMode failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1315,7 +1315,7 @@ turnOnRadio(callback: AsyncCallback<void\>): void
Turns on the radio function. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1342,7 +1342,7 @@ turnOnRadio(slotId: number, callback: AsyncCallback<void\>): void
Turns on the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1371,7 +1371,7 @@ turnOnRadio(slotId?: number): Promise<void\>
Turns on the radio function for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1397,7 +1397,7 @@ let promise = radio.turnOnRadio(slotId);
promise.then(data => {
console.log(`turnOnRadio success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`turnOnRadio fail, promise: err->${JSON.stringify(err)}`);
console.error(`turnOnRadio failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1407,7 +1407,7 @@ turnOffRadio(callback: AsyncCallback<void\>): void
Turns off the radio function. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1434,7 +1434,7 @@ turnOffRadio(slotId: number, callback: AsyncCallback<void\>): void
Turns off the radio function for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1463,7 +1463,7 @@ turnOffRadio(slotId?: number): Promise<void\>
Turns off the radio function for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1489,7 +1489,7 @@ let promise = radio.turnOffRadio(slotId);
promise.then(data => {
console.log(`turnOffRadio success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`turnOffRadio fail, promise: err->${JSON.stringify(err)}`);
console.error(`turnOffRadio failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1499,7 +1499,7 @@ setPreferredNetwork\(slotId: number, networkMode: PreferredNetworkMode, callback
Sets the preferred network for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1527,7 +1527,7 @@ setPreferredNetwork(slotId: number, networkMode: PreferredNetworkMode): Promise<
Sets the preferred network for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1553,7 +1553,7 @@ let promise = radio.setPreferredNetwork(0, 1);
promise.then(data => {
console.log(`setPreferredNetwork success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`setPreferredNetwork fail, promise: err->${JSON.stringify(err)}`);
console.log(`setPreferredNetwork failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1563,7 +1563,7 @@ getPreferredNetwork\(slotId: number, callback: AsyncCallback<PreferredNetworkMod
Obtains the preferred network for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1590,7 +1590,7 @@ getPreferredNetwork(slotId: number): Promise<void\>
Obtains the preferred network for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1615,7 +1615,7 @@ let promise = radio.getPreferredNetwork(0);
promise.then(data => {
console.log(`getPreferredNetwork success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getPreferredNetwork fail, promise: err->${JSON.stringify(err)}`);
console.log(`getPreferredNetwork failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1625,7 +1625,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I
Obtains the IMS registration status of the specified IMS service type for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1653,7 +1653,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\>
Obtains the IMS registration status of the specified IMS service type for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1679,7 +1679,7 @@ let promise = radio.getImsRegInfo(0, 1);
promise.then(data => {
console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.log(`getImsRegInfo fail, promise: err->${JSON.stringify(err)}`);
console.log(`getImsRegInfo failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1689,7 +1689,7 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback:
Enables listening for **imsRegStateChange** events for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1718,7 +1718,7 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback
Disables listening for **imsRegStateChange** events for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1857,7 +1857,7 @@ Enumerates network selection modes.
Enumerates preferred network modes.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1902,7 +1902,7 @@ This is a system API.
Defines the cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1918,7 +1918,7 @@ This is a system API.
Defines the CDMA cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1934,7 +1934,7 @@ This is a system API.
Defines the GSM cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1951,7 +1951,7 @@ This is a system API.
Defines the LTE cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1970,7 +1970,7 @@ This is a system API.
Defines the NR cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1987,7 +1987,7 @@ This is a system API.
Defines the TD-SCDMA cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2004,7 +2004,7 @@ This is a system API.
Defines the WCDMA cell information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2021,7 +2021,7 @@ This is a system API.
Enumerates NR selection modes.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2036,7 +2036,7 @@ This is a system API.
Defines the network search result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2049,7 +2049,7 @@ This is a system API.
Defines the network information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2064,7 +2064,7 @@ This is a system API.
Enumerates network information states.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2079,7 +2079,7 @@ This is a system API.
Defines the network selection mode.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2094,7 +2094,7 @@ This is a system API.
Enumerates IMS registration states.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2107,7 +2107,7 @@ This is a system API.
Enumerates IMS registration technologies.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2122,7 +2122,7 @@ This is a system API.
Defines the IMS registration information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2135,7 +2135,7 @@ This is a system API.
Enumerates IMS service types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......
......@@ -511,7 +511,7 @@ getSimAccountInfo(slotId: number, callback: AsyncCallback<IccAccountInfo\>): voi
Obtains account information of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -539,7 +539,7 @@ getSimAccountInfo(slotId: number): Promise<IccAccountInfo\>
Obtains account information of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -574,7 +574,7 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo
Obtains the account information list of the active SIM card. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -601,7 +601,7 @@ getActiveSimAccountInfoList(): Promise<Array<IccAccountInfo\>>;
Obtains the account information list of the active SIM card. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -630,7 +630,7 @@ setDefaultVoiceSlotId(slotId: number, callback: AsyncCallback<void\>): void
Sets the default slot ID of the SIM card that provides voice services. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -658,7 +658,7 @@ setDefaultVoiceSlotId(slotId: number): Promise\<void\>
Sets the default slot ID of the SIM card that provides voice services. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -693,7 +693,7 @@ setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void
Sets a display name for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -722,7 +722,7 @@ setShowName\(slotId: number, name: string\): Promise\<void\>
Sets a display name for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -759,7 +759,7 @@ getShowName(slotId: number, callback: AsyncCallback<string\>): void
Obtains the name of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -787,7 +787,7 @@ getShowName(slotId: number): Promise<string\>
Obtains the name of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -822,7 +822,7 @@ setShowNumber\(slotId: number, number: string,callback: AsyncCallback<void\>\):
Sets a display number for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -852,7 +852,7 @@ setShowNumber\(slotId: number,number: string\): Promise\<void\>
Sets a display number for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -889,7 +889,7 @@ getShowNumber(slotId: number,callback: AsyncCallback<string\>): void
Obtains the display number of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -917,7 +917,7 @@ getShowNumber(slotId: number): Promise<string\>
Obtains the display number of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -952,7 +952,7 @@ activateSim(slotId: number, callback: AsyncCallback<void\>): void
Activates the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -980,7 +980,7 @@ activateSim(slotId: number): Promise\<void\>
Activates the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1015,7 +1015,7 @@ deactivateSim(slotId: number, callback: AsyncCallback<void\>): void
Deactivates the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1043,7 +1043,7 @@ deactivateSim(slotId: number): Promise\<void\>
Deactivates the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1078,7 +1078,7 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat
Sets the lock status of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1112,7 +1112,7 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\>
Sets the lock status of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1153,7 +1153,7 @@ getLockState(slotId: number, lockType: LockType, callback: AsyncCallback<LockSta
Obtains the lock status of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1180,7 +1180,7 @@ getLockState(slotId: number, lockType: LockType): Promise<LockState\>
Obtains the lock status of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -1214,7 +1214,7 @@ alterPin(slotId: number, newPin: string, oldPin: string, callback: AsyncCallback
Changes the PIN of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1244,7 +1244,7 @@ alterPin(slotId: number, newPin: string, oldPin: string): Promise<LockStatusResp
Changes the PIN of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1281,7 +1281,7 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string, callback: AsyncCallb
Changes PIN 2 of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1311,7 +1311,7 @@ alterPin2(slotId: number, newPin2: string, oldPin2: string): Promise<LockStatusR
Changes PIN 2 of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1348,7 +1348,7 @@ unlockPin(slotId: number,pin: string ,callback: AsyncCallback<LockStatusResponse
Unlocks PIN of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1378,7 +1378,7 @@ unlockPin(slotId: number,pin: string): Promise&lt;LockStatusResponse\>
Unlocks the PIN of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1415,7 +1415,7 @@ unlockPuk(slotId: number,newPin: string,puk: string ,callback: AsyncCallback<Loc
Unlocks the PUK of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1447,7 +1447,7 @@ unlockPuk(slotId: number,newPin: string,puk: string): Promise&lt;LockStatusRespo
Unlocks the PUK of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1486,7 +1486,7 @@ unlockPin2(slotId: number,pin2: string ,callback: AsyncCallback<LockStatusRespon
Unlocks PIN 2 of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1516,7 +1516,7 @@ unlockPin2(slotId: number,pin2: string): Promise&lt;LockStatusResponse\>
Unlocks PIN 2 of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1553,7 +1553,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallbac
Unlocks PUK 2 of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1585,7 +1585,7 @@ unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatus
Unlocks PUK 2 of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1644,7 +1644,7 @@ getSimIccId(slotId: number, callback: AsyncCallback<string\>): void
Obtains the IC card identity (ICCID) of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1672,7 +1672,7 @@ getSimIccId(slotId: number): Promise<string\>
Obtains the ICCID of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1707,7 +1707,7 @@ getVoiceMailIdentifier(slotId: number, callback: AsyncCallback<string\>): void
Obtains the voice mailbox alpha identifier of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1735,7 +1735,7 @@ getVoiceMailIdentifier(slotId: number): Promise<string\>
Obtains the voice mailbox alpha identifier of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1770,7 +1770,7 @@ getVoiceMailNumber(slotId: number, callback: AsyncCallback<string\>): void
Obtains the voice mailbox number of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1798,7 +1798,7 @@ getVoiceMailNumber(slotId: number): Promise<string\>
Obtains the voice mailbox number of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1833,7 +1833,7 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback:
Sets voice mailbox information for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1863,7 +1863,7 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string): Promise<
Sets voice mailbox information for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -1900,7 +1900,7 @@ getSimTelephoneNumber(slotId: number, callback: AsyncCallback<string\>): void
Obtains the mobile subscriber ISDN number (MSISDN) of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1928,7 +1928,7 @@ getSimTelephoneNumber(slotId: number): Promise<string\>
Obtains the MSISDN of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1963,7 +1963,7 @@ getSimGid1(slotId: number, callback: AsyncCallback<string\>): void
Obtains the group identifier level 1 (GID1) of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -1991,7 +1991,7 @@ getSimGid1(slotId: number): Promise<string\>
Obtains the GID1 of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -2026,7 +2026,7 @@ getIMSI(slotId: number, callback: AsyncCallback<string\>): void
Obtains the international mobile subscriber identity (IMSI) of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -2054,7 +2054,7 @@ getIMSI(slotId: number): Promise<string\>
Obtains the IMSI of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -2089,7 +2089,7 @@ getOperatorConfigs(slotId: number, callback: AsyncCallback<Array<OperatorConfig\
Obtains the carrier configuration of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -2117,7 +2117,7 @@ getOperatorConfigs(slotId: number): Promise<Array<OperatorConfig\>>
Obtains the carrier configuration of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE
......@@ -2152,7 +2152,7 @@ queryIccDiallingNumbers(slotId: number, type: ContactType, callback: AsyncCallba
Queries contact numbers of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.READ_CONTACTS
......@@ -2181,7 +2181,7 @@ queryIccDiallingNumbers(slotId: number, type: ContactType): Promise<Array<Dialli
Queries contact numbers of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.READ_CONTACTS
......@@ -2217,7 +2217,7 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
Adds contact numbers for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2253,7 +2253,7 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
Adds contact numbers for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2296,7 +2296,7 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
Deletes contact numbers from the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2332,7 +2332,7 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
Deletes contact numbers from the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2375,7 +2375,7 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
Updates contact numbers for the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2411,7 +2411,7 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
Updates contact numbers for the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Permission required**: ohos.permission.WRITE_CONTACTS
......@@ -2454,7 +2454,7 @@ sendEnvelopeCmd(slotId: number, cmd: string, callback: AsyncCallback<void\>): vo
Sends an envelope command to the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2483,7 +2483,7 @@ sendEnvelopeCmd(slotId: number, cmd: string): Promise<void\>
Sends an envelope command to the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2519,7 +2519,7 @@ sendTerminalResponseCmd(slotId: number, cmd: string, callback: AsyncCallback<voi
Sends a terminal response command to the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2548,7 +2548,7 @@ sendTerminalResponseCmd(slotId: number, cmd: string): Promise<void\>
Sends a terminal response command to the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2584,7 +2584,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L
Unlocks the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2617,7 +2617,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon
Unlocks the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -2657,7 +2657,7 @@ getOpKey(slotId: number, callback: AsyncCallback<string\>): void
Obtains the opkey of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2683,7 +2683,7 @@ getOpKey(slotId: number): Promise<string\>
Obtains the opkey of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2716,7 +2716,7 @@ getOpName(slotId: number, callback: AsyncCallback<string\>): void
Obtains the OpName of the SIM card in the specified slot. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2742,7 +2742,7 @@ getOpName(slotId: number): Promise<string\>
Obtains the OpName of the SIM card in the specified slot. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2807,7 +2807,7 @@ Enumerates SIM card types.
Enumerates lock types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2820,7 +2820,7 @@ This is a system API.
Enumerates lock states.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2833,7 +2833,7 @@ This is a system API.
Enumerates personalized lock types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2854,7 +2854,7 @@ This is a system API.
Defines the lock status response.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2867,7 +2867,7 @@ This is a system API.
Defines the lock information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2881,7 +2881,7 @@ This is a system API.
Defines the personalized lock information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2894,7 +2894,7 @@ This is a system API.
Defines the ICC account information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2912,7 +2912,7 @@ This is a system API.
Defines the carrier configuration.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2925,7 +2925,7 @@ This is a system API.
Defines the contact number information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......@@ -2940,7 +2940,7 @@ This is a system API.
Enumerates contact types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.CoreService
......
......@@ -71,7 +71,7 @@ let promise = sms.createMessage(pdu, specification);
promise.then(data => {
console.log(`createMessage success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`createMessage fail, promise: err->${JSON.stringify(err)}`);
console.error(`createMessage failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -154,7 +154,7 @@ let promise = sms.getDefaultSmsSlotId();
promise.then(data => {
console.log(`getDefaultSmsSlotId success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getDefaultSmsSlotId fail, promise: err->${JSON.stringify(err)}`);
console.error(`getDefaultSmsSlotId failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -164,7 +164,7 @@ setDefaultSmsSlotId\(slotId: number,callback: AsyncCallback&lt;void&gt;\): void
Sets the default slot of the SIM card used to send SMS messages. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -192,7 +192,7 @@ setDefaultSmsSlotId\(slotId: number\): Promise&lt;void&gt;
Sets the default slot of the SIM card used to send SMS messages. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE
......@@ -217,7 +217,7 @@ let promise = sms.setDefaultSmsSlotId(0);
promise.then(data => {
console.log(`setDefaultSmsSlotId success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`setDefaultSmsSlotId fail, promise: err->${JSON.stringify(err)}`);
console.error(`setDefaultSmsSlotId failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -227,7 +227,7 @@ setSmscAddr\(slotId: number, smscAddr: string, callback: AsyncCallback<void\>\):
Sets the short message service center (SMSC) address. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE (a system permission)
......@@ -258,7 +258,7 @@ setSmscAddr\(slotId: number, smscAddr: string\): Promise\<void\>
Sets the SMSC address. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SET_TELEPHONY_STATE (a system permission)
......@@ -286,7 +286,7 @@ let promise = sms.setSmscAddr(slotId, smscAddr);
promise.then(data => {
console.log(`setSmscAddr success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`setSmscAddr fail, promise: err->${JSON.stringify(err)}`);
console.error(`setSmscAddr failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -297,7 +297,7 @@ getSmscAddr\(slotId: number, callback: AsyncCallback<string\>\): void
Obtains the SMSC address. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE (a system permission)
......@@ -326,7 +326,7 @@ getSmscAddr\(slotId: number\): Promise<string\>
Obtains the SMSC address. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.GET_TELEPHONY_STATE (a system permission)
......@@ -352,7 +352,7 @@ let promise = sms.getSmscAddr(slotId);
promise.then(data => {
console.log(`getSmscAddr success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getSmscAddr fail, promise: err->${JSON.stringify(err)}`);
console.error(`getSmscAddr failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -381,7 +381,7 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void
Splits an SMS message into multiple segments. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SEND_MESSAGES
......@@ -410,7 +410,7 @@ splitMessage(content: string): Promise<Array<string\>>
Splits an SMS message into multiple segments. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.SEND_MESSAGES
......@@ -436,7 +436,7 @@ let promise = sms.splitMessage(content);
promise.then(data => {
console.log(`splitMessage success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`splitMessage fail, promise: err->${JSON.stringify(err)}`);
console.error(`splitMessage failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -446,7 +446,7 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void
Adds a SIM message. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -480,7 +480,7 @@ addSimMessage(options: SimMessageOptions): Promise<void\>
Adds a SIM message. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -511,7 +511,7 @@ let promise = sms.addSimMessage(simMessageOptions);
promise.then(data => {
console.log(`addSimMessage success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`addSimMessage fail, promise: err->${JSON.stringify(err)}`);
console.error(`addSimMessage failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -521,7 +521,7 @@ delSimMessage(slotId: number, msgIndex: number, callback: AsyncCallback<void\>):
Deletes a SIM message. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -552,7 +552,7 @@ delSimMessage(slotId: number, msgIndex: number): Promise<void\>
Deletes a SIM message. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -580,7 +580,7 @@ let promise = sms.delSimMessage(slotId, msgIndex);
promise.then(data => {
console.log(`delSimMessage success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`delSimMessage fail, promise: err->${JSON.stringify(err)}`);
console.error(`delSimMessage failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -590,7 +590,7 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\
Updates a SIM message. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -625,7 +625,7 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\>
Updates a SIM message. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS,ohos.permission.SEND_MESSAGES
......@@ -657,7 +657,7 @@ let promise = sms.updateSimMessage(updateSimMessageOptions);
promise.then(data => {
console.log(`updateSimMessage success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`updateSimMessage fail, promise: err->${JSON.stringify(err)}`);
console.error(`updateSimMessage failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -667,7 +667,7 @@ getAllSimMessages(slotId: number, callback: AsyncCallback<Array<SimShortMessage\
Obtains all SIM card messages. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS
......@@ -696,7 +696,7 @@ getAllSimMessages(slotId: number): Promise<Array<SimShortMessage\>>
Obtains all SIM card messages. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS
......@@ -722,7 +722,7 @@ let promise = sms.getAllSimMessages(slotId);
promise.then(data => {
console.log(`getAllSimMessages success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getAllSimMessages fail, promise: err->${JSON.stringify(err)}`);
console.error(`getAllSimMessages failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -732,7 +732,7 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void
Sets the cell broadcast configuration. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS
......@@ -766,7 +766,7 @@ setCBConfig(options: CBConfigOptions): Promise<void\>
Sets the cell broadcast configuration. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**Required permission**: ohos.permission.RECEIVE_SMS
......@@ -797,7 +797,7 @@ let promise = sms.setCBConfig(cbConfigOptions);
promise.then(data =>
console.log(`setCBConfig success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`setCBConfig fail, promise: err->${JSON.stringify(err)}`);
console.error(`setCBConfig failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -807,7 +807,7 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean, callback
Obtains SMS message segment information. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -836,7 +836,7 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise
Obtains SMS message segment information. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -862,7 +862,7 @@ let promise = sms.getSmsSegmentsInfo(slotId, "message", false);
promise.then(data =>
console.log(`getSmsSegmentsInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getSmsSegmentsInfo fail, promise: err->${JSON.stringify(err)}`);
console.error(`getSmsSegmentsInfo failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -872,7 +872,7 @@ isImsSmsSupported(callback: AsyncCallback<boolean\>): void
Checks whether SMS is supported on IMS. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -897,7 +897,7 @@ isImsSmsSupported(): Promise<boolean\>
Checks whether SMS is supported on IMS. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -914,7 +914,7 @@ let promise = sms.isImsSmsSupported();
promise.then(data => {
console.log(`isImsSmsSupported success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`isImsSmsSupported fail, promise: err->${JSON.stringify(err)}`);
console.error(`isImsSmsSupported failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -924,7 +924,7 @@ getImsShortMessageFormat(callback: AsyncCallback<string\>): void
Obtains the SMS format supported by the IMS. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -949,7 +949,7 @@ getImsShortMessageFormat(): Promise<string\>
Obtains the SMS format supported by the IMS. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -966,7 +966,7 @@ let promise = sms.getImsShortMessageFormat();
promise.then(data => {
console.log(`getImsShortMessageFormat success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getImsShortMessageFormat fail, promise: err->${JSON.stringify(err)}`);
console.error(`getImsShortMessageFormat failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -976,7 +976,7 @@ decodeMms(mmsFilePathName: string | Array<number\>, callback: AsyncCallback<MmsI
Decodes MMS messages. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1003,7 +1003,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\>
Decodes MMS messages. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1027,7 +1027,7 @@ let promise = sms.getSmscAddr(mmsFilePathName);
promise.then(data => {
console.log(`decodeMms success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`decodeMms fail, promise: err->${JSON.stringify(err)}`);
console.error(`decodeMms failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1037,7 +1037,7 @@ encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number\>>): void
Encodes MMS messages. This API uses an asynchronous callback to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1072,7 +1072,7 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>>
Encodes MMS messages. This API uses a promise to return the result.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1104,7 +1104,7 @@ let promise = sms.encodeMms(mmsInformation);
promise.then(data => {
console.log(`encodeMms success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`encodeMms fail, promise: err->${JSON.stringify(err)}`);
console.error(`encodeMms failed, promise: err->${JSON.stringify(err)}`);
});
```
......@@ -1203,7 +1203,7 @@ Enumerates SMS message sending results.
Defines the MMS message information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1217,7 +1217,7 @@ This is a system API.
Defines an MMS message sending request.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1243,7 +1243,7 @@ This is a system API.
Defines the MMS message sending configuration.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1258,7 +1258,7 @@ This is a system API.
Defines an MMS notification index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1279,7 +1279,7 @@ This is a system API.
Defines an MMS confirmation index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1293,7 +1293,7 @@ This is a system API.
Defines the MMS message retrieval configuration.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1318,7 +1318,7 @@ This is a system API.
Defines the original MMS message reading index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1336,7 +1336,7 @@ This is a system API.
Defines the MMS message reading index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1354,7 +1354,7 @@ This is a system API.
Defines the attachment of an MMS message.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1375,7 +1375,7 @@ This is a system API.
Defines an MMSC address.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1388,7 +1388,7 @@ This is a system API.
Enumerates message types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1408,7 +1408,7 @@ This is a system API.
Enumerates MMS message priorities.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1422,7 +1422,7 @@ This is a system API.
Enumerates MMS versions.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1437,7 +1437,7 @@ This is a system API.
Enumerates MMS character sets.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1462,7 +1462,7 @@ This is a system API.
Enumerates disposition types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1476,7 +1476,7 @@ This is a system API.
Enumerates report types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1489,7 +1489,7 @@ This is a system API.
Defines the cell broadcast configuration options.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1505,7 +1505,7 @@ This is a system API.
Defines the SIM message status.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1521,7 +1521,7 @@ This is a system API.
Enumerates RAN types.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1534,7 +1534,7 @@ This is a system API.
Enumerates SMS encoding schemes.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1549,7 +1549,7 @@ This is a system API.
Defines the SIM message options.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1564,7 +1564,7 @@ This is a system API.
Defines the updating SIM message options.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1580,7 +1580,7 @@ This is a system API.
Defines a SIM message.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1594,7 +1594,7 @@ This is a system API.
Defines an MMS message delivery index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1610,7 +1610,7 @@ This is a system API.
Defines an MMS response index.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......@@ -1625,7 +1625,7 @@ This is a system API.
Defines the SMS message segment information.
This is a system API.
**System API**: This is a system API.
**System capability**: SystemCapability.Telephony.SmsMms
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册