how to use downloadmanager class in android to download multiple files?
<p>so guys i am a noob so please bear with me ,i want to download multiple images in app ,i am trying to use download manager class for this.I have to download around 100-150 images ,but when it try to download 5-10 images it works fine but when i try to download more files the app crashes but the download continues how can i do this properly please guys help me this is my code i am using to download the images:-</p>

<pre><code>public void downloadimages(String url,String filename)
        {
          String ur1=url,v1=filename;
          downloadManager = (DownloadManager)getSystemService(DOWNLOAD_SERVICE);
          Uri Download_Uri = Uri.parse(ur1);
          DownloadManager.Request request = new DownloadManager.Request(Download_Uri);
          request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI);
          request.setAllowedOverRoaming(false);
          request.setDescription("Android Data download using DownloadManager.");
          request.setDestinationInExternalFilesDir(getApplicationContext(),Environment.DIRECTORY_DOWNLOADS,v1 + ".jpg");
          downloadManager.enqueue(request);     

        }
</code></pre>
