- count:
int64 条数 读取多少条 - index:
int64 开始 从第几条开始读
let count = 11//条数 读取多少条
let index = 1//开始 从第几条开始读
let res =await android.contacts.readContacts(count,index)
console.log("执行结果",res);//[
{
"id": "2",
"name": "张三",
"phoneNumbers": [
"13113333333",
"13113333333"
]
}
]
- phoneNumber:
string 手机号 - name:
string 姓名
let phoneNumber = "1311111111111"//手机号
let name = "张三"//姓名
let res =await android.contacts.addContact(phoneNumber,name)
console.log("执行结果",res);//true
let contactId = "69"//通讯录id
let res =await android.contacts.deleteContact(contactId)
console.log("执行结果",res);//true
let res =await android.contacts.clearContacts()
console.log("执行结果",res);//true