Added in API level 5
Deprecated in API level 29

Thumbnails


class Thumbnails : 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
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.

static String

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.

static Int

static Int

static String

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.

static String

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.

Inherited constants
Public constructors

Public methods
open static Unit

Cancel any outstanding #getThumbnail requests, causing them to return by throwing a OperationCanceledException.

open static Unit
cancelThumbnailRequest(cr: ContentResolver!, videoId: Long, groupId: Long)

Cancel any outstanding #getThumbnail requests, causing them to return by throwing a OperationCanceledException.

open static Uri!
getContentUri(volumeName: String!)

Get the content:// style URI for the image media table on the given volume.

open static Size

Return the typical Size (in pixels) used internally when the given thumbnail kind is requested.

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

Added in API level 5
static val DATA: 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

Added in API level 5
static val DEFAULT_SORT_ORDER: String

Deprecated: Deprecated in Java.

The default sort order for this table

Value: "video_id ASC"

FULL_SCREEN_KIND

Added in API level 5
static val FULL_SCREEN_KIND: Int

Deprecated: Deprecated in Java.

Value: 2

HEIGHT

Added in API level 5
static val HEIGHT: 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

Added in API level 5
static val KIND: 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"

MICRO_KIND

Added in API level 5
static val MICRO_KIND: Int

Deprecated: Deprecated in Java.

Value: 3

MINI_KIND

Added in API level 5
static val MINI_KIND: Int

Deprecated: Deprecated in Java.

Value: 1

VIDEO_ID

Added in API level 5
static val VIDEO_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

Added in API level 5
static val WIDTH: 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

Thumbnails

Added in API level 5
Thumbnails()

Public methods

cancelThumbnailRequest

Added in API level 5
open static fun cancelThumbnailRequest(
    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

Added in API level 8
Deprecated in API level 29
open static fun cancelThumbnailRequest(
    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

Added in API level 5
open static fun getContentUri(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

Added in API level 30
Deprecated in API level 29
open static fun getKindSize(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

Added in API level 5
open static fun getThumbnail(
    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

Added in API level 8
Deprecated in API level 29
open static fun getThumbnail(
    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

Added in API level 5
static val EXTERNAL_CONTENT_URI: Uri!

Deprecated: Deprecated in Java.

The content:// style URI for the "primary" external storage volume.

INTERNAL_CONTENT_URI

Added in API level 5
static val INTERNAL_CONTENT_URI: Uri!

Deprecated: Deprecated in Java.

The content:// style URI for the internal storage.