API兼容性:
QRN:v3.6.0
iOS:80011160
Android:60001222
QChooseContact
用来获取手机联系人及联系人电话功能
import { QChooseContact } from 'qunar-react-native';
QChooseContact.chooseContact (responseCallBack)需经用户授权,获取选择联系人信息
responseCallBack
是回调,返回结果有以下两种情况:
{ ret: true,
data: {
emailList:[],
phoneList:[],
name :"",
}
}
{ ret: false,
code: 20002
msg:"用户取消了获取联系人"
}
QChooseContact.chooseContact((data) => {
alert(JSON.stringify(data));
})
QChooseContact.chooseContactWithoutPermission (responseCallBack)无须经过用户授权,获取选择联系人信息【有上架风险,功能同chooseContact】
responseCallBack
是回调,返回结果有以下两种情况:
{ ret: true,
data: {
phoneList:[],
name :"",
}
}
{ ret: false,
code: 20002
msg:"用户取消了获取联系人"
}
QChooseContact.chooseContactWithoutPermission((data) => {
alert(JSON.stringify(data));
})
QChooseContact.chooseContactPhone (responseCallBack)需经用户授权,获取选择联系人选中的电话
responseCallBack
是回调,返回结果有以下两种情况:
{ ret: true,
data: {
phoneNumber:,
name :"",
}
}
{ ret: false,
code: 20002
msg:"用户取消了获取联系人"
}
QChooseContact.chooseContactPhone((data) => {
alert(JSON.stringify(data));
})
QChooseContact.chooseContactPhoneWithoutPermission (responseCallBack)无须用户授权,获取选择联系人选中的电话,【有上架风险,功能同chooseContactPhone】
responseCallBack
是回调,返回结果有以下两种情况:
{ ret: true,
data: {
phoneNumber:,
name :"",
}
}
{ ret: false,
code: 20002
msg:"用户取消了获取联系人"
}
QChooseContact.chooseContactPhoneWithoutPermission((data) => {
alert(JSON.stringify(data));
})