MediaStore.Images.Media
public static final class MediaStore.Images.Media
extends Object
implements MediaStore.Images.ImageColumns
Summary
Public methods |
static final 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 final String |
insertImage(ContentResolver cr, String imagePath, String name, String description) Insert an image and create a thumbnail for it. |
static final String |
insertImage(ContentResolver cr, Bitmap source, String title, String description) Insert an image and create a thumbnail for it. |
static final Cursor |
query(ContentResolver cr, Uri uri, String[] projection) |
static final Cursor |
query(ContentResolver cr, Uri uri, String[] projection, String where, String orderBy) |
static final Cursor |
query(ContentResolver cr, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy) |
Inherited methods |
From class java.lang.Object
Object |
clone() Creates and returns a copy of this object. |
boolean |
equals(Object obj) Indicates whether some other object is "equal to" this one. |
void |
finalize() Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
final Class<?> |
getClass() Returns the runtime class of this Object . |
int |
hashCode() Returns a hash code value for the object. |
final void |
notify() Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() Wakes up all threads that are waiting on this object's monitor. |
String |
toString() Returns a string representation of the object. |
final void |
wait(long millis, int nanos) Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed. |
final void |
wait(long millis) Causes the current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. |
final void |
wait() Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object. |
|
Constants
CONTENT_TYPE
String CONTENT_TYPE
The MIME type of of this directory of images. Note that each entry in this directory will have a standard image MIME type as appropriate -- for example, image/jpeg.
Constant Value: "vnd.android.cursor.dir/image"
DEFAULT_SORT_ORDER
String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "bucket_display_name"
Fields
EXTERNAL_CONTENT_URI
Uri EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage volume.
INTERNAL_CONTENT_URI
Uri INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.
Public constructors
MediaStore.Images.Media
MediaStore.Images.Media ()
Public methods
getBitmap
Bitmap getBitmap (ContentResolver cr,
Uri url)
Retrieves an image for the given url as a Bitmap
.
Parameters |
cr |
ContentResolver : The content resolver to use |
url |
Uri : The url of the image |
getContentUri
Uri getContentUri (String volumeName)
Get the content:// style URI for the image media table on the given volume.
Parameters |
volumeName |
String : the name of the volume to get the URI for |
Returns |
Uri |
the URI to the image media table on the given volume |
insertImage
String insertImage (ContentResolver cr,
String imagePath,
String name,
String description)
Insert an image and create a thumbnail for it.
Parameters |
cr |
ContentResolver : The content resolver to use |
imagePath |
String : The path to the image to insert |
name |
String : The name of the image |
description |
String : The description of the image |
Returns |
String |
The URL to the newly created image |
insertImage
String insertImage (ContentResolver cr,
Bitmap source,
String title,
String description)
Insert an image and create a thumbnail for it.
Parameters |
cr |
ContentResolver : The content resolver to use |
source |
Bitmap : The stream to use for the image |
title |
String : The name of the image |
description |
String : The description of the image |
Returns |
String |
The URL to the newly created image, or null if the image failed to be stored for any reason. |