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.
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 null if unknown.
|
|||||||||
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
COLUMN_LAST_MODIFIED .
|
|||||||||
int | FLAG_DIR_SUPPORTS_CREATE | Flag indicating that a document is a directory that supports creation of new files within it. | |||||||||
int | FLAG_SUPPORTS_DELETE | Flag indicating that a document is deletable. | |||||||||
int | FLAG_SUPPORTS_RENAME | Flag indicating that a document can be renamed. | |||||||||
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. | |||||||||
String | MIME_TYPE_DIR | MIME type of a document which is a directory that may contain additional documents. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Display name of a document, used as the primary title displayed to a user. This column is required.
Type: STRING
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
Flags that apply to a document. This column is required.
Type: INTEGER (int)
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)
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)
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
Size of a document, in bytes, or null
if unknown. This column
is required.
Type: INTEGER (long)
Summary of a document, which may be shown to a user. This column is
optional, and may be null
.
Type: STRING
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
.
Flag indicating that a directory prefers its contents be sorted by
COLUMN_LAST_MODIFIED
. Only valid when
COLUMN_MIME_TYPE
is MIME_TYPE_DIR
.
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
.
Flag indicating that a document is deletable.
Flag indicating that a document can be renamed.
Flag indicating that a document can be represented as a thumbnail.
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.
MIME type of a document which is a directory that may contain additional documents.