//次方法直接显示所有的电话,可能有多个号码,但是显示一个人的名字,分开显示
不需要先找到id在找同一个人的电话
public class Test3 extends Activity {
private ListView list;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
list = (ListView)findViewById(R.id.list);
String[] projection = null;
按姓名全查找///按号码包含///拼音
String selection = "display_name like '%KAI%' and data1 like '%1234%' and sort_key like '%KAI%'";
String[] selectionArgs = null;
Cursor people = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, projection, selection, selectionArgs, null);
String[] fields = new String[] {
Conta