public static final class MediaStore.Images.Media extends Object implements MediaStore.Images.ImageColumns
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE
The MIME type of of this directory of
images.
|
static String |
DEFAULT_SORT_ORDER
The default sort order for this table
|
static Uri |
EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage
volume.
|
static Uri |
INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.
|
BUCKET_DISPLAY_NAME, BUCKET_ID, DATE_TAKEN, DESCRIPTION, IS_PRIVATE, LATITUDE, LONGITUDE, MINI_THUMB_MAGIC, ORIENTATION, PICASA_ID
DATA, DATE_ADDED, DATE_MODIFIED, DISPLAY_NAME, HEIGHT, IS_DRM, MEDIA_SCANNER_NEW_OBJECT_ID, MIME_TYPE, SIZE, TITLE, WIDTH
_COUNT, _ID
Constructor and Description |
---|
MediaStore.Images.Media() |
Modifier and Type | Method and Description |
---|---|
static Bitmap |
getBitmap(ContentResolver cr,
Uri url)
Retrieves an image for the given url as a
Bitmap . |
static Uri |
getContentUri(String volumeName)
Get the content:// style URI for the image media table on the
given volume.
|
static String |
insertImage(ContentResolver cr,
Bitmap source,
String title,
String description)
Insert an image and create a thumbnail for it.
|
static String |
insertImage(ContentResolver cr,
String imagePath,
String name,
String description)
Insert an image and create a thumbnail for it.
|
static Cursor |
query(ContentResolver cr,
Uri uri,
String[] projection) |
static Cursor |
query(ContentResolver cr,
Uri uri,
String[] projection,
String where,
String orderBy) |
static Cursor |
query(ContentResolver cr,
Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String orderBy) |
public static final Uri INTERNAL_CONTENT_URI
public static final Uri EXTERNAL_CONTENT_URI
public static final String CONTENT_TYPE
public static final String DEFAULT_SORT_ORDER
public static final Cursor query(ContentResolver cr, Uri uri, String[] projection)
public static final Cursor query(ContentResolver cr, Uri uri, String[] projection, String where, String orderBy)
public static final Cursor query(ContentResolver cr, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy)
public static final Bitmap getBitmap(ContentResolver cr, Uri url) throws FileNotFoundException, IOException
Bitmap
.cr
- The content resolver to useurl
- The url of the imageFileNotFoundException
IOException
public static final String insertImage(ContentResolver cr, String imagePath, String name, String description) throws FileNotFoundException
cr
- The content resolver to useimagePath
- The path to the image to insertname
- The name of the imagedescription
- The description of the imageFileNotFoundException
public static final String insertImage(ContentResolver cr, Bitmap source, String title, String description)
cr
- The content resolver to usesource
- The stream to use for the imagetitle
- The name of the imagedescription
- The description of the imagenull
if the image failed to be stored
for any reason.