Created
October 22, 2010 01:28
-
-
Save skatldjs/639744 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment