Stay organized with collections
Save and categorize content based on your preferences.
Query
open class Query
This class may be used to filter download manager queries.
Summary
Public constructors
Public methods
setFilterById
open fun setFilterById(vararg ids: Long): DownloadManager.Query!
Include only the downloads with the given IDs.
setFilterByStatus
open fun setFilterByStatus(flags: Int): DownloadManager.Query!
Include only downloads with status matching any the given status flags.
Parameters |
flags |
Int: any combination of the STATUS_* bit flags |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DownloadManager.Query\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nQuery\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/DownloadManager.Query \"View this page in Java\") \n\n```\nopen class Query\n```\n\n|---|----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.DownloadManager.Query](#) |\n\nThis class may be used to filter download manager queries.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------|---|\n| [Query](#Query())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [DownloadManager.Query](#)! | [setFilterById](#setFilterById(kotlin.Long))`(`vararg` `ids:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Include only the downloads with the given IDs. |\n| open [DownloadManager.Query](#)! | [setFilterByStatus](#setFilterByStatus(kotlin.Int))`(`flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Include only downloads with status matching any the given status flags. |\n\nPublic constructors\n-------------------\n\n### Query\n\n```\nQuery()\n```\n\nPublic methods\n--------------\n\n### setFilterById\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun setFilterById(vararg ids: Long): DownloadManager.Query!\n```\n\nInclude only the downloads with the given IDs.\n\n| Return ||\n|-----------------------------|-------------|\n| [DownloadManager.Query](#)! | this object |\n\n### setFilterByStatus\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun setFilterByStatus(flags: Int): DownloadManager.Query!\n```\n\nInclude only downloads with status matching any the given status flags.\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------------------------|\n| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): any combination of the STATUS_\\* bit flags |\n\n| Return ||\n|-----------------------------|-------------|\n| [DownloadManager.Query](#)! | this object |"]]