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
[Expand]
Inherited Constants
From interface android.provider.BaseColumns
From interface android.provider.MediaStore.Images.ImageColumns
From interface android.provider.MediaStore.MediaColumns
Fields
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
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 where, String orderBy)
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)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CONTENT_TYPE

Since: API Level 1

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

Since: API Level 1

The default sort order for this table

Constant Value: "bucket_display_name"

Fields

public static final Uri EXTERNAL_CONTENT_URI

Since: API Level 1

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

public static final Uri INTERNAL_CONTENT_URI

Since: API Level 1

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

Public Constructors

public MediaStore.Images.Media ()

Since: API Level 1

Public Methods

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

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

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)

Since: API Level 1

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 where, String orderBy)

Since: API Level 1

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

Since: API Level 1

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

Since: API Level 1