Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/DocumentsContract.Document#constants) \| [Inherited Methods](https://developer.android.com/reference/android/provider/DocumentsContract.Document#inhmethods)

# DocumentsContract.Document

*** ** * ** ***

` public static final class DocumentsContract.Document `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.DocumentsContract.Document |

<br />

*** ** * ** ***

Constants related to a document, including `https://developer.android.com/reference/android/database/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 `https://developer.android.com/reference/android/provider/DocumentsContract.Document#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 ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS` Column indicating the synchronization state of the document's contents represented as a bitmask, `null` if not provided. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_DISPLAY_NAME` Display name of a document, used as the primary title displayed to a user. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_DOCUMENT_ID` Unique ID of a document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS` Flags that apply to a document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_ICON` Specific icon resource ID for a document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED` Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00.0 UTC. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` Concrete MIME type of a document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_ORIGINAL_RELATIVE_PATH` The relative path of the original location of a trashed document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_SIZE` Size of a document, in bytes, or `null` if unknown. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_SUMMARY` Summary of a document, which may be shown to a user. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE` Flag indicating that a document is a directory that wants to block itself from being selected when the user launches an `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT_TREE` intent. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_GRID` Flag indicating that a directory prefers its contents be shown in a larger format grid. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_LAST_MODIFIED` Flag indicating that a directory prefers its contents be sorted by `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED`. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_SUPPORTS_CREATE` Flag indicating that a document is a directory that supports creation of new files within it. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_PARTIAL` Flag indicating that a document is not complete, likely its contents are being downloaded. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_COPY` Flag indicating that a document can be copied to another location within the same document provider. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_DELETE` Flag indicating that a document is deletable. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_METADATA` Flag indicating that a document has available metadata that can be read using DocumentsContract#getDocumentMetadata |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_MOVE` Flag indicating that a document can be moved to another location within the same document provider. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_REMOVE` Flag indicating that a document can be removed from a parent. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RENAME` Flag indicating that a document can be renamed. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RESTORE` Flag indicating that a document can be restored. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SETTINGS` Flag indicating that a document has settings that can be configured by user. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SUBTREE_SEARCH` Flag indicating this document supports subtree searching. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_THUMBNAIL` Flag indicating that a document can be represented as a thumbnail. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_TRASH` Flag indicating that a document can be trashed. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_WRITE` Flag indicating that a document supports writing. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_VIRTUAL_DOCUMENT` Flag indicating that a document is virtual, and doesn't have byte representation in the MIME type specified as `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE`. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_WEB_LINKABLE` Flag indicating that a Web link can be obtained for the document. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR` MIME type of a document which is a directory that may contain additional documents. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY` Flag indicating that the document's contents are available locally. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_ERROR` Flag indicating that the last download attempt resulted in an error. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_PROGRESS` Flag indicating that a download of remote changes is currently in progress. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES` Flag indicating that the local version of the document has changes that require an upload. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_ERROR` Flag indicating that the last upload attempt resulted in an error. |
| `int` | `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_PROGRESS` Flag indicating that an upload of local changes is currently in progress. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### COLUMN_CONTENT_SYNC_STATE_FLAGS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_CONTENT_SYNC_STATE_FLAGS
```

Column indicating the synchronization state of the document's contents represented as a bitmask, `null` if not provided. This is an optional column. Type: Integer (int)

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_PROGRESS`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_PROGRESS`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_UPLOAD_ERROR`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_DOWNLOAD_ERROR`

Constant Value: "content_sync_state_flags"

### COLUMN_DISPLAY_NAME

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_DISPLAY_NAME
```

Display name of a document, used as the primary title displayed to a user. This column is required.

Type: STRING

<br />

Constant Value: "_display_name"

### COLUMN_DOCUMENT_ID

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_DOCUMENT_ID
```

Unique ID of a document. This ID is both provided by and interpreted by a `https://developer.android.com/reference/android/provider/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 `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT` and `https://developer.android.com/reference/android/content/Intent#ACTION_CREATE_DOCUMENT`.

Type: STRING

<br />

Constant Value: "document_id"

### COLUMN_FLAGS

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_FLAGS
```

Flags that apply to a document. This column is required.

Type: INTEGER (int)

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_GRID`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_PREFERS_LAST_MODIFIED`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_DIR_SUPPORTS_CREATE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_PARTIAL`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_COPY`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_DELETE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_METADATA`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_MOVE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_REMOVE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_RENAME`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_SETTINGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_THUMBNAIL`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_SUPPORTS_WRITE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_VIRTUAL_DOCUMENT`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#FLAG_WEB_LINKABLE`

Constant Value: "flags"

### COLUMN_ICON

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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 `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE`.

Type: INTEGER (int)

<br />

Constant Value: "icon"

### COLUMN_LAST_MODIFIED

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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 `https://developer.android.com/reference/android/provider/DocumentsProvider` can update this field using events from `https://developer.android.com/reference/android/os/ParcelFileDescriptor.OnCloseListener` or other reliable `https://developer.android.com/reference/android/os/ParcelFileDescriptor` transports.

Type: INTEGER (long)

<br />

**See also:**

- `https://developer.android.com/reference/java/lang/System#currentTimeMillis()`

Constant Value: "last_modified"

### COLUMN_MIME_TYPE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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 `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR` MIME type. This column is required.

Type: STRING

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`

Constant Value: "mime_type"

### COLUMN_ORIGINAL_RELATIVE_PATH

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_ORIGINAL_RELATIVE_PATH
```

The relative path of the original location of a trashed document. This column is only valid for trashed documents.

Type: STRING

<br />

Constant Value: "original_relative_path"

### COLUMN_SIZE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_SIZE
```

Size of a document, in bytes, or `null` if unknown. This column is required.

Type: INTEGER (long)

<br />

Constant Value: "_size"

### COLUMN_SUMMARY

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String COLUMN_SUMMARY
```

Summary of a document, which may be shown to a user. This column is optional, and may be `null`.

Type: STRING

<br />

Constant Value: "summary"

### FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE
```

Flag indicating that a document is a directory that wants to block itself from being selected when the user launches an `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT_TREE` intent. Individual files can still be selected when launched via other intents like `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT` and `https://developer.android.com/reference/android/content/Intent#ACTION_GET_CONTENT`. Only valid when `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` is `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`.

Note that this flag *only* applies to the single directory to which it is applied. It does *not* block the user from selecting either a parent or child directory during an `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT_TREE` request. In particular, the only way to guarantee that a specific directory can never be granted via an `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT_TREE` request is to ensure that both it and *all of its parent directories* have set this flag.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT_TREE`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`

Constant Value: 32768 (0x00008000)

### FLAG_DIR_PREFERS_GRID

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final 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 `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` is `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`

Constant Value: 16 (0x00000010)

### FLAG_DIR_PREFERS_LAST_MODIFIED

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_DIR_PREFERS_LAST_MODIFIED
```

Flag indicating that a directory prefers its contents be sorted by `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_LAST_MODIFIED`. Only valid when `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` is `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`

Constant Value: 32 (0x00000020)

### FLAG_DIR_SUPPORTS_CREATE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_DIR_SUPPORTS_CREATE
```

Flag indicating that a document is a directory that supports creation of new files within it. Only valid when `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` is `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#createDocument(java.lang.String,%20java.lang.String,%20java.lang.String)`

Constant Value: 8 (0x00000008)

### FLAG_PARTIAL

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_PARTIAL
```

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.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`

Constant Value: 8192 (0x00002000)

### FLAG_SUPPORTS_COPY

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_COPY
```

Flag indicating that a document can be copied to another location within the same document provider.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#copyDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#copyDocument(java.lang.String,%20java.lang.String)`

Constant Value: 128 (0x00000080)

### FLAG_SUPPORTS_DELETE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_DELETE
```

Flag indicating that a document is deletable.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#deleteDocument(android.content.ContentResolver,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#deleteDocument(java.lang.String)`

Constant Value: 4 (0x00000004)

### FLAG_SUPPORTS_METADATA

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_METADATA
```

Flag indicating that a document has available metadata that can be read using DocumentsContract#getDocumentMetadata

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#getDocumentMetadata(android.content.ContentResolver,%20android.net.Uri)`

Constant Value: 16384 (0x00004000)

### FLAG_SUPPORTS_MOVE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_MOVE
```

Flag indicating that a document can be moved to another location within the same document provider.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#moveDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#moveDocument(java.lang.String,%20java.lang.String,%20java.lang.String)`

Constant Value: 256 (0x00000100)

### FLAG_SUPPORTS_REMOVE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_REMOVE
```

Flag indicating that a document can be removed from a parent.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#removeDocument(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#removeDocument(java.lang.String,%20java.lang.String)`

Constant Value: 1024 (0x00000400)

### FLAG_SUPPORTS_RENAME

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_RENAME
```

Flag indicating that a document can be renamed.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#renameDocument(android.content.ContentResolver,%20android.net.Uri,%20java.lang.String)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#renameDocument(java.lang.String,%20java.lang.String)`

Constant Value: 64 (0x00000040)

### FLAG_SUPPORTS_RESTORE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_RESTORE
```

Flag indicating that a document can be restored. Only trashed documents can be restored

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#restoreDocumentFromTrash(android.content.ContentResolver,%20android.net.Uri,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#restoreDocumentFromTrash(java.lang.String,%20java.lang.String)`

Constant Value: 131072 (0x00020000)

### FLAG_SUPPORTS_SETTINGS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_SETTINGS
```

Flag indicating that a document has settings that can be configured by user.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#ACTION_DOCUMENT_SETTINGS`

Constant Value: 2048 (0x00000800)

### FLAG_SUPPORTS_SUBTREE_SEARCH

Added in [version 37.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int FLAG_SUPPORTS_SUBTREE_SEARCH
```

Flag indicating this document supports subtree searching.

When set, this directory acts as a valid starting point for searches restricted to its descendants. This flag is only valid when `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE` is `https://developer.android.com/reference/android/provider/DocumentsContract.Document#MIME_TYPE_DIR`.

When set, the system will call `https://developer.android.com/reference/android/provider/DocumentsProvider#querySearchDocuments(java.lang.String,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)` when a user initiates a search within this document.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#buildSearchDocumentsUri(android.net.Uri,%20java.lang.String)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#querySearchDocuments(java.lang.String,%20java.lang.String[],%20android.os.Bundle,%20android.os.CancellationSignal)`

Constant Value: 262144 (0x00040000)

### FLAG_SUPPORTS_THUMBNAIL

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_THUMBNAIL
```

Flag indicating that a document can be represented as a thumbnail.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#getDocumentThumbnail(android.content.ContentResolver,%20android.net.Uri,%20android.graphics.Point,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#openDocumentThumbnail(java.lang.String,%20android.graphics.Point,%20android.os.CancellationSignal)`

Constant Value: 1 (0x00000001)

### FLAG_SUPPORTS_TRASH

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_TRASH
```

Flag indicating that a document can be trashed.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract#trashDocument(android.content.ContentResolver,%20android.net.Uri)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#trashDocument(java.lang.String)`

Constant Value: 65536 (0x00010000)

### FLAG_SUPPORTS_WRITE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SUPPORTS_WRITE
```

Flag indicating that a document supports writing.

When a document is opened with `https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT`, the calling application is granted both `https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_READ_URI_PERMISSION` and `https://developer.android.com/reference/android/content/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 `https://developer.android.com/reference/android/content/ContentResolver#openOutputStream(android.net.Uri)` to succeed.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`

Constant Value: 2 (0x00000002)

### FLAG_VIRTUAL_DOCUMENT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_VIRTUAL_DOCUMENT
```

Flag indicating that a document is virtual, and doesn't have byte representation in the MIME type specified as `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE`.

*Virtual documents must have at least one alternative streamable format via `https://developer.android.com/reference/android/provider/DocumentsProvider#openTypedDocument(java.lang.String,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`*

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#openTypedDocument(java.lang.String,%20java.lang.String,%20android.os.Bundle,%20android.os.CancellationSignal)`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#getDocumentStreamTypes(java.lang.String,%20java.lang.String)`

Constant Value: 512 (0x00000200)

### FLAG_WEB_LINKABLE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_WEB_LINKABLE
```

Flag indicating that a Web link can be obtained for the document.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_FLAGS`
- `https://developer.android.com/reference/android/provider/DocumentsProvider#createWebLinkIntent(java.lang.String,%20android.os.Bundle)`

Constant Value: 4096 (0x00001000)

### MIME_TYPE_DIR

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String MIME_TYPE_DIR
```

MIME type of a document which is a directory that may contain additional documents.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_MIME_TYPE`

Constant Value: "vnd.android.document/directory"

### SYNC_STATE_FLAG_AVAILABLE_LOCALLY

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_AVAILABLE_LOCALLY
```

Flag indicating that the document's contents are available locally. When the device does not have internet connection, certain document operations may be disabled, see `https://developer.android.com/reference/android/provider/DocumentsContract.Root#FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE` for more details.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Root#FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE`

Constant Value: 1 (0x00000001)

### SYNC_STATE_FLAG_DOWNLOAD_ERROR

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_DOWNLOAD_ERROR
```

Flag indicating that the last download attempt resulted in an error.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS`

Constant Value: 32 (0x00000020)

### SYNC_STATE_FLAG_DOWNLOAD_PROGRESS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_DOWNLOAD_PROGRESS
```

Flag indicating that a download of remote changes is currently in progress.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS`

Constant Value: 8 (0x00000008)

### SYNC_STATE_FLAG_LOCAL_CHANGES

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_LOCAL_CHANGES
```

Flag indicating that the local version of the document has changes that require an upload. This flag is only meaningful if `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY` is also set.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS`

Constant Value: 2 (0x00000002)

### SYNC_STATE_FLAG_UPLOAD_ERROR

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_UPLOAD_ERROR
```

Flag indicating that the last upload attempt resulted in an error. This flag typically implies `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY` and `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES` are also set.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS`

Constant Value: 16 (0x00000010)

### SYNC_STATE_FLAG_UPLOAD_PROGRESS

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYNC_STATE_FLAG_UPLOAD_PROGRESS
```

Flag indicating that an upload of local changes is currently in progress. This flag typically implies `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_AVAILABLE_LOCALLY` and `https://developer.android.com/reference/android/provider/DocumentsContract.Document#SYNC_STATE_FLAG_LOCAL_CHANGES` are also set.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/DocumentsContract.Document#COLUMN_CONTENT_SYNC_STATE_FLAGS`

Constant Value: 4 (0x00000004)