title: Downloading file and saving it to download folder using kotlin in Android
body: <p>I am trying to download an apk file from the web server and store it in the download folder. I am using fuel library</p>
  
  <pre><code>Fuel.download("https://mypath/app.apk").destination { 
      response, url -&gt; val dir = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString()) File(dir, "abcd.apk")    
  }.progress {
      readBytes, totalBytes -&gt; val progress = readBytes.toFloat() / totalBytes.toFloat()
      Log.d("log",progress.toString())
  }.response {
      req, res, result -&gt; Log.d("log","download completed ")    
      Log.d("log",Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString() + "/abcd.apk")
  }
  </code></pre>
  
  <p>I am getting <code>bytesArray</code> in <code>response</code> but the file is not saving to download folder. I have <code>write_external_storage</code> on my <code>Manifest</code> file. Please let me know what am I missing?</p>