Build 1.0_r1(from source)

android.provider
Class MediaStore.Images.Media

java.lang.Object
  extended by android.provider.MediaStore.Images.Media
All Implemented Interfaces:
BaseColumns, MediaStore.Images.ImageColumns, MediaStore.MediaColumns
Enclosing class:
MediaStore.Images

public static final class MediaStore.Images.Media
extends Object
implements MediaStore.Images.ImageColumns


Field Summary
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.
 
Fields inherited from interface android.provider.MediaStore.Images.ImageColumns
BUCKET_DISPLAY_NAME, BUCKET_ID, DATE_TAKEN, DESCRIPTION, IS_PRIVATE, LATITUDE, LONGITUDE, MINI_THUMB_MAGIC, ORIENTATION, PICASA_ID
 
Fields inherited from interface android.provider.MediaStore.MediaColumns
DATA, DATE_ADDED, DATE_MODIFIED, DISPLAY_NAME, MIME_TYPE, SIZE, TITLE
 
Fields inherited from interface android.provider.BaseColumns
_COUNT, _ID
 
Constructor Summary
MediaStore.Images.Media()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERNAL_CONTENT_URI

public static final Uri INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.


EXTERNAL_CONTENT_URI

public static final Uri EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage volume.


CONTENT_TYPE

public static final 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.

See Also:
Constant Field Values

DEFAULT_SORT_ORDER

public static final String DEFAULT_SORT_ORDER
The default sort order for this table

See Also:
Constant Field Values
Constructor Detail

MediaStore.Images.Media

public MediaStore.Images.Media()
Method Detail

query

public static final Cursor query(ContentResolver cr,
                                 Uri uri,
                                 String[] projection)

query

public static final Cursor query(ContentResolver cr,
                                 Uri uri,
                                 String[] projection,
                                 String where,
                                 String orderBy)

query

public static final Cursor query(ContentResolver cr,
                                 Uri uri,
                                 String[] projection,
                                 String selection,
                                 String[] selectionArgs,
                                 String orderBy)

getBitmap

public static final Bitmap getBitmap(ContentResolver cr,
                                     Uri url)
                              throws FileNotFoundException,
                                     IOException
Retrieves an image for the given url as a Bitmap.

Parameters:
cr - The content resolver to use
url - The url of the image
Throws:
FileNotFoundException
IOException

insertImage

public static final String insertImage(ContentResolver cr,
                                       String imagePath,
                                       String name,
                                       String description)
                                throws FileNotFoundException
Insert an image and create a thumbnail for it.

Parameters:
cr - The content resolver to use
imagePath - The path to the image to insert
name - The name of the image
description - The description of the image
Returns:
The URL to the newly created image
Throws:
FileNotFoundException

insertImage

public static final String insertImage(ContentResolver cr,
                                       Bitmap source,
                                       String title,
                                       String description)
Insert an image and create a thumbnail for it.

Parameters:
cr - The content resolver to use
source - The stream to use for the image
title - The name of the image
description - The description of the image
Returns:
The URL to the newly created image, or null if the image failed to be stored for any reason.

getContentUri

public static Uri getContentUri(String volumeName)
Get the content:// style URI for the image media table on the given volume.

Parameters:
volumeName - the name of the volume to get the URI for
Returns:
the URI to the image media table on the given volume

Build 1.0_r1(from source)

Please submit a feedback, bug or feature