public static final class DocumentsContract.Root extends Object
Cursor
column
names and flags. A root is the start of a tree of documents, such as a
physical storage device, or an account. Each root starts at the directory
referenced by COLUMN_DOCUMENT_ID
, which can recursively
contain both documents and directories.
All columns are read-only to client applications.
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_AVAILABLE_BYTES
Number of bytes available in this root.
|
static String |
COLUMN_CAPACITY_BYTES
Capacity of a root in bytes.
|
static String |
COLUMN_DOCUMENT_ID
Document which is a directory that represents the top directory of
this root.
|
static String |
COLUMN_FLAGS
Flags that apply to a root.
|
static String |
COLUMN_ICON
Icon resource ID for a root.
|
static String |
COLUMN_MIME_TYPES
MIME types supported by this root.
|
static String |
COLUMN_ROOT_ID
Unique ID of a root.
|
static String |
COLUMN_SUMMARY
Summary for this root, which may be shown to a user.
|
static String |
COLUMN_TITLE
Title for a root, which will be shown to a user.
|
static int |
FLAG_ADVANCED
Flag indicating that this root should only be visible to advanced
users.
|
static int |
FLAG_EMPTY
Flag indicating that this root is currently empty.
|
static int |
FLAG_HAS_SETTINGS
Flag indicating that this root has settings.
|
static int |
FLAG_LOCAL_ONLY
Flag indicating that this root offers content that is strictly local
on the device.
|
static int |
FLAG_REMOVABLE_SD
Flag indicating that this root is on removable SD card storage.
|
static int |
FLAG_REMOVABLE_USB
Flag indicating that this root is on removable USB storage.
|
static int |
FLAG_SUPPORTS_CREATE
Flag indicating that at least one directory under this root supports
creating content.
|
static int |
FLAG_SUPPORTS_IS_CHILD
Flag indicating that this root supports testing parent child
relationships.
|
static int |
FLAG_SUPPORTS_RECENTS
Flag indicating that this root can be queried to provide recently
modified documents.
|
static int |
FLAG_SUPPORTS_SEARCH
Flag indicating that this root supports search.
|
static String |
MIME_TYPE_ITEM |
public static final String COLUMN_ROOT_ID
DocumentsProvider
, and should be treated as an opaque value
by client applications. This column is required.
Type: STRING
public static final String COLUMN_FLAGS
Type: INTEGER (int)
public static final String COLUMN_ICON
Type: INTEGER (int)
public static final String COLUMN_TITLE
Type: STRING
public static final String COLUMN_SUMMARY
null
. For a single storage service
surfacing multiple accounts as different roots, this summary should
be the name of the account.
Type: STRING
public static final String COLUMN_DOCUMENT_ID
Type: STRING
public static final String COLUMN_AVAILABLE_BYTES
null
if unknown or unbounded.
Type: INTEGER (long)
public static final String COLUMN_CAPACITY_BYTES
null
if unknown or unbounded.
Type: INTEGER (long)
public static final String COLUMN_MIME_TYPES
null
the root is assumed to support all MIME types. Multiple
MIME types can be separated by a newline. For example, a root
supporting audio might return "audio/*\napplication/x-flac".
Type: STRING
public static final String MIME_TYPE_ITEM
public static final int FLAG_SUPPORTS_CREATE
Intent.ACTION_CREATE_DOCUMENT
.COLUMN_FLAGS
,
Constant Field Valuespublic static final int FLAG_LOCAL_ONLY
COLUMN_FLAGS
,
Intent.EXTRA_LOCAL_ONLY
,
Constant Field Valuespublic static final int FLAG_SUPPORTS_RECENTS
public static final int FLAG_SUPPORTS_SEARCH
public static final int FLAG_SUPPORTS_IS_CHILD
public static final int FLAG_EMPTY
FLAG_SUPPORTS_CREATE
is
also set. If the value of this flag changes, such as when a root
becomes non-empty, you must send a content changed notification for
DocumentsContract.buildRootsUri(String)
.public static final int FLAG_ADVANCED
COLUMN_FLAGS
,
Constant Field Valuespublic static final int FLAG_HAS_SETTINGS
public static final int FLAG_REMOVABLE_SD
COLUMN_FLAGS
,
Constant Field Valuespublic static final int FLAG_REMOVABLE_USB
COLUMN_FLAGS
,
Constant Field Values