Most visited

Recently visited

Added in API level 5

MediaStore.Video.Thumbnails

public static class MediaStore.Video.Thumbnails
extends Object implements BaseColumns

java.lang.Object
   ↳ android.provider.MediaStore.Video.Thumbnails


此类允许开发人员查询和获取两种缩略图:MINI_KIND:512 x 384缩略图MICRO_KIND:96 x 96缩略图

Summary

Constants

String DATA

磁盘上缩略图文件的路径。

String DEFAULT_SORT_ORDER

此表的默认排序顺序

int FULL_SCREEN_KIND

String HEIGHT

缩略图的高度

类型:INTEGER(长)

String KIND

缩略图的种类

类型:INTEGER(下面的值之一)

int MICRO_KIND

int MINI_KIND

String VIDEO_ID

thumbnal的原始图像

类型:INTEGER(视频表中的ID)

String WIDTH

thumbnal的宽度

类型:INTEGER(长)

Inherited constants

From interface android.provider.BaseColumns

Fields

public static final Uri EXTERNAL_CONTENT_URI

内容://“主”外部存储卷的样式URI。

public static final Uri INTERNAL_CONTENT_URI

内容://内部存储的样式URI。

Public constructors

MediaStore.Video.Thumbnails()

Public methods

static void cancelThumbnailRequest(ContentResolver cr, long origId)

此方法取消缩略图请求,因此等待getThumbnail的客户端将被中断并立即返回。

static void cancelThumbnailRequest(ContentResolver cr, long origId, long groupId)

此方法取消缩略图请求,因此等待getThumbnail的客户端将被中断并立即返回。

static Uri getContentUri(String volumeName)

获取给定卷上图像媒体表的content:// style URI。

static Bitmap getThumbnail(ContentResolver cr, long origId, long groupId, int kind, BitmapFactory.Options options)

此方法检查指定图像(origId)的缩略图是否已创建。

static Bitmap getThumbnail(ContentResolver cr, long origId, int kind, BitmapFactory.Options options)

此方法检查指定图像(origId)的缩略图是否已创建。

Inherited methods

From class java.lang.Object

Constants

DATA

Added in API level 5
String DATA

磁盘上缩略图文件的路径。

请注意,应用程序可能没有文件系统权限来直接访问此路径。 应用程序应该使用openFileDescriptor(Uri, String)来获得访问权限,而不是直接打开此路径。

类型:TEXT

常量值:“_data”

DEFAULT_SORT_ORDER

Added in API level 5
String DEFAULT_SORT_ORDER

此表的默认排序顺序

常数值:“video_id ASC”

FULL_SCREEN_KIND

Added in API level 5
int FULL_SCREEN_KIND

常量值:2(0x00000002)

HEIGHT

Added in API level 5
String HEIGHT

缩略图的高度

类型:INTEGER(长)

常数值:“高度”

KIND

Added in API level 5
String KIND

缩略图的种类

Type: INTEGER (One of the values below)

常数值:“kind”

MICRO_KIND

Added in API level 5
int MICRO_KIND

常量值:3(0x00000003)

MINI_KIND

Added in API level 5
int MINI_KIND

常数值:1(0x00000001)

VIDEO_ID

Added in API level 5
String VIDEO_ID

thumbnal的原始图像

Type: INTEGER (ID from Video table)

常数值:“video_id”

WIDTH

Added in API level 5
String WIDTH

thumbnal的宽度

类型:INTEGER(长)

常数值:“宽度”

Fields

EXTERNAL_CONTENT_URI

Added in API level 5
Uri EXTERNAL_CONTENT_URI

内容://“主”外部存储卷的样式URI。

INTERNAL_CONTENT_URI

Added in API level 5
Uri INTERNAL_CONTENT_URI

内容://内部存储的样式URI。

Public constructors

MediaStore.Video.Thumbnails

Added in API level 5
MediaStore.Video.Thumbnails ()

Public methods

cancelThumbnailRequest

Added in API level 5
void cancelThumbnailRequest (ContentResolver cr, 
                long origId)

此方法取消缩略图请求,因此等待getThumbnail的客户端将被中断并立即返回。 只有创建getThumbnail请求的原始进程才能取消自己的请求。

Parameters
cr ContentResolver: ContentResolver
origId long: original video id

cancelThumbnailRequest

Added in API level 8
void cancelThumbnailRequest (ContentResolver cr, 
                long origId, 
                long groupId)

此方法取消缩略图请求,因此等待getThumbnail的客户端将被中断并立即返回。 只有创建getThumbnail请求的原始进程才能取消自己的请求。

Parameters
cr ContentResolver: ContentResolver
origId long: original video id
groupId long: the same groupId used in getThumbnail.

getContentUri

Added in API level 5
Uri getContentUri (String volumeName)

获取给定卷上图像媒体表的content:// style URI。

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

getThumbnail

Added in API level 8
Bitmap getThumbnail (ContentResolver cr, 
                long origId, 
                long groupId, 
                int kind, 
                BitmapFactory.Options options)

此方法检查指定图像(origId)的缩略图是否已创建。 它将被阻止,直到生成缩略图。

Parameters
cr ContentResolver: ContentResolver used to dispatch queries to MediaProvider.
origId long: Original image id associated with thumbnail of interest.
groupId long: the id of group to which this request belongs
kind int: The type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND
options BitmapFactory.Options: this is only used for MINI_KIND when decoding the Bitmap
Returns
Bitmap A Bitmap instance. It could be null if the original image associated with origId doesn't exist or memory is not enough.

getThumbnail

Added in API level 5
Bitmap getThumbnail (ContentResolver cr, 
                long origId, 
                int kind, 
                BitmapFactory.Options options)

此方法检查指定图像(origId)的缩略图是否已创建。 它将被阻止,直到生成缩略图。

Parameters
cr ContentResolver: ContentResolver used to dispatch queries to MediaProvider.
origId long: Original image id associated with thumbnail of interest.
kind int: The type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND.
options BitmapFactory.Options: this is only used for MINI_KIND when decoding the Bitmap
Returns
Bitmap A Bitmap instance. It could be null if the original image associated with origId doesn't exist or memory is not enough.

Hooray!