public static final class

MediaStore.Images.Media

extends Object
implements MediaStore.Images.ImageColumns
java.lang.Object
   ↳ android.provider.MediaStore.Images.Media

Summary

Constants
String CONTENT_TYPE The MIME type of of this directory of images.
String DEFAULT_SORT_ORDER The default sort order for this table
Uri EXTERNAL_CONTENT_URI The content:// style URI for the "primary" external storage volume.
Uri INTERNAL_CONTENT_URI The content:// style URI for the internal storage.
[Expand]
Inherited Constants
From interface android.provider.BaseColumns
From interface android.provider.MediaStore.Images.ImageColumns
From interface android.provider.MediaStore.MediaColumns
Public Constructors
MediaStore.Images.Media()
Public Methods
final 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.
final static String insertImage(ContentResolver cr, String imagePath, String name, String description)
Insert an image and create a thumbnail for it.
final static String insertImage(ContentResolver cr, Bitmap source, String title, String description)
Insert an image and create a thumbnail for it.
final static Cursor query(ContentResolver cr, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy)
final static Cursor query(ContentResolver cr, Uri uri, String[] projection, String where, String orderBy)
final static Cursor query(ContentResolver cr, Uri uri, String[] projection)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

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.

Constant Value: "vnd.android.cursor.dir/image"

public static final String DEFAULT_SORT_ORDER

The default sort order for this table

Constant Value: "bucket_display_name"

public static final Uri EXTERNAL_CONTENT_URI

The content:// style URI for the "primary" external storage volume.

public static final Uri INTERNAL_CONTENT_URI

The content:// style URI for the internal storage.

Public Constructors

public MediaStore.Images.Media ()

Public Methods

public static final Bitmap getBitmap (ContentResolver cr, Uri url)

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
FileNotFoundException

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

public static final String insertImage (ContentResolver cr, String imagePath, String name, String description)

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

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.

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

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)