android 通讯录

saiman 发布于 2014/06/07 10:20
阅读 138
收藏 0
获取三星手的通讯录 获取不到,是三星的安全系数高呢?还是别的原因:List<Map<String, String>> list = new ArrayList<Map<String, String>>();
  Cursor cursor = context.getContentResolver().query(
    CallLog.Calls.CONTENT_URI, null, null, null, null);
  cursor.moveToFirst();
  do {
   String nameTemp = cursor.getString(cursor
     .getColumnIndex(CallLog.Calls.CACHED_NAME));
   Map<String, String> map = new HashMap<String, String>();
   map.put("namess", nameTemp);
   map.put("numss", cursor.getString(cursor
     .getColumnIndex(CallLog.Calls.NUMBER)));
   list.add(map);
  } while (cursor.moveToNext());
加载中
返回顶部
顶部