DocumentsContract.Document
public
static
final
class
DocumentsContract.Document
extends Object
| java.lang.Object | |
| ↳ | android.provider.DocumentsContract.Document |
Constants related to a document, including Cursor column names
and flags.
A document can be either an openable stream (with a specific MIME type),
or a directory containing additional documents (with the
MIME_TYPE_DIR MIME type). A directory represents the top of a
subtree containing zero or more documents, which can recursively contain
even more documents and directories.
All columns are read-only to client applications.
Summary
Constants | |
|---|---|
String |
COLUMN_DISPLAY_NAME
Display name of a document, used as the primary title displayed to a user. |
String |
COLUMN_DOCUMENT_ID
Unique ID of a document. |
String |
COLUMN_FLAGS
Flags that apply to a document. |
String |
COLUMN_ICON
Specific icon resource ID for a document. |
String |
COLUMN_LAST_MODIFIED
Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00.0 UTC. |
String |
COLUMN_MIME_TYPE
Concrete MIME type of a document. |
String |
COLUMN_SIZE
Size of a document, in bytes, or |
String |
COLUMN_SUMMARY
Summary of a document, which may be shown to a user. |
int |
FLAG_DIR_PREFERS_GRID
Flag indicating that a directory prefers its contents be shown in a larger format grid. |
int |
FLAG_DIR_PREFERS_LAST_MODIFIED
Flag indicating that a directory prefers its contents be sorted by
|
int |
FLAG_DIR_SUPPORTS_CREATE
Flag indicating that a document is a directory that supports creation of new files within it. |
int |
FLAG_SUPPORTS_COPY
Flag indicating that a document can be copied to another location within the same document provider. |
int |
FLAG_SUPPORTS_DELETE
Flag indicating that a document is deletable. |
int |
FLAG_SUPPORTS_MOVE
Flag indicating that a document can be moved to another location within the same document provider. |
int |
FLAG_SUPPORTS_REMOVE
Flag indicating that a document can be removed from a parent. |
int |
FLAG_SUPPORTS_RENAME
Flag indicating that a document can be renamed. |
int |
FLAG_SUPPORTS_SETTINGS
Flag indicating that a document has settings that can be configured by user. |
int |
FLAG_SUPPORTS_THUMBNAIL
Flag indicating that a document can be represented as a thumbnail. |
int |
FLAG_SUPPORTS_WRITE
Flag indicating that a document supports writing. |
int |
FLAG_VIRTUAL_DOCUMENT
Flag indicating that a document is virtual, and doesn't have byte
representation in the MIME type specified as |
int |
FLAG_WEB_LINKABLE
Flag indicating that a Web link can be obtained for the document. |
String |
MIME_TYPE_DIR
MIME type of a document which is a directory that may contain additional documents. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Constants
COLUMN_DISPLAY_NAME
String COLUMN_DISPLAY_NAME
Display name of a document, used as the primary title displayed to a user. This column is required.
Type: STRING
Constant Value: "_display_name"
COLUMN_DOCUMENT_ID
String COLUMN_DOCUMENT_ID
Unique ID of a document. This ID is both provided by and interpreted
by a DocumentsProvider, and should be treated as an opaque
value by client applications. This column is required.
Each document must have a unique ID within a provider, but that single document may be included as a child of multiple directories.
A provider must always return durable IDs, since they will be used to
issue long-term URI permission grants when an application interacts
with ACTION_OPEN_DOCUMENT and
ACTION_CREATE_DOCUMENT.
Type: STRING
Constant Value: "document_id"
COLUMN_FLAGS
String COLUMN_FLAGS
Flags that apply to a document. This column is required.
Type: INTEGER (int)
See also:
Constant Value: "flags"
COLUMN_ICON
String COLUMN_ICON
Specific icon resource ID for a document. This column is optional,
and may be null to use a platform-provided default icon based
on COLUMN_MIME_TYPE.
Type: INTEGER (int)
Constant Value: "icon"
COLUMN_LAST_MODIFIED
String COLUMN_LAST_MODIFIED
Timestamp when a document was last modified, in milliseconds since
January 1, 1970 00:00:00.0 UTC. This column is required, and may be
null if unknown. A DocumentsProvider can update this
field using events from ParcelFileDescriptor.OnCloseListener or other reliable
ParcelFileDescriptor transports.
Type: INTEGER (long)
See also:
Constant Value: "last_modified"
COLUMN_MIME_TYPE
String COLUMN_MIME_TYPE
Concrete MIME type of a document. For example, "image/png" or
"application/pdf" for openable files. A document can also be a
directory containing additional documents, which is represented with
the MIME_TYPE_DIR MIME type. This column is required.
Type: STRING
See also:
Constant Value: "mime_type"
COLUMN_SIZE
String COLUMN_SIZE
Size of a document, in bytes, or null if unknown. This column
is required.
Type: INTEGER (long)
Constant Value: "_size"
COLUMN_SUMMARY
String COLUMN_SUMMARY
Summary of a document, which may be shown to a user. This column is
optional, and may be null.
Type: STRING
Constant Value: "summary"
FLAG_DIR_PREFERS_GRID
int FLAG_DIR_PREFERS_GRID
Flag indicating that a directory prefers its contents be shown in a
larger format grid. Usually suitable when a directory contains mostly
pictures. Only valid when COLUMN_MIME_TYPE is
MIME_TYPE_DIR.
See also:
Constant Value: 16 (0x00000010)
FLAG_DIR_PREFERS_LAST_MODIFIED
int FLAG_DIR_PREFERS_LAST_MODIFIED
Flag indicating that a directory prefers its contents be sorted by
COLUMN_LAST_MODIFIED. Only valid when
COLUMN_MIME_TYPE is MIME_TYPE_DIR.
See also:
Constant Value: 32 (0x00000020)
FLAG_DIR_SUPPORTS_CREATE
int FLAG_DIR_SUPPORTS_CREATE
Flag indicating that a document is a directory that supports creation
of new files within it. Only valid when COLUMN_MIME_TYPE is
MIME_TYPE_DIR.
Constant Value: 8 (0x00000008)
FLAG_SUPPORTS_COPY
int FLAG_SUPPORTS_COPY
Flag indicating that a document can be copied to another location within the same document provider.
Constant Value: 128 (0x00000080)
FLAG_SUPPORTS_DELETE
int FLAG_SUPPORTS_DELETE
Flag indicating that a document is deletable.
Constant Value: 4 (0x00000004)
FLAG_SUPPORTS_MOVE
int FLAG_SUPPORTS_MOVE
Flag indicating that a document can be moved to another location within the same document provider.
See also:
Constant Value: 256 (0x00000100)
FLAG_SUPPORTS_REMOVE
int FLAG_SUPPORTS_REMOVE
Flag indicating that a document can be removed from a parent.
Constant Value: 1024 (0x00000400)
FLAG_SUPPORTS_RENAME
int FLAG_SUPPORTS_RENAME
Flag indicating that a document can be renamed.
Constant Value: 64 (0x00000040)
FLAG_SUPPORTS_SETTINGS
int FLAG_SUPPORTS_SETTINGS
Flag indicating that a document has settings that can be configured by user.
See also:
Constant Value: 2048 (0x00000800)
FLAG_SUPPORTS_THUMBNAIL
int FLAG_SUPPORTS_THUMBNAIL
Flag indicating that a document can be represented as a thumbnail.
See also:
Constant Value: 1 (0x00000001)
FLAG_SUPPORTS_WRITE
int FLAG_SUPPORTS_WRITE
Flag indicating that a document supports writing.
When a document is opened with ACTION_OPEN_DOCUMENT,
the calling application is granted both
FLAG_GRANT_READ_URI_PERMISSION and
FLAG_GRANT_WRITE_URI_PERMISSION. However, the actual
writability of a document may change over time, for example due to
remote access changes. This flag indicates that a document client can
expect openOutputStream(Uri) to succeed.
See also:
Constant Value: 2 (0x00000002)
FLAG_VIRTUAL_DOCUMENT
int FLAG_VIRTUAL_DOCUMENT
Flag indicating that a document is virtual, and doesn't have byte
representation in the MIME type specified as COLUMN_MIME_TYPE.
Virtual documents must have at least one alternative streamable
format via openTypedDocument(String, String, Bundle, CancellationSignal)
See also:
Constant Value: 512 (0x00000200)
FLAG_WEB_LINKABLE
int FLAG_WEB_LINKABLE
Flag indicating that a Web link can be obtained for the document.
Constant Value: 4096 (0x00001000)
MIME_TYPE_DIR
String MIME_TYPE_DIR
MIME type of a document which is a directory that may contain additional documents.
See also:
Constant Value: "vnd.android.document/directory"
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