title: How to save a file in the Downloads directory?
body: <p>My Code is:</p>
  
  <pre><code>String MyFile = "Riseone.dat";
  String MyContent = "This is My file im writing\r\n";
  
  File file;
  FileOutputStream outputStream;
  try {
       file = new File(Environment.getExternalStoragePublicDirectory(
                          Environment.DIRECTORY_DOWNLOADS),MyFile);
       outputStream = new FileOutputStream(file);
       outputStream.write(MyContent.getBytes());
       outputStream.close();
  
   } catch (IOException e) {
       e.printStackTrace();
   }
  </code></pre>
  
  <p>When I try this code MyFile creates in data/data/appfolder/files/Riseone.dat
  but I want to create a file in DIRECTORY_DOWNLOADS.</p>
  
  <p>also I want the file to write in append for next write action.</p>