title: Invoke native file browser using phonegap
body: <p>I have to implement file upload feature in my phonegap project. User should be able to upload any type of file from the phone memory or sd card. The application screens I designed using jQuery Mobile framework. I tried input type="file", but it is not supported in android 4.4. I tried phonegap camera API too, but it is supported only media files. I found some cordova plugins (<a href="http://ramkulkarni.com/blog/file-chooser-dialog-for-phonegap-application/" rel="nofollow">exm1</a>,<a href="http://www.digitalnoiz.com/mobile-development/mobile-file-explorer-with-phonegapcordova-and-jquery-mobile-part-1/" rel="nofollow">exm2</a> ). But these plugins using custom UI. I want to invoke native file browser for choosing the file &amp; it has to work in both Android &amp; iPhone platforms. Is there a way to implement the same?</p>
  
  <p>I found cordova file chooser plugin (<a href="https://github.com/cdibened/filechooser" rel="nofollow">https://github.com/cdibened/filechooser</a>) would be helpful for android platform, but I am unable to make it work. The success callback function is not immediately getting triggered after the file selection (tested with android 4.4.2). Please find my code below,</p>
  
  <p><code>&lt;input type="file" id="fileinput" name="fileinput"/&gt;</code> </p>
  
  <pre><code>$("#fileinput").bind('click',function(){ 
      console.log("choose file selected"); 
      filechooser.open( {}, fileChooseSuccess, fileChooseFailed ); 
  }); 
  function fileChooseSuccess(data) { 
      var filepath = data.filepath; 
      console.log("file path:"+filepath); 
  } 
  function fileChooseFailed(msg) { 
      console.log(msg); 
  } 
  </code></pre>