Java tutorial
//package com.java2s; import android.content.ContentResolver; import android.database.Cursor; import android.provider.ContactsContract; public class Main { public static Cursor getAllContacts(ContentResolver cr) { return cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " ASC"); } }