title: cordova: download from url to android download folder
body: <p>Well before i start i tried below answers from stack overflow.</p>
  
  <p><a href="https://stackoverflow.com/questions/21375624/download-file-to-downloads-folder-ios-android-using-phonegap">Download file to downloads folder ios/android using phonegap</a></p>
  
  <p><a href="https://stackoverflow.com/questions/35503051/filetransfer-cordova-download-path">FileTransfer Cordova download path</a></p>
  
  <p><a href="https://stackoverflow.com/questions/35220901/download-a-file-to-downloads-folder-of-device-using-cordova-filetransfer">Download a file to Downloads folder of device using Cordova FileTransfer</a></p>
  
  <p><a href="http://www.phonegaptutorial.com/downloading-an-image-from-the-internet-with-phonegap/" rel="nofollow noreferrer">http://www.phonegaptutorial.com/downloading-an-image-from-the-internet-with-phonegap/</a></p>
  
  <p>But no luck at all.</p>
  
  <p>I am trying to download a file from internet.
  My target is to download the file in download folder on Android phone.</p>
  
  <p>I tried all the above answers and also i have used cordova example from cordova site.</p>
  
  <p><a href="https://cordova.apache.org/docs/en/2.0.0/cordova/file/filetransfer/filetransfer.html" rel="nofollow noreferrer">https://cordova.apache.org/docs/en/2.0.0/cordova/file/filetransfer/filetransfer.html</a></p>
  
  <pre><code>function downloadCL(){
  
  var url = "http://www.phonegaptutorial.com/wp-content/uploads/examples/phonegap-logo.png";
  
  // we need to access LocalFileSystem
  window.requestFileSystem(window.LocalFileSystem.PERSISTENT, 0, function(fs)
  {
       // create the download directory is doesn't exist
      fs.root.getDirectory('downloads', { create: true });
  
      // we will save file in .. downloads/phonegap-logo.png
      var filePath = fs.root.fullPath + '/downloads/' + url.split('/').pop();
      var fileTransfer = new window.FileTransfer();
      var uri = encodeURI(decodeURIComponent(url));
  
      fileTransfer.download(uri, filePath, function(entry)
      {
          alert("Successfully downloaded file, full path is " + entry.fullPath);
      },
    function(error)
      {
          console.log("Some error " + error.code + " for " + url +);
      }, 
      false);
  }
                            };
  };
  </code></pre>
  
  <p>Any advise how to achieve this. </p>