android查找联系人,支持首屏,全拼
2013-04-19 21:42
369 查看
Uri uri = Uri.withAppendedPath( ContactsContract.CommonDataKinds.Phone.CONTENT_FILTER_URI, Uri.encode("hhh")); Cursor cursor = getContentResolver().query( uri, new String[] { ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER }, null, null, null); System.out.println("total=========>" + cursor.getCount()); cursor.moveToFirst(); for (int i = 0; i < cursor.getCount(); i++) { System.out.println(".name:" + cursor.getString(0) + ",number:" + cursor.getString(1)); cursor.moveToNext(); } // while (cursor.moveToNext()) { // System.out.println(".name:" + cursor.getString(0) + ",number:" // + cursor.getString(1)); // // } cursor.close();
相关文章推荐
- android 查找联系人方法(支持首拼,全拼,英文)
- android 短信查询、头像、联系人名称(支持会话和短信)__接上篇
- Android 学习笔记 Contacts (三)Contacts 查找,增加,更新,删除联系人
- Android 学习笔记 Contacts (三)Contacts 查找,增加,更新,删除联系人
- Android中调用系统函数查找联系人
- android中通过条件查找通讯录联系人
- android 短信查询、头像、联系人名称(支持会话和短信)
- Android实现列表仿联系人快速查找和关键字搜索
- android 4.0联系人分析—查找匹配
- Android联系人按拼音排序以及按汉字首字母或全拼搜索
- android 拼音搜索联系人分析与实现(支持多音字,支持T9搜索,支持Qwerty搜索)
- android 支持分组和联系人展示的一个小样例
- 如何通过contactId来查找联系人信息-android
- Android中ContentProvider组件详解 .(查找sd卡上的歌曲和联系人)
- android 支持分组和联系人展示的一个小例子
- Android手机联系人带字母索引的快速查找
- android 中查找获取联系人
- 《android2.2自带通讯录》之联系人按拼音排序以及按汉字首字母或全拼搜索
- Android关于联系人电话号码的查找
- Android 学习笔记 Contacts (三)Contacts 查找,增加,更新,删除联系人