# Print output for @column tags ?>
public
static
final
class
MediaStore.Images.Media
extends Object
implements
MediaStore.Images.ImageColumns
java.lang.Object | |
↳ | android.provider.MediaStore.Images.Media |
Constants | |
---|---|
String |
CONTENT_TYPE
The MIME type of this directory of images. |
String |
DEFAULT_SORT_ORDER
The default sort order for this table |
Inherited constants |
---|
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 | |
---|---|
Media()
|
Public methods | |
---|---|
static
Bitmap
|
getBitmap(ContentResolver cr, Uri url)
This method is deprecated.
loading of images should be performed through
|
static
Uri
|
getContentUri(String volumeName)
Get the content:// style URI for the image media table on the given volume. |
static
Uri
|
getContentUri(String volumeName, long id)
Get the content:// style URI for a single row in the images table on the given volume. |
static
String
|
insertImage(ContentResolver cr, String imagePath, String name, String description)
This method is deprecated.
inserting of images should be performed using
|
static
String
|
insertImage(ContentResolver cr, Bitmap source, String title, String description)
This method is deprecated.
inserting of images should be performed using
|
static
Cursor
|
query(ContentResolver cr, Uri uri, String[] projection)
This method is deprecated.
all queries should be performed through
|
static
Cursor
|
query(ContentResolver cr, Uri uri, String[] projection, String where, String orderBy)
This method is deprecated.
all queries should be performed through
|
static
Cursor
|
query(ContentResolver cr, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy)
This method is deprecated.
all queries should be performed through
|
Inherited methods | |
---|---|
public static final String CONTENT_TYPE
The MIME type 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 Media ()
public static Bitmap getBitmap (ContentResolver cr, Uri url)
This method is deprecated.
loading of images should be performed through
ImageDecoder#createSource(ContentResolver, Uri)
,
which offers modern features like
PostProcessor
.
Retrieves an image for the given url as a Bitmap
.
Parameters | |
---|---|
cr |
ContentResolver : The content resolver to use |
url |
Uri : The url of the image |
Returns | |
---|---|
Bitmap |
Throws | |
---|---|
FileNotFoundException |
|
IOException |
public static Uri getContentUri (String volumeName)
Get the content:// style URI for the image media table on the given volume.
Parameters | |
---|---|
volumeName |
String : the name of the volume to get the URI for |
Returns | |
---|---|
Uri |
the URI to the image media table on the given volume |
public static Uri getContentUri (String volumeName, long id)
Get the content:// style URI for a single row in the images table on the given volume.
Parameters | |
---|---|
volumeName |
String : the name of the volume to get the URI for
This value cannot be null . |
id |
long : the image to get the URI for |
Returns | |
---|---|
Uri |
the URI to the images table on the given volume
This value cannot be null . |
public static String insertImage (ContentResolver cr, String imagePath, String name, String description)
This method is deprecated.
inserting of images should be performed using
MediaColumns#IS_PENDING
, which offers richer
control over lifecycle.
Insert an image and create a thumbnail for it.
Parameters | |
---|---|
cr |
ContentResolver : The content resolver to use |
imagePath |
String : The path to the image to insert |
name |
String : The name of the image |
description |
String : The description of the image |
Returns | |
---|---|
String |
The URL to the newly created image |
Throws | |
---|---|
FileNotFoundException |
public static String insertImage (ContentResolver cr, Bitmap source, String title, String description)
This method is deprecated.
inserting of images should be performed using
MediaColumns#IS_PENDING
, which offers richer
control over lifecycle.
Insert an image and create a thumbnail for it.
Parameters | |
---|---|
cr |
ContentResolver : The content resolver to use |
source |
Bitmap : The stream to use for the image |
title |
String : The name of the image |
description |
String : The description of the image |
Returns | |
---|---|
String |
The URL to the newly created image, or null if the image failed to be stored
for any reason. |
public static Cursor query (ContentResolver cr, Uri uri, String[] projection)
This method is deprecated.
all queries should be performed through
ContentResolver
directly, which offers modern
features like CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
uri |
Uri |
projection |
String |
Returns | |
---|---|
Cursor |
public static Cursor query (ContentResolver cr, Uri uri, String[] projection, String where, String orderBy)
This method is deprecated.
all queries should be performed through
ContentResolver
directly, which offers modern
features like CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
uri |
Uri |
projection |
String |
where |
String |
orderBy |
String |
Returns | |
---|---|
Cursor |
public static Cursor query (ContentResolver cr, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy)
This method is deprecated.
all queries should be performed through
ContentResolver
directly, which offers modern
features like CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
uri |
Uri |
projection |
String |
selection |
String |
selectionArgs |
String |
orderBy |
String |
Returns | |
---|---|
Cursor |