Code example for DownloadManager.Query

Methods: setFilterById

0
			if (refCompleted == reference) { 
				// downloading completed 
				// Toast.makeText(getApplicationContext(), 
				// "Downloading Completed!", Toast.LENGTH_LONG).show(); 
 
				Query myDownloadQuery = new Query(); 
				myDownloadQuery.setFilterById(reference); 
 
				Cursor myDownload = manager.query(myDownloadQuery); 
 
				if (myDownload.moveToFirst()) { 
					int fileNameId = myDownload 
							.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI); 
					String fileUri = myDownload.getString(fileNameId); 
					Toast.makeText(getApplicationContext(), 
							"Download Completed: " + fileUri, Toast.LENGTH_LONG) 
							.show(); 
				} 
 
				myDownload.close();