title: download file to custom directory
body: <p>I am using the DownloadManager to download a file to my Android device. I can choose to download to the DCIM, Downloads, Picutures folder, etc using:</p>
  
  <pre><code>downloadRequest.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "file.jpg");
  </code></pre>
  
  <p>This works. But I can only choose a limit set of folders to download to. I want to download to the root of my sdcard using /sdcard/</p>
  
  <p>I tried:</p>
  
  <pre><code>downloadRequest.setDestinationUri(Uri.fromFile(new File("/sdcard/file.jpg")));
  </code></pre>
  
  <p>But this renders the following exception:</p>
  
  <blockquote>
    <p>IllegalStateException: android invalid combination of destination: 4, path: /sdcard/file.jpg</p>
  </blockquote>
  
  <p>How can I do this? I have all the required permissions set.</p>