Android
android.provider
public static final class

android.provider.MediaStore.Images.Media

java.lang.Object
android.provider.MediaStore.Images.Media MediaStore.Images.ImageColumns

Summary

Constants

      Value  
String  CONTENT_TYPE  The MIME type of of this directory of images.  "vnd.android.cursor.dir/image" 
String  DEFAULT_SORT_ORDER  The default sort order for this table   "name ASC" 
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.     
Constants inherited from interface android.provider.BaseColumns
Constants inherited from interface android.provider.MediaStore.Images.ImageColumns
Constants inherited 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)
Methods inherited from class java.lang.Object

Details

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: "name ASC"

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)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48