android.provider
public
static
final
class
android.provider.MediaStore.Images.Media
Summary
Constants
Public Constructors
Public Methods
|
|
final |
static |
|
Bitmap |
getBitmap(ContentResolver cr, Uri url) |
|
|
|
static |
|
Uri |
getContentUri(String volumeName) |
|
|
final |
static |
|
String |
insertImage(ContentResolver cr, String imagePath, String name, String description) |
|
|
final |
static |
|
String |
insertImage(ContentResolver cr, Bitmap source, String title, String description) |
|
|
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) |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
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
Retrieves an image for the given url as a
Bitmap.
Parameters
cr
| The content resolver to use |
url
| The url of the image |
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
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
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.