# Print output for @column tags ?>
public
static
class
MediaStore.Images.Thumbnails
extends Object
implements
BaseColumns
java.lang.Object | |
↳ | android.provider.MediaStore.Images.Thumbnails |
This class is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it offers
richer control over requested thumbnail sizes and
cancellation behavior.
This class provides utility methods to obtain thumbnails for various
Images
items.
Constants | |
---|---|
String |
DATA
This constant is deprecated.
Apps that target |
String |
DEFAULT_SORT_ORDER
The default sort order for this table |
int |
FULL_SCREEN_KIND
|
String |
HEIGHT
The height of the thumbnail
|
String |
IMAGE_ID
The original image for the thumbnal
|
String |
KIND
The kind of the thumbnail
|
int |
MICRO_KIND
|
int |
MINI_KIND
|
String |
THUMB_DATA
This constant is deprecated. this column never existed internally, and could never have returned valid data. |
String |
WIDTH
The width of the thumbnal
|
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 | |
---|---|
Thumbnails()
|
Public methods | |
---|---|
static
void
|
cancelThumbnailRequest(ContentResolver cr, long origId)
This method is deprecated.
Callers should migrate to using
|
static
void
|
cancelThumbnailRequest(ContentResolver cr, long origId, long groupId)
This method is deprecated.
Callers should migrate to using
|
static
Uri
|
getContentUri(String volumeName)
Get the content:// style URI for the image media table on the given volume. |
static
Size
|
getKindSize(int kind)
This method is deprecated.
Callers should migrate to using
|
static
Bitmap
|
getThumbnail(ContentResolver cr, long imageId, long groupId, int kind, BitmapFactory.Options options)
This method is deprecated.
Callers should migrate to using
|
static
Bitmap
|
getThumbnail(ContentResolver cr, long imageId, int kind, BitmapFactory.Options options)
This method is deprecated.
Callers should migrate to using
|
static
final
Cursor
|
query(ContentResolver cr, Uri uri, String[] projection)
This method is deprecated.
all queries should be performed through
|
static
final
Cursor
|
queryMiniThumbnail(ContentResolver cr, long origId, int kind, String[] projection)
This method is deprecated.
all queries should be performed through
|
static
final
Cursor
|
queryMiniThumbnails(ContentResolver cr, Uri uri, int kind, String[] projection)
This method is deprecated.
all queries should be performed through
|
Inherited methods | |
---|---|
public static final String DATA
This constant is deprecated.
Apps that target R
and higher
may not update the value of this column. However they may read the file
path value from this column and use in file operations.
Path to the thumbnail file on disk.
As of Build.VERSION_CODES.Q
, this thumbnail
has correct rotation, don't need to rotate it again.
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_STRING
.
Constant Value: "_data"
public static final String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "image_id ASC"
public static final int FULL_SCREEN_KIND
Constant Value: 2 (0x00000002)
public static final String HEIGHT
The height of the thumbnail
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
, and are read-only and cannot be mutated.
Constant Value: "height"
public static final String IMAGE_ID
The original image for the thumbnal
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
.
Constant Value: "image_id"
public static final String KIND
The kind of the thumbnail
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
.
Constant Value: "kind"
public static final int MICRO_KIND
Constant Value: 3 (0x00000003)
public static final int MINI_KIND
Constant Value: 1 (0x00000001)
public static final String THUMB_DATA
This constant is deprecated.
this column never existed internally, and could never
have returned valid data.
The blob raw data of thumbnail
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_BLOB
.
Constant Value: "thumb_data"
public static final String WIDTH
The width of the thumbnal
This constant represents a column name that can be used with a ContentProvider
through a ContentValues
or Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
, and are read-only and cannot be mutated.
Constant Value: "width"
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 Thumbnails ()
public static void cancelThumbnailRequest (ContentResolver cr, long origId)
This method is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Cancel any outstanding getThumbnail(ContentResolver, long, int, BitmapFactory.Options)
requests, causing
them to return by throwing a OperationCanceledException
.
This method has no effect on
ContentResolver#loadThumbnail
calls, since they provide
their own CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
origId |
long |
public static void cancelThumbnailRequest (ContentResolver cr, long origId, long groupId)
This method is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Cancel any outstanding getThumbnail(ContentResolver, long, int, BitmapFactory.Options)
requests, causing
them to return by throwing a OperationCanceledException
.
This method has no effect on
ContentResolver#loadThumbnail
calls, since they provide
their own CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
origId |
long |
groupId |
long |
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 Size getKindSize (int kind)
This method is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Return the typical Size
(in pixels) used internally when
the given thumbnail kind is requested.
Parameters | |
---|---|
kind |
int |
Returns | |
---|---|
Size |
This value cannot be null . |
public static Bitmap getThumbnail (ContentResolver cr, long imageId, long groupId, int kind, BitmapFactory.Options options)
This method is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Return thumbnail representing a specific image item. If a
thumbnail doesn't exist, this method will block until it's
generated. Callers are responsible for their own in-memory
caching of returned values.
As of Build.VERSION_CODES.Q
, this output
of the thumbnail has correct rotation, don't need to rotate
it again.
Parameters | |
---|---|
cr |
ContentResolver |
imageId |
long : the image item to obtain a thumbnail for. |
groupId |
long |
kind |
int : optimal thumbnail size desired. |
options |
BitmapFactory.Options |
Returns | |
---|---|
Bitmap |
decoded thumbnail, or null if problem was
encountered. |
public static Bitmap getThumbnail (ContentResolver cr, long imageId, int kind, BitmapFactory.Options options)
This method is deprecated.
Callers should migrate to using
ContentResolver#loadThumbnail
, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Return thumbnail representing a specific image item. If a
thumbnail doesn't exist, this method will block until it's
generated. Callers are responsible for their own in-memory
caching of returned values.
As of Build.VERSION_CODES.Q
, this output
of the thumbnail has correct rotation, don't need to rotate
it again.
Parameters | |
---|---|
cr |
ContentResolver |
imageId |
long : the image item to obtain a thumbnail for. |
kind |
int : optimal thumbnail size desired. |
options |
BitmapFactory.Options |
Returns | |
---|---|
Bitmap |
decoded thumbnail, or null if problem was
encountered. |
public static final 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 final Cursor queryMiniThumbnail (ContentResolver cr, long origId, int kind, String[] projection)
This method is deprecated.
all queries should be performed through
ContentResolver
directly, which offers modern
features like CancellationSignal
.
Parameters | |
---|---|
cr |
ContentResolver |
origId |
long |
kind |
int |
projection |
String |
Returns | |
---|---|
Cursor |
public static final Cursor queryMiniThumbnails (ContentResolver cr, Uri uri, int kind, 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 |
kind |
int |
projection |
String |
Returns | |
---|---|
Cursor |