title: DownloadManager directly into external storage directory
body: <p>I'm trying to download a big zip file directly inside the external storage directory, for example </p>
  
  <pre><code>"/mnt/sdcard/Android/data/com.vexdev.audioguida.app/files/data"
  </code></pre>
  
  <p>i guess i should be using </p>
  
  <pre><code>DownloadManager.Request.setDestinationInExternalPublicDir(path, fileName)
  </code></pre>
  
  <p>but i don't know how to provide it with a path that is consistent across different android devices.</p>
  
  <p>AND i'm also trying to get a path to access this file later, like this:</p>
  
  <pre><code>File file = new File(path + fileName);
  </code></pre>
  
  <p>i'm asking here because i know that those two methods are expecting different rooted paths, because i tried to provide a path like this:</p>
  
  <pre><code>Application.getAppContext().getExternalFilesDir(Environment.getDataDirectory().getAbsolutePath()).getAbsolutePath();
  </code></pre>
  
  <p>but the DownloadManager was not putting the files where the File constructor was searching it later. (It was downloading in the wrong directory actually!)</p>
  
  <p>I'm looking for a way to download those files directly in the right directory, without having to move them.</p>