Code example for DownloadManager

Methods: query

0
				// "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(); 
 
			} 
 
		}