title: Use DownloadManager to download files to real SD card, not to emulated storage
body: <p>I have a galaxy S4 and my problem is that i can't use the DownloadManager to download files to SD card, on emulated storage it works just fine, as for real SD card it gives me this error:</p>
  
  <pre><code>java.lang.SecurityException: Destination must be on external storage: file:///mnt/extSdCard/Android/data/net.myApp/files/exercises/exec.mp4
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>DownloadManager dwlManager=(DownloadManager)context.getSystemService(Context.DOWNLOAD_SERVICE);
  
  DownloadManager.Request dwlmRequest=new DownloadManager.Request(Uri.parse("http://cdn..."));
  File destination = new File("/mnt/extSdCard/Android/data/net.myApp/files/exercises/exec.mp4");              
  
  dwlmRequest.setDestinationUri(Uri.fromFile(destination));
  dwlManager.enqueue(dwlmRequest); //&lt;--- Here comes the error.
  </code></pre>
  
  <p>If i set the destination as:</p>
  
  <pre><code>File destination = new File(getExternalFilesDir(null), "exec.mp4");
  </code></pre>
  
  <p>The code works just fine, because the destination comes to the emulated storage.
  Also i can create files to the SD card like:</p>
  
  <pre><code>File f = new File("/mnt/extSdCard/Android/data/net.myApp/files/exercises/exec.mp4");
  f.createNewFile();
  </code></pre>
  
  <p>It works, but i can't use the download manager with that path.</p>
  
  <p>Please help.
  I need to be able to download files to that path.</p>