public static class DownloadManager.Query extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ORDER_ASCENDING
Constant for use with
orderBy(java.lang.String, int) |
static int |
ORDER_DESCENDING
Constant for use with
orderBy(java.lang.String, int) |
Constructor and Description |
---|
Query() |
Modifier and Type | Method and Description |
---|---|
DownloadManager.Query |
orderBy(String column,
int direction)
Change the sort order of the returned Cursor.
|
DownloadManager.Query |
setFilterById(long... ids)
Include only the downloads with the given IDs.
|
DownloadManager.Query |
setFilterByStatus(int flags)
Include only downloads with status matching any the given status flags.
|
DownloadManager.Query |
setOnlyIncludeVisibleInDownloadsUi(boolean value)
Controls whether this query includes downloads not visible in the system's Downloads UI.
|
public static final int ORDER_ASCENDING
orderBy(java.lang.String, int)
public static final int ORDER_DESCENDING
orderBy(java.lang.String, int)
public DownloadManager.Query setFilterById(long... ids)
public DownloadManager.Query setFilterByStatus(int flags)
flags
- any combination of the STATUS_* bit flagspublic DownloadManager.Query setOnlyIncludeVisibleInDownloadsUi(boolean value)
value
- if true, this query will only include downloads that should be displayed in
the system's Downloads UI; if false (the default), this query will include
both visible and invisible downloads.public DownloadManager.Query orderBy(String column, int direction)
column
- one of the COLUMN_* constants; currently, only
DownloadManager.COLUMN_LAST_MODIFIED_TIMESTAMP
and DownloadManager.COLUMN_TOTAL_SIZE_BYTES
are
supported.direction
- either ORDER_ASCENDING
or ORDER_DESCENDING