title: How to store files generated from app in "Downloads" folder of Android?
body: <p>I am generating an excelsheet in my app which when generated should be automatically saved in the <strong>"Downloads"</strong> folder of any android device where all the downloads are typically saved. </p>
  
  <p>I have the following which saves the file under "My Files" folder  -</p>
  
  <pre><code>File file = new File(context.getExternalFilesDir(null), fileName);
  </code></pre>
  
  <p>resulting in -</p>
  
  <pre><code>W/FileUtils﹕ Writing file/storage/emulated/0/Android/data/com.mobileapp/files/temp.xls
  </code></pre>
  
  <p>I rather want to save the generated file automatically in the <strong>"Downloads"</strong> folder when the excel sheet is generated.</p>
  
  <p><strong>Update # 1:</strong> Please see the snapshot here. What I want is the one circled in red and what you suggested gets stored in the one circled blue (/storage/emulated/0/download) if that makes sense. Please advise on how I can save a file in the one circled red i.e., "Downloads" folder which is different from /storage/emulated/0/Download under "MyFiles"</p>
  
  <p><img src="https://i.stack.imgur.com/o1LN7.png" alt="snapshot"></p>