Safety Guest'T blog

  • 首页
  • 归档
  • 软件开发
  • 网络安全
  • 逆向破解
  • 人工智能
  • 资源分享
  • 区 块 链
  • 隐私政策
  • 友情链接

Html5 plus 获取Android通讯录

  • Tz
  • 2023-05-10
  • 0

演示代码


// 监听plusready事件  
document.addEventListener("plusready", function() {}, false);

function find() {
	plus.contacts.getAddressBook(plus.contacts.ADDRESSBOOK_PHONE, function(addressbook) {
		addressbook.find(["displayName", "phoneNumbers"], function(contacts) {
			alert(contacts.length);
			let str = JSON.stringify(contacts)
			console.log(str)
		}, function() {
			alert("error");
		}, {
			multiple: true
		});
	}, function(e) {
		alert("Get address book failed: " + e.message);
	});
}
© 2025 Safety Guest'T blog
Theme by Wing
渝ICP备 2021011909号 渝公网安备 50019002502382号
  • {{ item.name }}
  • {{ item.name }}