/**@class android.provider.DocumentsContract.Document @extends java.lang.Object Constants related to a document, including {@link Cursor} column names and flags. <p> A document can be either an openable stream (with a specific MIME type), or a directory containing additional documents (with the {@link #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. <p> All columns are <em>read-only</em> to client applications. */ var Document = { /** Unique ID of a document. This ID is both provided by and interpreted by a {@link android.provider.DocumentsContract.DocumentsProvider}, and should be treated as an opaque value by client applications. This column is required. <p> Each document must have a unique ID within a provider, but that single document may be included as a child of multiple directories. <p> A provider must always return durable IDs, since they will be used to issue long-term URI permission grants when an application interacts with {@link Intent#ACTION_OPEN_DOCUMENT} and {@link Intent#ACTION_CREATE_DOCUMENT}. <p> Type: STRING */ COLUMN_DOCUMENT_ID : "document_id", /** 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 {@link #MIME_TYPE_DIR} MIME type. This column is required. <p> Type: STRING @see #MIME_TYPE_DIR */ COLUMN_MIME_TYPE : "mime_type", /** Display name of a document, used as the primary title displayed to a user. This column is required. <p> Type: STRING */ COLUMN_DISPLAY_NAME : "_display_name", /** Summary of a document, which may be shown to a user. This column is optional, and may be {@code null}. <p> Type: STRING */ COLUMN_SUMMARY : "summary", /** 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 {@code null} if unknown. A {@link android.provider.DocumentsContract.DocumentsProvider} can update this field using events from {@link OnCloseListener} or other reliable {@link ParcelFileDescriptor} transports. <p> Type: INTEGER (long) @see System#currentTimeMillis() */ COLUMN_LAST_MODIFIED : "last_modified", /** Specific icon resource ID for a document. This column is optional, and may be {@code null} to use a platform-provided default icon based on {@link #COLUMN_MIME_TYPE}. <p> Type: INTEGER (int) */ COLUMN_ICON : "icon", /** Flags that apply to a document. This column is required. <p> Type: INTEGER (int) @see #FLAG_SUPPORTS_WRITE @see #FLAG_SUPPORTS_DELETE @see #FLAG_SUPPORTS_THUMBNAIL @see #FLAG_DIR_PREFERS_GRID @see #FLAG_DIR_PREFERS_LAST_MODIFIED @see #FLAG_VIRTUAL_DOCUMENT @see #FLAG_SUPPORTS_COPY @see #FLAG_SUPPORTS_MOVE @see #FLAG_SUPPORTS_REMOVE */ COLUMN_FLAGS : "flags", /** Size of a document, in bytes, or {@code null} if unknown. This column is required. <p> Type: INTEGER (long) */ COLUMN_SIZE : "_size", /** MIME type of a document which is a directory that may contain additional documents. @see #COLUMN_MIME_TYPE */ MIME_TYPE_DIR : "vnd.android.document/directory", /** Flag indicating that a document can be represented as a thumbnail. @see #COLUMN_FLAGS @see DocumentsContract#getDocumentThumbnail(ContentInterface, Uri, Point, CancellationSignal) @see DocumentsProvider#openDocumentThumbnail(String, Point, android.os.CancellationSignal) */ FLAG_SUPPORTS_THUMBNAIL : "1", /** Flag indicating that a document supports writing. <p> When a document is opened with {@link Intent#ACTION_OPEN_DOCUMENT}, the calling application is granted both {@link Intent#FLAG_GRANT_READ_URI_PERMISSION} and {@link Intent#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 {@link ContentResolver#openOutputStream(Uri)} to succeed. @see #COLUMN_FLAGS */ FLAG_SUPPORTS_WRITE : "2", /** Flag indicating that a document is deletable. @see #COLUMN_FLAGS @see DocumentsContract#deleteDocument(ContentInterface, Uri) @see DocumentsProvider#deleteDocument(String) */ FLAG_SUPPORTS_DELETE : "4", /** Flag indicating that a document is a directory that supports creation of new files within it. Only valid when {@link #COLUMN_MIME_TYPE} is {@link #MIME_TYPE_DIR}. @see #COLUMN_FLAGS @see DocumentsProvider#createDocument(String, String, String) */ FLAG_DIR_SUPPORTS_CREATE : "8", /** 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 {@link #COLUMN_MIME_TYPE} is {@link #MIME_TYPE_DIR}. @see #COLUMN_FLAGS */ FLAG_DIR_PREFERS_GRID : "16", /** Flag indicating that a directory prefers its contents be sorted by {@link #COLUMN_LAST_MODIFIED}. Only valid when {@link #COLUMN_MIME_TYPE} is {@link #MIME_TYPE_DIR}. @see #COLUMN_FLAGS */ FLAG_DIR_PREFERS_LAST_MODIFIED : "32", /** Flag indicating that a document can be renamed. @see #COLUMN_FLAGS @see DocumentsContract#renameDocument(ContentInterface, Uri, String) @see DocumentsProvider#renameDocument(String, String) */ FLAG_SUPPORTS_RENAME : "64", /** Flag indicating that a document can be copied to another location within the same document provider. @see #COLUMN_FLAGS @see DocumentsContract#copyDocument(ContentInterface, Uri, Uri) @see DocumentsProvider#copyDocument(String, String) */ FLAG_SUPPORTS_COPY : "128", /** Flag indicating that a document can be moved to another location within the same document provider. @see #COLUMN_FLAGS @see DocumentsContract#moveDocument(ContentInterface, Uri, Uri, Uri) @see DocumentsProvider#moveDocument(String, String, String) */ FLAG_SUPPORTS_MOVE : "256", /** Flag indicating that a document is virtual, and doesn't have byte representation in the MIME type specified as {@link #COLUMN_MIME_TYPE}. <p><em>Virtual documents must have at least one alternative streamable format via {@link android.provider.DocumentsContract.DocumentsProvider#openTypedandroid.provider.DocumentsContract.Document}</em> @see #COLUMN_FLAGS @see #COLUMN_MIME_TYPE @see DocumentsProvider#openTypedDocument(String, String, Bundle, android.os.CancellationSignal) @see DocumentsProvider#getDocumentStreamTypes(String, String) */ FLAG_VIRTUAL_DOCUMENT : "512", /** Flag indicating that a document can be removed from a parent. @see #COLUMN_FLAGS @see DocumentsContract#removeDocument(ContentInterface, Uri, Uri) @see DocumentsProvider#removeDocument(String, String) */ FLAG_SUPPORTS_REMOVE : "1024", /** Flag indicating that a document has settings that can be configured by user. @see #COLUMN_FLAGS @see #ACTION_DOCUMENT_SETTINGS */ FLAG_SUPPORTS_SETTINGS : "2048", /** Flag indicating that a Web link can be obtained for the document. @see #COLUMN_FLAGS @see DocumentsProvider#createWebLinkIntent(String, Bundle) */ FLAG_WEB_LINKABLE : "4096", /** Flag indicating that a document is not complete, likely its contents are being downloaded. Partial files cannot be opened, copied, moved in the UI. But they can be deleted and retried if they represent a failed download. @see #COLUMN_FLAGS */ FLAG_PARTIAL : "8192", /** Flag indicating that a document has available metadata that can be read using DocumentsContract#getDocumentMetadata @see #COLUMN_FLAGS @see DocumentsContract#getDocumentMetadata(ContentInterface, Uri) */ FLAG_SUPPORTS_METADATA : "16384", };