Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.provider.Contacts.People;
- import android.database.Cursor;
- String[] projection = new String[] {People._ID,
- People._COUNT,
- People.NAME,
- People.NUMBER };
- // Get the base URI for the People table
- // in the Contacts content provider.
- Uri contacts = People.CONTENT_URI;
- // Make the query.
- Cursor managedCursor = managedQuery(contacts,
- projection, // Which columns to return
- null, // Which rows to return (all rows)
- null, // Selection arguments (none)
- People.NAME + "ASC"); // Put the results in ascending order by name
Add Comment
Please, Sign In to add comment