MediaStore.Video.Thumbnails | API reference | Android Developers
public
static
class
MediaStore.Video.Thumbnails
extends Object
implements
BaseColumns
This class was deprecated
in API level 29.
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
Video items.
Summary
Constants | |
|---|---|
String |
DATA
Path to the thumbnail file on disk. |
String |
DEFAULT_SORT_ORDER
The default sort order for this table |
int |
FULL_SCREEN_KIND
|
String |
HEIGHT
The height of the thumbnail. |
String |
KIND
The kind of the thumbnail. |
int |
MICRO_KIND
|
int |
MINI_KIND
|
String |
VIDEO_ID
The original image for the thumbnal. |
String |
WIDTH
The width of the thumbnal. |
Inherited constants | ||||
|---|---|---|---|---|
|
From interface
|
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 videoId, long groupId)
This method was deprecated
in API level 29.
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 was deprecated
in API level 29.
Callers should migrate to using
|
static
Bitmap
|
getThumbnail(ContentResolver cr, long videoId, long groupId, int kind, BitmapFactory.Options options)
This method was deprecated
in API level 29.
Callers should migrate to using
|
static
Bitmap
|
getThumbnail(ContentResolver cr, long videoId, int kind, BitmapFactory.Options options)
This method is deprecated.
Callers should migrate to using
|
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
Constants
DEFAULT_SORT_ORDER
public static final String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "video_id ASC"
FULL_SCREEN_KIND
public static final int FULL_SCREEN_KIND
Constant Value: 2 (0x00000002)
MICRO_KIND
public static final int MICRO_KIND
Constant Value: 3 (0x00000003)
MINI_KIND
public static final int MINI_KIND
Constant Value: 1 (0x00000001)
Fields
EXTERNAL_CONTENT_URI
public static final Uri EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage volume.
INTERNAL_CONTENT_URI
public static final Uri INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.
Public constructors
Thumbnails
public Thumbnails ()
Public methods
getContentUri
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 |
getKindSize
public static Size getKindSize (int kind)
This method was deprecated
in API level 29.
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. |
getThumbnail
public static Bitmap getThumbnail (ContentResolver cr, long videoId, long groupId, int kind, BitmapFactory.Options options)
This method was deprecated
in API level 29.
Callers should migrate to using
ContentResolver.loadThumbnail, since it
offers richer control over requested thumbnail sizes
and cancellation behavior.
Return thumbnail representing a specific video 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.
| Parameters | |
|---|---|
cr |
ContentResolver |
videoId |
long: the video 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. |
getThumbnail
public static Bitmap getThumbnail (ContentResolver cr, long videoId, 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 video 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.
| Parameters | |
|---|---|
cr |
ContentResolver |
videoId |
long: the video 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. |