Pick a Number and Name From Contacts List in android app
i want to pick a contact with it's number from my contacts list. i read a lot of solutions and research for couple weeks but all of articles didn't work properly. some codes like following: Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT); // and in activityresult: if (resultCode == Activity.RESULT_OK) { Uri contactData = data.getData(); Cursor c = managedQuery(contactData, null, null, null, null); if (c.moveToFirst()) { String name = c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));