底下節錄翻譯自上面:
- 所有提供器的URIs以字符串"content://"開頭
- 輔助函數ContentUris.withAppendedId()和Uri.withAppendedPath()使得將URI變成ID容易許多
//Use ContentUris to produce the base URI for the contact with _ID= 23. Uri myPerson = ContentUris.withAppendedId(People.CONTENT_URI, 23); // 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, "23"); // Then query for this specific record: Cursor cur = managedQuery(myPerson, null, null, null, null);