Code example for DownloadManager.Query

Methods: setFilterById, setFilterByStatus

0
			return; 
		} 
		 
		DownloadManager dm = (DownloadManager) ctx.getSystemService(Context.DOWNLOAD_SERVICE);
	 
		Query query = new Query();
		query.setFilterById( downloadKey );
		query.setFilterByStatus( DownloadManager.STATUS_SUCCESSFUL );
		 
		Cursor cursor = dm.query(query);
		 
		if ( cursor.moveToNext() ){
			Log.d(TAG, "Clicked download successful completed.");
		}else{ 
			Log.d(TAG, "clicking on a download that is not complete. Just let us have patience ...");
		}				 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java