Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.provider.Contacts.People;
- import android.content.ContentUris;
- import android.net.Uri;
- import android.database.Cursor;
- // Use the ContentUris method to produce the base URI
- // for the contact with _ID == 3.
- Uri myPerson = ContentUris.withAppendedId(People.CONTENT_URI, 3);
- // Alternatively, use the Uri method to produce the base URI.
- // It takes a string rather than an integer.
- Uri myPerson = Uri.withAppendedPath(People.CONTENT_URI, "3");
- // Then query for this specific record:
- Cursor cur = managedQuery(myPerson, null, null, null, null);
Add Comment
Please, Sign In to add comment