由网友(无理诗人)分享简介:有没有什么办法可以显示同时具有数字和联系人姓名联系人选择?Is there any way to display contact picker that has both number and contact name?现在我打电话给选择器:Now I'm calling picker:startActivit...
有没有什么办法可以显示同时具有数字和联系人姓名联系人选择?
Is there any way to display contact picker that has both number and contact name?
现在我打电话给选择器:
Now I'm calling picker:
startActivityForResult(
new Intent(Intent.ACTION_PICK,Contacts.Phones.CONTENT_URI),
1);
但结果是我得到不可见的数字仅联系人名称。更糟糕的是,如果一个联系人有两个数字就发生了两次。
But in a result I get only Contact names without visible numbers. To make things worse, if one contact has two numbers it occurs twice.
推荐答案
试试这个。根据联系人的名字,就像联系人选择器,但列出了可点击的电话号码
try this. its just like the contact picker, but lists clickable phone numbers under the contacts name
Intent intent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
startActivityForResult(intent, 1);
相关推荐
最新文章