Code example for DownloadManager.Query

Methods: setFilterById

0
		@Override 
		public void onReceive(Context context, Intent intent) { 
			 
			if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction())) { 
				 
                Query query = new Query(); 
                query.setFilterById(enqueue); 
                Cursor cursor = downloadManager.query(query); 
                 
                if (cursor.moveToFirst()) { 
                    int columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_STATUS); 
                     
                    if (DownloadManager.STATUS_SUCCESSFUL == cursor.getInt(columnIndex)) { 
                        String uriString = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)); 
                        String fileName = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME)); 
                         
                        // 
                        //	TODO -- put the database where it needs to go so it can be accessed as a sqlite database properly 
                        // 
                    } 
                }