未验证 提交 f7352408 编写于 作者: O openharmony_ci 提交者: Gitee

!9602 md文件扫描问题修改

Merge pull request !9602 from dingxiaochen/master
...@@ -319,7 +319,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, ca ...@@ -319,7 +319,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, ca
**示例:** **示例:**
```js ```js
call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, value) => { call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -468,9 +468,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: Asy ...@@ -468,9 +468,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: Asy
**示例:** **示例:**
```js ```js
call.formatPhoneNumberToE164("138xxxxxxxx",{ call.formatPhoneNumberToE164("138xxxxxxxx", "CN", (err, data) => {
countryCode: "CN"
}, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -504,9 +502,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<str ...@@ -504,9 +502,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<str
**示例:** **示例:**
```js ```js
let promise = call.formatPhoneNumberToE164("138xxxxxxxx", { let promise = call.formatPhoneNumberToE164("138xxxxxxxx", "CN");
countryCode: "CN"
});
promise.then(data => { promise.then(data => {
console.log(`formatPhoneNumberToE164 success, promise: data->${JSON.stringify(data)}`); console.log(`formatPhoneNumberToE164 success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -1703,7 +1699,7 @@ on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void ...@@ -1703,7 +1699,7 @@ on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void
**示例:** **示例:**
```js ```js
isNewCallAllowedcall.on('mmiCodeResult', (err, data) => { call.on('mmiCodeResult', (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2072,10 +2068,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCall ...@@ -2072,10 +2068,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCall
**示例:** **示例:**
```js ```js
let callTransferTyp={ call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY, (err, data) => {
CallTransferType: 1
}
call.getCallTransferInfo(0, callTransferTyp, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2107,10 +2100,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransf ...@@ -2107,10 +2100,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransf
**示例:** **示例:**
```js ```js
let callTransferTyp={ let promise = call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY);
CallTransferType: 1
}
let promise = call.getCallTransferInfo(0, callTransferTyp);
promise.then(data => { promise.then(data => {
console.log(`getCallTransferInfo success, promise: data->${JSON.stringify(data)}`); console.log(`getCallTransferInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -2399,7 +2389,7 @@ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: Asyn ...@@ -2399,7 +2389,7 @@ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: Asyn
let audioDeviceOptions={ let audioDeviceOptions={
bluetoothAddress: "IEEE 802-2014" bluetoothAddress: "IEEE 802-2014"
} }
call.setAudioDevice(1, bluetoothAddress, (err, value) => { call.setAudioDevice(1, audioDeviceOptions, (err, value) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2463,7 +2453,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>, callback: Asy ...@@ -2463,7 +2453,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>, callback: Asy
**示例:** **示例:**
```js ```js
call.joinConference(1, "138XXXXXXXX", (err, data) => { let callNumberList: Array<string> = [
"138XXXXXXXX"
];
call.joinConference(1, callNumberList, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2494,7 +2487,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void ...@@ -2494,7 +2487,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void
**示例:** **示例:**
```js ```js
let promise = call.joinConference(1, "138XXXXXXXX"); let callNumberList: Array<string> = [
"138XXXXXXXX"
];
let promise = call.joinConference(1, callNumberList);
promise.then(data => { promise.then(data => {
console.log(`joinConference success, promise: data->${JSON.stringify(data)}`); console.log(`joinConference success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
......
...@@ -34,7 +34,7 @@ addContact(contact:Contact, callback:AsyncCallback&lt;number&gt;): void ...@@ -34,7 +34,7 @@ addContact(contact:Contact, callback:AsyncCallback&lt;number&gt;): void
```js ```js
contact.addContact({ contact.addContact({
fullName: {fullName: 'xxx'}, name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}] phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
}, (err, data) => { }, (err, data) => {
if (err) { if (err) {
...@@ -202,7 +202,7 @@ updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac ...@@ -202,7 +202,7 @@ updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac
```js ```js
contact.updateContact({ contact.updateContact({
fullName: {fullName: 'xxx'}, name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}] phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
},{ },{
attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
...@@ -242,7 +242,7 @@ updateContact(contact: Contact, attrs?: ContactAttributes): Promise&lt;void&gt; ...@@ -242,7 +242,7 @@ updateContact(contact: Contact, attrs?: ContactAttributes): Promise&lt;void&gt;
```js ```js
let promise = contact.updateContact({ let promise = contact.updateContact({
fullName: {fullName: 'xxx'}, name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}] phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
}, { }, {
attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME] attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
...@@ -487,7 +487,7 @@ selectContact(callback: AsyncCallback&lt;Array&lt;Contact&gt;&gt;): void ...@@ -487,7 +487,7 @@ selectContact(callback: AsyncCallback&lt;Array&lt;Contact&gt;&gt;): void
**需要权限**:ohos.permission.READ_CONTACTS **需要权限**:ohos.permission.READ_CONTACTS
**系统能力**:SystemCapability.Applications.Contacts、SystemCapability.Applications.ContactsData **系统能力**:SystemCapability.Applications.ContactsData
**参数:** **参数:**
...@@ -1450,7 +1450,7 @@ queryKey(id: number, holder: Holder, callback: AsyncCallback&lt;string&gt;): voi ...@@ -1450,7 +1450,7 @@ queryKey(id: number, holder: Holder, callback: AsyncCallback&lt;string&gt;): voi
**示例:** **示例:**
```js ```js
contact.queryKey(id, { contact.queryKey(/*id*/1, {
holderId: 0, holderId: 0,
bundleName: "", bundleName: "",
displayName: "" displayName: ""
...@@ -1490,7 +1490,7 @@ queryKey(id: number, holder?: Holder): Promise&lt;string&gt; ...@@ -1490,7 +1490,7 @@ queryKey(id: number, holder?: Holder): Promise&lt;string&gt;
**示例:** **示例:**
```js ```js
let promise = contact.queryKey(id, { let promise = contact.queryKey(/*id*/1, {
holderId: 0, holderId: 0,
bundleName: "", bundleName: "",
displayName: "" displayName: ""
...@@ -1605,7 +1605,7 @@ let contactAttributes = { ...@@ -1605,7 +1605,7 @@ let contactAttributes = {
```js ```js
let contactAttributes = new contact.ContactAttributes(); let contactAttributes = new contact.ContactAttributes();
contactAttributes.attributes = ["ATTR_EMAIL"]; contactAttributes.attributes = [contact.Attribute.ATTR_EMAIL];
``` ```
......
...@@ -1100,12 +1100,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa ...@@ -1100,12 +1100,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa
let networkInformation={ let networkInformation={
operatorName: "中国移动", operatorName: "中国移动",
operatorNumeric: "898600", operatorNumeric: "898600",
state: 1, state: radio.NetworkInformationState.NETWORK_AVAILABLE,
radioTech: "CS" radioTech: "CS"
} }
let networkSelectionModeOptions={ let networkSelectionModeOptions={
slotid: 0, slotId: 0,
selectMode: 1, selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC,
networkInformation: networkInformation, networkInformation: networkInformation,
resumeSelection: true resumeSelection: true
} }
...@@ -1144,12 +1144,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\> ...@@ -1144,12 +1144,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\>
let networkInformation={ let networkInformation={
operatorName: "中国移动", operatorName: "中国移动",
operatorNumeric: "898600", operatorNumeric: "898600",
state: 1, state: radio.NetworkInformationState.NETWORK_AVAILABLE,
radioTech: "CS" radioTech: "CS"
} }
let networkSelectionModeOptions={ let networkSelectionModeOptions={
slotid: 0, slotId: 0,
selectMode: 1, selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC,
networkInformation: networkInformation, networkInformation: networkInformation,
resumeSelection: true resumeSelection: true
} }
...@@ -1190,7 +1190,7 @@ radio.getNetworkSearchInformation(0, (err, data) => { ...@@ -1190,7 +1190,7 @@ radio.getNetworkSearchInformation(0, (err, data) => {
## radio.getNetworkSearchInformation ## radio.getNetworkSearchInformation
getNetworkSearchInformation\(slotId: number\): Promise<void\> getNetworkSearchInformation\(slotId: number\): Promise<NetworkSearchResult\>
获取网络搜索信息。使用Promise异步回调。 获取网络搜索信息。使用Promise异步回调。
...@@ -1586,7 +1586,7 @@ radio.getPreferredNetwork(0, (err, data) => { ...@@ -1586,7 +1586,7 @@ radio.getPreferredNetwork(0, (err, data) => {
## radio.getPreferredNetwork<sup>8+</sup> ## radio.getPreferredNetwork<sup>8+</sup>
getPreferredNetwork(slotId: number): Promise<void\> getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode\>
获取首选网络。使用Promise异步回调。 获取首选网络。使用Promise异步回调。
...@@ -1642,7 +1642,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I ...@@ -1642,7 +1642,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I
**示例:** **示例:**
```js ```js
radio.getImsRegInfo(0, 1, (err, data) => { radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -1675,7 +1675,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\> ...@@ -1675,7 +1675,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\>
**示例:** **示例:**
```js ```js
let promise = radio.getImsRegInfo(0, 1); let promise = radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO);
promise.then(data => { promise.then(data => {
console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`); console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -1707,7 +1707,7 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback: ...@@ -1707,7 +1707,7 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback:
**示例:** **示例:**
```js ```js
radio.on('imsRegStateChange', 0, 1, (err, data) => { radio.on('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -1736,7 +1736,7 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback ...@@ -1736,7 +1736,7 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback
**示例:** **示例:**
```js ```js
radio.off('imsRegStateChange', 0, 1, (err, data) => { radio.off('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
......
...@@ -589,7 +589,7 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo ...@@ -589,7 +589,7 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo
**示例:** **示例:**
```js ```js
sim.getActiveSimAccountInfoList(0, (err, data) => { sim.getActiveSimAccountInfoList((err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -710,7 +710,7 @@ setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void ...@@ -710,7 +710,7 @@ setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void
**示例:** **示例:**
```js ```js
const name = '中国移动'; let name = '中国移动';
sim.setShowName(0, name, (err, data) => { sim.setShowName(0, name, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
...@@ -744,7 +744,7 @@ setShowName\(slotId: number, name: string\): Promise\<void\> ...@@ -744,7 +744,7 @@ setShowName\(slotId: number, name: string\): Promise\<void\>
**示例:** **示例:**
```js ```js
const name = '中国移动'; let name = '中国移动';
let promise = sim.setShowName(0, name); let promise = sim.setShowName(0, name);
promise.then(data => { promise.then(data => {
console.log(`setShowName success, promise: data->${JSON.stringify(data)}`); console.log(`setShowName success, promise: data->${JSON.stringify(data)}`);
...@@ -1096,9 +1096,9 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat ...@@ -1096,9 +1096,9 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat
```js ```js
let lockInfo = { let lockInfo = {
lockType = 1, lockType: sim.LockType.PIN_LOCK,
password = "1234", password = "1234",
state = 0 state: sim.LockState.LOCK_OFF
}; };
sim.setLockState(0, lockInfo, (err, data) => { sim.setLockState(0, lockInfo, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
...@@ -1135,9 +1135,9 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\> ...@@ -1135,9 +1135,9 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\>
```js ```js
let lockInfo = { let lockInfo = {
lockType = 1, lockType: sim.LockType.PIN_LOCK,
password = "1234", password = "1234",
state = 0 state: sim.LockState.LOCK_OFF
}; };
let promise = sim.setLockState(0, lockInfo); let promise = sim.setLockState(0, lockInfo);
promise.then(data => { promise.then(data => {
...@@ -2236,12 +2236,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -2236,12 +2236,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
sim.addIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => { sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2277,12 +2277,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -2277,12 +2277,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
let promise = sim.addIccDiallingNumbers(0, 1, diallingNumbersInof); let promise = sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => { promise.then(data => {
console.log(`addIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`); console.log(`addIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -2315,12 +2315,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -2315,12 +2315,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
sim.delIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => { sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2356,12 +2356,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli ...@@ -2356,12 +2356,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
let promise = sim.delIccDiallingNumbers(0, 1, diallingNumbersInof); let promise = sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => { promise.then(data => {
console.log(`delIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`); console.log(`delIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -2394,12 +2394,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia ...@@ -2394,12 +2394,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
sim.updateIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => { sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -2435,12 +2435,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia ...@@ -2435,12 +2435,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
```js ```js
let diallingNumbersInof = { let diallingNumbersInof = {
alphaTag = "alpha", alphaTag: "alpha",
number = "138xxxxxxxx", number: "138xxxxxxxx",
recordNumber = 123, recordNumber: 123,
pin2 = "1234" pin2: "1234"
}; };
let promise = sim.updateIccDiallingNumbers(0, 1, diallingNumbersInof); let promise = sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => { promise.then(data => {
console.log(`updateIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`); console.log(`updateIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -2602,7 +2602,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L ...@@ -2602,7 +2602,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L
```js ```js
let persoLockInfo = { let persoLockInfo = {
lockType = 0, lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234" password = "1234"
}; };
sim.unlockSimLock(0, persoLockInfo, (err, data) => { sim.unlockSimLock(0, persoLockInfo, (err, data) => {
...@@ -2640,7 +2640,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon ...@@ -2640,7 +2640,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon
```js ```js
let persoLockInfo = { let persoLockInfo = {
lockType = 0, lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234" password = "1234"
}; };
let promise = sim.unlockSimLock(0, persoLockInfo); let promise = sim.unlockSimLock(0, persoLockInfo);
......
...@@ -397,7 +397,7 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void ...@@ -397,7 +397,7 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void
**示例:** **示例:**
```js ```js
string content= "long message"; let content = "long message";
sms.splitMessage(content, (err, data) => { sms.splitMessage(content, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
...@@ -431,7 +431,7 @@ splitMessage(content: string): Promise<Array<string\>> ...@@ -431,7 +431,7 @@ splitMessage(content: string): Promise<Array<string\>>
**示例:** **示例:**
```js ```js
string content = "long message"; let content = "long message";
let promise = sms.splitMessage(content); let promise = sms.splitMessage(content);
promise.then(data => { promise.then(data => {
console.log(`splitMessage success, promise: data->${JSON.stringify(data)}`); console.log(`splitMessage success, promise: data->${JSON.stringify(data)}`);
...@@ -463,10 +463,10 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void ...@@ -463,10 +463,10 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void
```js ```js
let simMessageOptions = { let simMessageOptions = {
slotId = 0, slotId: 0,
smsc = "test", smsc: "test",
pdu = "xxxxxx", pdu: "xxxxxx",
status = 0 status: sms.SimMessageStatus.SIM_MESSAGE_STATUS_READ
}; };
sms.addSimMessage(simMessageOptions, (err, data) => { sms.addSimMessage(simMessageOptions, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
...@@ -502,10 +502,10 @@ addSimMessage(options: SimMessageOptions): Promise<void\> ...@@ -502,10 +502,10 @@ addSimMessage(options: SimMessageOptions): Promise<void\>
```js ```js
let simMessageOptions = { let simMessageOptions = {
slotId = 0, slotId: 0,
smsc = "test", smsc: "test",
pdu = "xxxxxx", pdu: "xxxxxx",
status = 0 status: sms.SimMessageStatus.SIM_MESSAGE_STATUS_READ
}; };
let promise = sms.addSimMessage(simMessageOptions); let promise = sms.addSimMessage(simMessageOptions);
promise.then(data => { promise.then(data => {
...@@ -607,9 +607,9 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\ ...@@ -607,9 +607,9 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\
```js ```js
let updateSimMessageOptions = { let updateSimMessageOptions = {
slotId = 0, slotId: 0,
msgIndex = 1, msgIndex: 1,
newStatus = 0, newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx", pdu = "xxxxxxx",
smsc = "test" smsc = "test"
}; };
...@@ -647,9 +647,9 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\> ...@@ -647,9 +647,9 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\>
```js ```js
let updateSimMessageOptions = { let updateSimMessageOptions = {
slotId = 0, slotId: 0,
msgIndex = 1, msgIndex: 1,
newStatus = 0, newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx", pdu = "xxxxxxx",
smsc = "test" smsc = "test"
}; };
...@@ -749,10 +749,11 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void ...@@ -749,10 +749,11 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void
```js ```js
let cbConfigOptions = { let cbConfigOptions = {
slotId = 0, slotId: 0,
smsc = "test", enable: true,
pdu = "xxxxxxxx", startMessageId: 100,
status = 0 endMessageId: 200,
ranType: sms.RanType.TYPE_GSM
}; };
sms.setCBConfig(cbConfigOptions, (err, data) => { sms.setCBConfig(cbConfigOptions, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
...@@ -788,13 +789,14 @@ setCBConfig(options: CBConfigOptions): Promise<void\> ...@@ -788,13 +789,14 @@ setCBConfig(options: CBConfigOptions): Promise<void\>
```js ```js
let cbConfigOptions = { let cbConfigOptions = {
slotId = 0, slotId: 0,
smsc = "test", enable: true,
pdu = "xxxxxxxx", startMessageId: 100,
status = 0 endMessageId: 200,
ranType: sms.RanType.TYPE_GSM
}; };
let promise = sms.setCBConfig(cbConfigOptions); let promise = sms.setCBConfig(cbConfigOptions);
promise.then(data => promise.then(data => {
console.log(`setCBConfig success, promise: data->${JSON.stringify(data)}`); console.log(`setCBConfig success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
console.error(`setCBConfig failed, promise: err->${JSON.stringify(err)}`); console.error(`setCBConfig failed, promise: err->${JSON.stringify(err)}`);
...@@ -859,7 +861,7 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise ...@@ -859,7 +861,7 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise
```js ```js
let slotId = 0; let slotId = 0;
let promise = sms.getSmsSegmentsInfo(slotId, "message", false); let promise = sms.getSmsSegmentsInfo(slotId, "message", false);
promise.then(data => promise.then(data => {
console.log(`getSmsSegmentsInfo success, promise: data->${JSON.stringify(data)}`); console.log(`getSmsSegmentsInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
console.error(`getSmsSegmentsInfo failed, promise: err->${JSON.stringify(err)}`); console.error(`getSmsSegmentsInfo failed, promise: err->${JSON.stringify(err)}`);
...@@ -886,7 +888,7 @@ isImsSmsSupported(callback: AsyncCallback<boolean\>): void ...@@ -886,7 +888,7 @@ isImsSmsSupported(callback: AsyncCallback<boolean\>): void
```js ```js
sms.isImsSmsSupported((err, data) => { sms.isImsSmsSupported((err, data) => {
console.log(`callback: err->${JSON.(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -1023,7 +1025,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\> ...@@ -1023,7 +1025,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\>
```js ```js
let mmsFilePathName = "filename"; let mmsFilePathName = "filename";
let promise = sms.getSmscAddr(mmsFilePathName); let promise = sms.decodeMms(mmsFilePathName);
promise.then(data => { promise.then(data => {
console.log(`decodeMms success, promise: data->${JSON.stringify(data)}`); console.log(`decodeMms success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -1092,13 +1094,13 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>> ...@@ -1092,13 +1094,13 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>>
```js ```js
let mmsAcknowledgeInd = { let mmsAcknowledgeInd = {
transactionId = "100", transactionId: "100",
version = 0x10, version: sms.MmsVersionType.MMS_VERSION_1_0,
reportAllowed = 128 reportAllowed = sms.ReportType.MMS_YES
}; };
let mmsInformation = { let mmsInformation = {
messageType = 133, messageType: sms.MessageType.TYPE_MMS_ACKNOWLEDGE_IND,
mmsType = mmsAcknowledgeInd mmsType: mmsAcknowledgeInd
}; };
let promise = sms.encodeMms(mmsInformation); let promise = sms.encodeMms(mmsInformation);
promise.then(data => { promise.then(data => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册