title: Using android download manager phonegap 3.0
body: <p>I am using Cordova/Phonegap to write a small program which basically downloads a file from the server and places in the local sd-card. This app for now will only run on Android. I have this function which uses fileTransfer from cordova libraries which downloads the required file from the server. </p>
  
  <pre><code>this.downloadFile=function(){
          var filePath = '';
          var remoteFile = config.url + 'api_download';
          var localFileName = this.constants.currentFileName;
          window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
              fileSystem.root.getFile(localFileName, {create: true, exclusive: false}, function(fileEntry) {
                  var localPath = fileEntry.fullPath;
                  var fullPath =  fileEntry.fullPath
                  var metadata = fileEntry.getMetadata();
                  if (device.platform === "Android" &amp;&amp; localPath.indexOf("file://") === 0) {
                      localPath = localPath.substring(7);
                  }                 
                  filePath = localPath;
                  var ft = new FileTransfer();
                  ft.download(remoteFile,
                      localPath, function(entry) {
                          // Now file is downloaded, we need the mimetype
                          var type = returnMimeType(fullPath);
                          if(type != ''){
                              CDV.WEBINTENT.startActivity({
                                      action: CDV.WEBINTENT.ACTION_VIEW,
                                      url: fullPath,
                                      type: type},
                                  function() {},
                                  function() {console.log('Failed to open URL via Android Intent');}
                              );
                              console.log("Local Path is :"); console.log(fullPath);
                          }
                      }, fail);
              }, fail);
          }, fail);
      }
  </code></pre>
  
  <p>This is fine and works exactly as expected, but the user doesn't know if the file is downloading or not. I have no way to notify this and so I was wondering if I could use the Android's default download manager instead of the this method. Or Could I somehow show the progress of the download, it will solve the probelm as well.</p>
  
  <p>Thanks!</p>