java.lang.Object | |
↳ | android.provider.ContactsContract.DisplayPhoto |
Helper class for accessing full-size photos by photo file ID.
Usage example:
PHOTO_FILE_ID
)
public InputStream openDisplayPhoto(long photoFileId) { Uri displayPhotoUri = ContentUris.withAppendedId(DisplayPhoto.CONTENT_URI, photoKey); try { AssetFileDescriptor fd = getContentResolver().openAssetFileDescriptor( displayPhotoUri, "r"); return fd.createInputStream(); } catch (IOException e) { return null; } }
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DISPLAY_MAX_DIM |
Queries to CONTENT_MAX_DIMENSIONS_URI will
contain this column, populated with the maximum height and width (in pixels)
that will be stored for a display photo.
|
|||||||||
String | THUMBNAIL_MAX_DIM |
Queries to CONTENT_MAX_DIMENSIONS_URI will
contain this column, populated with the height and width (in pixels) for photo
thumbnails.
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_MAX_DIMENSIONS_URI | This URI allows the caller to query for the maximum dimensions of a display photo or thumbnail. | ||||||||||
CONTENT_URI | The content:// style URI for this class, which allows access to full-size photos, given a key. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Queries to CONTENT_MAX_DIMENSIONS_URI
will
contain this column, populated with the maximum height and width (in pixels)
that will be stored for a display photo. Larger photos will be down-sized to
fit within a square of this many pixels.
Queries to CONTENT_MAX_DIMENSIONS_URI
will
contain this column, populated with the height and width (in pixels) for photo
thumbnails.
This URI allows the caller to query for the maximum dimensions of a display photo or thumbnail. Requests to this URI can be performed on the UI thread because they are always unblocking.
The content:// style URI for this class, which allows access to full-size photos, given a key.