android 从SIM卡获取联系人信息

/**
     * 从SIM卡中读取联系人信息
     * @return
     */
    private Cursor getContacts() {
        Uri uri = Uri.parse("content://icc/adn");//Contacts.People.CONTENT_URI; 
//        Uri uri = Uri.parse("content://sim/adn");
        String[] projection = new String[] { "name",
                        "phone" };
        String selection = null;
        String[] selectionArgs = null;
        String sortOrder = "name"//Contacts.People.NAME// Contacts.PeopleColumns.DISPLAY_NAME
                        + " COLLATE LOCALIZED ASC";

        return managedQuery(uri, projection, selection, selectionArgs,
                        sortOrder);
    }

你可能感兴趣的:(android,String,null)