MediaStore.Images.Thumbnails

来源:互联网 发布:数据挖掘 软件 编辑:程序博客网 时间:2024/06/05 07:22

MediaStore.Images.Thumbnails

extends Object
implements BaseColumns
java.lang.Object   ↳android.provider.MediaStore.Images.Thumbnails

Class Overview


This class allows developers to query and get two kinds of thumbnails: MINI_KIND: 512 x 384 thumbnail MICRO_KIND: 96 x 96 thumbnail

Summary


ConstantsStringDATAThe data stream for the thumbnail

Type: DATA STREAM

StringDEFAULT_SORT_ORDERThe default sort order for this tableintFULL_SCREEN_KIND StringHEIGHTThe height of the thumbnail

Type: INTEGER (long)

StringIMAGE_IDThe original image for the thumbnal

Type: INTEGER (ID from Images table)

StringKINDThe kind of the thumbnail

Type: INTEGER (One of the values below)

intMICRO_KIND intMINI_KIND StringTHUMB_DATAThe blob raw data of thumbnail

Type: DATA STREAM

StringWIDTHThe width of the thumbnal

Type: INTEGER (long)

[Expand]
Inherited Constants
From interface android.provider.BaseColumns
Fieldspublic static final UriEXTERNAL_CONTENT_URIThe content:// style URI for the "primary" external storage volume.public static final UriINTERNAL_CONTENT_URIThe content:// style URI for the internal storage.Public ConstructorsMediaStore.Images.Thumbnails()Public Methodsstatic voidcancelThumbnailRequest(ContentResolver cr, long origId)
This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately.
static voidcancelThumbnailRequest(ContentResolver cr, long origId, long groupId)
This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately.
static UrigetContentUri(String volumeName)
Get the content:// style URI for the image media table on the given volume.
static BitmapgetThumbnail(ContentResolver cr, long origId, long groupId, int kind, BitmapFactory.Options options)
This method checks if the thumbnails of the specified image (origId) has been created.
static BitmapgetThumbnail(ContentResolver cr, long origId, int kind, BitmapFactory.Options options)
This method checks if the thumbnails of the specified image (origId) has been created.
final static Cursorquery(ContentResolver cr, Uri uri, String[] projection)final static CursorqueryMiniThumbnail(ContentResolver cr, long origId, int kind, String[] projection)final static CursorqueryMiniThumbnails(ContentResolver cr, Uri uri, int kind, String[] projection)[Expand]
Inherited Methods
 From class java.lang.Object

Constants


public static final String DATA

Added in API level 1

The data stream for the thumbnail

Type: DATA STREAM

Constant Value: "_data"

public static final String DEFAULT_SORT_ORDER

Added in API level 1

The default sort order for this table

Constant Value: "image_id ASC"

public static final int FULL_SCREEN_KIND

Added in API level 1

Constant Value: 2 (0x00000002)

public static final String HEIGHT

Added in API level 1

The height of the thumbnail

Type: INTEGER (long)

Constant Value: "height"

public static final String IMAGE_ID

Added in API level 1

The original image for the thumbnal

Type: INTEGER (ID from Images table)

Constant Value: "image_id"

public static final String KIND

Added in API level 1

The kind of the thumbnail

Type: INTEGER (One of the values below)

Constant Value: "kind"

public static final int MICRO_KIND

Added in API level 1

Constant Value: 3 (0x00000003)

public static final int MINI_KIND

Added in API level 1

Constant Value: 1 (0x00000001)

public static final String THUMB_DATA

Added in API level 5

The blob raw data of thumbnail

Type: DATA STREAM

Constant Value: "thumb_data"

public static final String WIDTH

Added in API level 1

The width of the thumbnal

Type: INTEGER (long)

Constant Value: "width"

Fields


public static final Uri EXTERNAL_CONTENT_URI

Added in API level 1

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

public static final Uri INTERNAL_CONTENT_URI

Added in API level 1

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

Public Constructors


public MediaStore.Images.Thumbnails ()

Added in API level 1

Public Methods


public static void cancelThumbnailRequest (ContentResolver cr, long origId)

Added in API level 5

This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately. Only the original process which made the getThumbnail requests can cancel their own requests.

Parameters
crContentResolverorigIdoriginal image id

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

Added in API level 8

This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately. Only the original process which made the getThumbnail requests can cancel their own requests.

Parameters
crContentResolverorigIdoriginal image idgroupIdthe same groupId used in getThumbnail.

public static Uri getContentUri (String volumeName)

Added in API level 1

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

Parameters
volumeNamethe name of the volume to get the URI for
Returns
  • the URI to the image media table on the given volume

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

Added in API level 8

This method checks if the thumbnails of the specified image (origId) has been created. It will be blocked until the thumbnails are generated.

Parameters
crContentResolver used to dispatch queries to MediaProvider.origIdOriginal image id associated with thumbnail of interest.groupIdthe id of group to which this request belongskindThe type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND.optionsthis is only used for MINI_KIND when decoding the Bitmap
Returns
  • A Bitmap instance. It could be null if the original image associated with origId doesn't exist or memory is not enough.

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

Added in API level 5

This method checks if the thumbnails of the specified image (origId) has been created. It will be blocked until the thumbnails are generated.

Parameters
crContentResolver used to dispatch queries to MediaProvider.origIdOriginal image id associated with thumbnail of interest.kindThe type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND.optionsthis is only used for MINI_KIND when decoding the Bitmap
Returns
  • A Bitmap instance. It could be null if the original image associated with origId doesn't exist or memory is not enough.

public static final Cursor query (ContentResolver cr, Uri uri, String[] projection)

Added in API level 1

public static final Cursor queryMiniThumbnail (ContentResolver cr, long origId, int kind, String[]projection)

Added in API level 1

public static final Cursor queryMiniThumbnails (ContentResolver cr, Uri uri, int kind, String[]projection)

Added in API level 1

0 1
原创粉丝点击