Thumbnails
classThumbnails: BaseColumns
kotlin.Any | |
↳ | android.provider.MediaStore.Video.Thumbnails |
This class provides utility methods to obtain thumbnails for various Video
items.
Summary
Constants | |
---|---|
static String |
Path to the thumbnail file on disk. |
static String |
The default sort order for this table |
static Int | |
static String |
The height of the thumbnail |
static String |
The kind of the thumbnail |
static Int | |
static Int | |
static String |
The original image for the thumbnal |
static String |
The width of the thumbnal |
Inherited constants | |
---|---|
Public constructors | |
---|---|
Public methods | |
---|---|
open static Unit |
cancelThumbnailRequest(cr: ContentResolver!, origId: Long) Cancel any outstanding #getThumbnail requests, causing them to return by throwing a |
open static Unit |
cancelThumbnailRequest(cr: ContentResolver!, videoId: Long, groupId: Long) Cancel any outstanding #getThumbnail requests, causing them to return by throwing a |
open static Uri! |
getContentUri(volumeName: String!) Get the content:// style URI for the image media table on the given volume. |
open static Size |
getKindSize(kind: Int) Return the typical |
open static Bitmap! |
getThumbnail(cr: ContentResolver!, videoId: Long, kind: Int, options: BitmapFactory.Options!) Return thumbnail representing a specific video item. |
open static Bitmap! |
getThumbnail(cr: ContentResolver!, videoId: Long, groupId: Long, kind: Int, options: BitmapFactory.Options!) Return thumbnail representing a specific video item. |
Properties | |
---|---|
static Uri! |
The content:// style URI for the "primary" external storage volume. |
static Uri! |
The content:// style URI for the internal storage. |
Constants
DATA
static valDATA: String
Deprecated: Deprecated in Java.
Path to the thumbnail file on disk.
This constant represents a column name that can be used with a android.content.ContentProvider
through a android.content.ContentValues
or android.database.Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_STRING
.
Value: "_data"
DEFAULT_SORT_ORDER
static valDEFAULT_SORT_ORDER: String
Deprecated: Deprecated in Java.
The default sort order for this table
Value: "video_id ASC"
FULL_SCREEN_KIND
static valFULL_SCREEN_KIND: Int
Deprecated: Deprecated in Java.
Value: 2
HEIGHT
static valHEIGHT: String
Deprecated: Deprecated in Java.
The height of the thumbnail
This constant represents a column name that can be used with a android.content.ContentProvider
through a android.content.ContentValues
or android.database.Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
, and are read-only and cannot be mutated.
Value: "height"
KIND
static valKIND: String
Deprecated: Deprecated in Java.
The kind of the thumbnail
This constant represents a column name that can be used with a android.content.ContentProvider
through a android.content.ContentValues
or android.database.Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
.
Value: "kind"
VIDEO_ID
static valVIDEO_ID: String
Deprecated: Deprecated in Java.
The original image for the thumbnal
This constant represents a column name that can be used with a android.content.ContentProvider
through a android.content.ContentValues
or android.database.Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
.
Value: "video_id"
WIDTH
static valWIDTH: String
Deprecated: Deprecated in Java.
The width of the thumbnal
This constant represents a column name that can be used with a android.content.ContentProvider
through a android.content.ContentValues
or android.database.Cursor
object. The values stored in this column are Cursor#FIELD_TYPE_INTEGER
, and are read-only and cannot be mutated.
Value: "width"
Public constructors
Public methods
cancelThumbnailRequest
open static funcancelThumbnailRequest(
cr: ContentResolver!,
origId: Long
): Unit
Deprecated: Callers should migrate to using ContentResolver.loadThumbnail
, since it offers richer control over requested thumbnail sizes and cancellation behavior.
Cancel any outstanding #getThumbnail requests, causing them to return by throwing a OperationCanceledException
.
This method has no effect on ContentResolver.loadThumbnail
calls, since they provide their own CancellationSignal
.
cancelThumbnailRequest
open static funcancelThumbnailRequest(
cr: ContentResolver!,
videoId: Long,
groupId: Long
): Unit
Deprecated: Callers should migrate to using ContentResolver.loadThumbnail
, since it offers richer control over requested thumbnail sizes and cancellation behavior.
Cancel any outstanding #getThumbnail requests, causing them to return by throwing a OperationCanceledException
.
This method has no effect on ContentResolver.loadThumbnail
calls, since they provide their own CancellationSignal
.
getContentUri
open static fungetContentUri(volumeName: String!): Uri!
Deprecated: Deprecated in Java.
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 |
Return | |
---|---|
Uri! |
the URI to the image media table on the given volume |
getKindSize
open static fungetKindSize(kind: Int): Size
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.
Return | |
---|---|
Size |
This value cannot be null . |
getThumbnail
open static fungetThumbnail(
cr: ContentResolver!,
videoId: Long,
kind: Int,
options: BitmapFactory.Options!
): Bitmap!
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 | |
---|---|
videoId |
Long: the video item to obtain a thumbnail for. |
kind |
Int: optimal thumbnail size desired. |
Return | |
---|---|
Bitmap! |
decoded thumbnail, or null if problem was encountered. |
getThumbnail
open static fungetThumbnail(
cr: ContentResolver!,
videoId: Long,
groupId: Long,
kind: Int,
options: BitmapFactory.Options!
): Bitmap!
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 | |
---|---|
videoId |
Long: the video item to obtain a thumbnail for. |
kind |
Int: optimal thumbnail size desired. |
Return | |
---|---|
Bitmap! |
decoded thumbnail, or null if problem was encountered. |
Properties
EXTERNAL_CONTENT_URI
static valEXTERNAL_CONTENT_URI: Uri!
Deprecated: Deprecated in Java.
The content:// style URI for the "primary" external storage volume.
INTERNAL_CONTENT_URI
static valINTERNAL_CONTENT_URI: Uri!
Deprecated: Deprecated in Java.
The content:// style URI for the internal storage.