Android: Kontakt Picker Intent | Nie można utworzyć instancji typu Uri

Próbuję wybrać kontakty tylko z numerem telefonu. I śledzęten kod

static final int PICK_CONTACT_REQUEST = 1;  // The request code
...
private void pickContact() {
    Intent pickContactIntent = new Intent(Intent.ACTION_PICK, new Uri("content://contacts"));
    pickContactIntent.setType(Phone.CONTENT_TYPE); // Show user only contacts w/ phone numbers
    startActivityForResult(pickContactIntent, PICK_CONTACT_REQUEST);
}

Ale niestety, pokazuje błąd:Cannot instantiate the type Uri

Właściwie mam inny działający kod, który działa idealnie, ale ulega awarii podczas wybierania kontaktów e-mail. Potrzebuję tylko numerów telefonów.

Intent intentContact = new Intent(Intent.ACTION_PICK,
                                ContactsContract.Contacts.CONTENT_URI);
intentContact.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                            startActivityForResult(intentContact, PICK_CONTACT);

i naonReceive(), ta metoda jest nazywana

public void getContactInfo(Intent intent) {

    ContentResolver cr = getContentResolver();
    cursor = cr.query(intent.getData(), null, null, null, null);

    while (cursor.moveToNext()) {
        String contactId = cursor.getString(cursor
                .getColumnIndex(ContactsContract.Contacts._ID));
        if (Integer
                .parseInt(cursor.getString(cursor
                        .getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
            Cursor phones = getContentResolver().query(
                    ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                    null,
                    ContactsContract.CommonDataKinds.Phone.CONTACT_ID
                            + " = " + contactId, null, null);
            while (phones.moveToNext()) {
                phoneNumber = phones
                        .getString(phones
                                .getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
            }
            phones.close();
        } else {
            snipp.showAlertDialog(getApplicationContext(), "No Number",
                    "Cannot read number", false);
        }

    }
    cursor.close();
}

questionAnswers(2)

yourAnswerToTheQuestion