MediaStore.Images.Thumbnails
public
static
class
MediaStore.Images.Thumbnails
extends Object
implements
BaseColumns
| java.lang.Object | |
| ↳ | android.provider.MediaStore.Images.Thumbnails |
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
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 Type: INTEGER (long) |
String |
IMAGE_ID
The original image for the thumbnal Type: INTEGER (ID from Images table) |
String |
KIND
The kind of the thumbnail Type: INTEGER (One of the values below) |
int |
MICRO_KIND
|
int |
MINI_KIND
|
String |
THUMB_DATA
The blob raw data of thumbnail Type: DATA STREAM |
String |
WIDTH
The width of the thumbnal Type: INTEGER (long) |
Inherited constants |
|---|
android.provider.BaseColumns
|
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 | |
|---|---|
MediaStore.Images.Thumbnails()
|
|
Public methods | |
|---|---|
static
void
|
cancelThumbnailRequest(ContentResolver cr, long origId)
This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately. |
static
void
|
cancelThumbnailRequest(ContentResolver cr, long origId, long groupId)
This method cancels the thumbnail request so clients waiting for getThumbnail will be interrupted and return immediately. |
static
Uri
|
getContentUri(String volumeName)
Get the content:// style URI for the image media table on the given volume. |
static
Bitmap
|
getThumbnail(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
Bitmap
|
getThumbnail(ContentResolver cr, long origId, int kind, BitmapFactory.Options options)
This method checks if the thumbnails of the specified image (origId) has been created. |
static
final
Cursor
|
query(ContentResolver cr, Uri uri, String[] projection)
|
static
final
Cursor
|
queryMiniThumbnail(ContentResolver cr, long origId, int kind, String[] projection)
|
static
final
Cursor
|
queryMiniThumbnails(ContentResolver cr, Uri uri, int kind, String[] projection)
|
Inherited methods | |
|---|---|
java.lang.Object
| |
Constants
DATA
String DATA
Path to the thumbnail file on disk.
Note that apps may not have filesystem permissions to directly
access this path. Instead of trying to open this path directly,
apps should use
openFileDescriptor(Uri, String) to gain
access.
Type: TEXT
Constant Value: "_data"
DEFAULT_SORT_ORDER
String DEFAULT_SORT_ORDER
The default sort order for this table
Constant Value: "image_id ASC"
HEIGHT
String HEIGHT
The height of the thumbnail
Type: INTEGER (long)
Constant Value: "height"
IMAGE_ID
String IMAGE_ID
The original image for the thumbnal
Type: INTEGER (ID from Images table)
Constant Value: "image_id"
KIND
String KIND
The kind of the thumbnail
Type: INTEGER (One of the values below)
Constant Value: "kind"
THUMB_DATA
String THUMB_DATA
The blob raw data of thumbnail
Type: DATA STREAM
Constant Value: "thumb_data"
WIDTH
String WIDTH
The width of the thumbnal
Type: INTEGER (long)
Constant Value: "width"
Fields
EXTERNAL_CONTENT_URI
Uri EXTERNAL_CONTENT_URI
The content:// style URI for the "primary" external storage volume.
INTERNAL_CONTENT_URI
Uri INTERNAL_CONTENT_URI
The content:// style URI for the internal storage.
Public constructors
Public methods
cancelThumbnailRequest
void cancelThumbnailRequest (ContentResolver cr, long origId)
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 | |
|---|---|
cr |
ContentResolver: ContentResolver |
origId |
long: original image id
|
cancelThumbnailRequest
void cancelThumbnailRequest (ContentResolver cr, long origId, long groupId)
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 | |
|---|---|
cr |
ContentResolver: ContentResolver |
origId |
long: original image id |
groupId |
long: the same groupId used in getThumbnail.
|
getContentUri
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 |
getThumbnail
Bitmap getThumbnail (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. It will be blocked until the thumbnails are generated.
| 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
Bitmap getThumbnail (ContentResolver cr, long origId, int kind, BitmapFactory.Options options)
This method checks if the thumbnails of the specified image (origId) has been created. It will be blocked until the thumbnails are generated.
| 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. |
query
Cursor query (ContentResolver cr, Uri uri, String[] projection)
| Parameters | |
|---|---|
cr |
ContentResolver |
uri |
Uri |
projection |
String |
| Returns | |
|---|---|
Cursor |
|
queryMiniThumbnail
Cursor queryMiniThumbnail (ContentResolver cr, long origId, int kind, String[] projection)
| Parameters | |
|---|---|
cr |
ContentResolver |
origId |
long |
kind |
int |
projection |
String |
| Returns | |
|---|---|
Cursor |
|
queryMiniThumbnails
Cursor queryMiniThumbnails (ContentResolver cr, Uri uri, int kind, String[] projection)
| Parameters | |
|---|---|
cr |
ContentResolver |
uri |
Uri |
kind |
int |
projection |
String |
| Returns | |
|---|---|
Cursor |
|
Interfaces
- BaseColumns
- CalendarContract.AttendeesColumns
- CalendarContract.CalendarAlertsColumns
- CalendarContract.CalendarCacheColumns
- CalendarContract.CalendarColumns
- CalendarContract.CalendarSyncColumns
- CalendarContract.ColorsColumns
- CalendarContract.EventDaysColumns
- CalendarContract.EventsColumns
- CalendarContract.ExtendedPropertiesColumns
- CalendarContract.RemindersColumns
- CalendarContract.SyncColumns
- Contacts.ContactMethodsColumns
- Contacts.ExtensionsColumns
- Contacts.GroupsColumns
- Contacts.OrganizationColumns
- Contacts.PeopleColumns
- Contacts.PhonesColumns
- Contacts.PhotosColumns
- Contacts.PresenceColumns
- Contacts.SettingsColumns
- ContactsContract.BaseSyncColumns
- ContactsContract.CommonDataKinds.BaseTypes
- ContactsContract.CommonDataKinds.CommonColumns
- ContactsContract.ContactNameColumns
- ContactsContract.ContactOptionsColumns
- ContactsContract.ContactsColumns
- ContactsContract.ContactStatusColumns
- ContactsContract.DataColumns
- ContactsContract.DataColumnsWithJoins
- ContactsContract.DataUsageStatColumns
- ContactsContract.DeletedContactsColumns
- ContactsContract.DisplayNameSources
- ContactsContract.FullNameStyle
- ContactsContract.GroupsColumns
- ContactsContract.PhoneLookupColumns
- ContactsContract.PhoneticNameStyle
- ContactsContract.PresenceColumns
- ContactsContract.RawContactsColumns
- ContactsContract.SettingsColumns
- ContactsContract.StatusColumns
- ContactsContract.SyncColumns
- MediaStore.Audio.AlbumColumns
- MediaStore.Audio.ArtistColumns
- MediaStore.Audio.AudioColumns
- MediaStore.Audio.GenresColumns
- MediaStore.Audio.PlaylistsColumns
- MediaStore.Files.FileColumns
- MediaStore.Images.ImageColumns
- MediaStore.MediaColumns
- MediaStore.Video.VideoColumns
- OpenableColumns
- SyncStateContract.Columns
- Telephony.BaseMmsColumns
- Telephony.CanonicalAddressesColumns
- Telephony.TextBasedSmsColumns
- Telephony.ThreadsColumns
Classes
- AlarmClock
- BlockedNumberContract
- BlockedNumberContract.BlockedNumbers
- Browser
- CalendarContract
- CalendarContract.Attendees
- CalendarContract.CalendarAlerts
- CalendarContract.CalendarCache
- CalendarContract.CalendarEntity
- CalendarContract.Calendars
- CalendarContract.Colors
- CalendarContract.EventDays
- CalendarContract.Events
- CalendarContract.EventsEntity
- CalendarContract.ExtendedProperties
- CalendarContract.Instances
- CalendarContract.Reminders
- CalendarContract.SyncState
- CallLog
- CallLog.Calls
- Contacts
- Contacts.ContactMethods
- Contacts.Extensions
- Contacts.GroupMembership
- Contacts.Groups
- Contacts.Intents
- Contacts.Intents.Insert
- Contacts.Intents.UI
- Contacts.Organizations
- Contacts.People
- Contacts.People.ContactMethods
- Contacts.People.Extensions
- Contacts.People.Phones
- Contacts.Phones
- Contacts.Photos
- Contacts.Settings
- ContactsContract
- ContactsContract.AggregationExceptions
- ContactsContract.CommonDataKinds
- ContactsContract.CommonDataKinds.Callable
- ContactsContract.CommonDataKinds.Contactables
- ContactsContract.CommonDataKinds.Email
- ContactsContract.CommonDataKinds.Event
- ContactsContract.CommonDataKinds.GroupMembership
- ContactsContract.CommonDataKinds.Identity
- ContactsContract.CommonDataKinds.Im
- ContactsContract.CommonDataKinds.Nickname
- ContactsContract.CommonDataKinds.Note
- ContactsContract.CommonDataKinds.Organization
- ContactsContract.CommonDataKinds.Phone
- ContactsContract.CommonDataKinds.Photo
- ContactsContract.CommonDataKinds.Relation
- ContactsContract.CommonDataKinds.SipAddress
- ContactsContract.CommonDataKinds.StructuredName
- ContactsContract.CommonDataKinds.StructuredPostal
- ContactsContract.CommonDataKinds.Website
- ContactsContract.Contacts
- ContactsContract.Contacts.AggregationSuggestions
- ContactsContract.Contacts.AggregationSuggestions.Builder
- ContactsContract.Contacts.Data
- ContactsContract.Contacts.Entity
- ContactsContract.Contacts.Photo
- ContactsContract.Data
- ContactsContract.DataUsageFeedback
- ContactsContract.DeletedContacts
- ContactsContract.Directory
- ContactsContract.DisplayPhoto
- ContactsContract.Groups
- ContactsContract.Intents
- ContactsContract.Intents.Insert
- ContactsContract.PhoneLookup
- ContactsContract.PinnedPositions
- ContactsContract.Presence
- ContactsContract.Profile
- ContactsContract.ProfileSyncState
- ContactsContract.ProviderStatus
- ContactsContract.QuickContact
- ContactsContract.RawContacts
- ContactsContract.RawContacts.Data
- ContactsContract.RawContacts.DisplayPhoto
- ContactsContract.RawContacts.Entity
- ContactsContract.RawContactsEntity
- ContactsContract.SearchSnippets
- ContactsContract.Settings
- ContactsContract.StatusUpdates
- ContactsContract.SyncState
- DocumentsContract
- DocumentsContract.Document
- DocumentsContract.Path
- DocumentsContract.Root
- DocumentsProvider
- FontRequest
- FontsContract
- FontsContract.Columns
- FontsContract.FontFamilyResult
- FontsContract.FontInfo
- FontsContract.FontRequestCallback
- LiveFolders
- MediaStore
- MediaStore.Audio
- MediaStore.Audio.Albums
- MediaStore.Audio.Artists
- MediaStore.Audio.Artists.Albums
- MediaStore.Audio.Genres
- MediaStore.Audio.Genres.Members
- MediaStore.Audio.Media
- MediaStore.Audio.Playlists
- MediaStore.Audio.Playlists.Members
- MediaStore.Audio.Radio
- MediaStore.Files
- MediaStore.Images
- MediaStore.Images.Media
- MediaStore.Images.Thumbnails
- MediaStore.Video
- MediaStore.Video.Media
- MediaStore.Video.Thumbnails
- SearchRecentSuggestions
- Settings
- Settings.Global
- Settings.NameValueTable
- Settings.Secure
- Settings.System
- SyncStateContract
- SyncStateContract.Constants
- SyncStateContract.Helpers
- Telephony
- Telephony.Carriers
- Telephony.Mms
- Telephony.Mms.Addr
- Telephony.Mms.Draft
- Telephony.Mms.Inbox
- Telephony.Mms.Intents
- Telephony.Mms.Outbox
- Telephony.Mms.Part
- Telephony.Mms.Rate
- Telephony.Mms.Sent
- Telephony.MmsSms
- Telephony.MmsSms.PendingMessages
- Telephony.ServiceStateTable
- Telephony.Sms
- Telephony.Sms.Conversations
- Telephony.Sms.Draft
- Telephony.Sms.Inbox
- Telephony.Sms.Intents
- Telephony.Sms.Outbox
- Telephony.Sms.Sent
- Telephony.Threads
- UserDictionary
- UserDictionary.Words
- VoicemailContract
- VoicemailContract.Status
- VoicemailContract.Voicemails
Exceptions


