title: How to save downloaded file on sd card from download manager programmatically on android
body: <p>In my application i have download(Image) feature which is used to download file from urls. The download happen should be shown in notification bar so that i used Download Manager class to download file. This is working fine but the downloaded image does not stored no where in the sdcard. </p>
  
  <p>i have referred the <a href="http://android-er.blogspot.in/2011/07/sample-code-using-androidappdownloadman.html" rel="nofollow"><strong>url</strong></a> for the download manager.</p>
  
  <p><strong>my requirement is i need to save the download image to sdcard with notification bar indication.</strong>  <strong>What to modify on the code to get save image on sdcard on the above link</strong></p>
  
  <p>i have some doubts regards the code in the above link is Can i use the same code to download audio or video file?</p>
  
  <p>please help me.</p>
  
  <p>Edited question:</p>
  
  <p>I have tried </p>
  
  <pre><code>        filepath = Environment.getExternalStorageDirectory().getPath()+"/download/cm.png";
          Uri destinationUri = Uri.parse(filepath);
          request.setDestinationUri(destinationUri);
  </code></pre>
  
  <p>before the preference manger on the button click. but i could not get the file on sdcard.</p>