title: Saving a blob file to disk with buffer using Cordova PhoneGap File and Javascript
body: <p>I'm using Cordova PhoneGap and HTML5 to build an android app that saves video's from a GoPro to the androids flash memory.</p>
  
  <p>My issue is that the short videos are 3-5mb in size and when writing to flash in the current code lock the app for 3-4 seconds during the <code>fileWriter.write()</code> call.</p>
  
  <p>Android version 4.4.0,
  PhoneGap 3.6</p>
  
  <p>Is it possible to use a buffer or the create writer in another thread to stop the app freezing for the file write duration?</p>
  
  <p>If anyone has some insight on a better approach to achieving this would be much appreciated.</p>
  
  <pre><code>var src = new Blob(); //3-5mb blob from previously retrieved file
  var starttime = Date.now();
  fileSystem.root.getFile("NEWFILE.MP4", { 'create': true }, 
      function (fileEntry) {
          fileEntry.createWriter(function (fileWriter) {
              fileWriter.onwriteend = function (event) {
                  console.log(Date.now()-starttime); //usually 3-6 seconds lockup
          };
          fileWriter.write(src);
      }, function (fail) { console.log(fail); });
  });
  </code></pre>