I am using DownloadManager.Query to create a query in order to filter out the files in the DownloadManager in Android.
I am doing a:
DownloadManager.Query query = null;
downloadManager = (DownloadManager)getSystemService(DOWNLOAD_SERVICE);
query = new DownloadManager.Query();
query.setFilterByStatus(DownloadManager.STATUS_FAILED);
I was wondering if I could filter out not just ‘FAILED’ downloads but also ‘PENDING’ and ‘RUNNING’, using the same query?
You can achieve this by combining the status flags:
The Android Javadocs for
DownloadManager.Query.setFilterByStatus()state that the one parameter can be"any combination of the STATUS_* bit flags".