public void StartDownloading() { File file = null; for(int i=0; i<FileNames.length; i++) { file = new File("/sdcard/Sounds/"+FileNames[i]); boolean exists = file.exists(); if(exists) { continue; } else { new DownloadFileAsync().execute(Path+FileNames[i],FileNames[i]); } file = null; } } @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_DOWNLOAD_PROGRESS: WaitDialog = new ProgressDialog(this); WaitDialog.setMessage("Downloading files..."); WaitDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); WaitDialog.setCancelable(false); WaitDialog.show(); return WaitDialog; default: return null; } } class DownloadFileAsync extends AsyncTask<String, String, String> { @Override protected void onPreExecute() { super.onPreExecute(); showDialog(DIALOG_DOWNLOAD_PROGRESS); } @Override protected String doInBackground(String... aurl) { int count; try { URL url = new URL(aurl[0]); URLConnection conexion = url.openConnection(); conexion.connect(); int lenghtOfFile = conexion.getContentLength(); InputStream input = new BufferedInputStream(url.openStream()); File file = new File("/sdcard/Sounds/"+aurl[1]); OutputStream output = new FileOutputStream(file); byte data[] = new byte[4046848]; long total = 0; while ((count = input.read(data)) != -1) { total += count; publishProgress(""+(int)((total*100)/lenghtOfFile)); output.write(data, 0, count); } output.flush(); output.close(); input.close(); } catch (Exception e) {} return null; } @Override protected void onPostExecute(String unused) { dismissDialog(DIALOG_DOWNLOAD_PROGRESS); } } At the same time, I try to download 4 files with a total weight of 2.71 mb, the progress bar appears, but usually disappears quickly, and the files remain downloaded at 5-30kb, sometimes even 1-2 files appear, too, at 5-30kb.