title: How to access external storage with cordova file / file-system-roots plugins?
body: <p><strong>Problem description:</strong>
  I can access the internal storage with either the file or the file-system-roots (read and write). But such a file can not be access from an other app. For example if I want to send this file through the emailComposerPlugin, the file can not be accessed by the email client. (Same goes for the "open with" function.)
  If I change the options <code>{sandboxed: true}</code> to false (to write to the external storage), it does not work and ends up in a FileUtils.UNKNOWN_ERR. I tried the application while the phone disconnected from USB, as some docs mentioned that external storage can not be accessed while mounted on the pc - same result though.</p>
  
  <p>From what I read on the <a href="http://www.mail-archive.com/dev@cordova.apache.org/msg15296.html" rel="noreferrer">mailing list</a> this should be possible. It seems I miss a crucial point? </p>
  
  <p><strong>Context:</strong>
  I try to enable an hybrid application created for iPhone to run on android devices. To have a little playground, I create a small test project.</p>
  
  <p><strong>Edit:</strong>
  There seems to be a problem between file-system-roots and file plugin. But I have the newest versions of both of them. (File: 1.0.1   File-system-roots: 0.1.0)
  Debugging the file-system and file classes show that </p>
  
  <pre><code>private String fullPathForLocalURL(Uri URL) {
      if (FILESYSTEM_PROTOCOL.equals(URL.getScheme()) &amp;&amp; "localhost".equals(URL.getHost())) {
          String path = URL.getPath();
          if (URL.getQuery() != null) {
              path = path + "?" + URL.getQuery();
          }
          return path.substring(path.indexOf('/', 1));
          // path = "/cache-external" at this point
          // results in index out of bounds exception
  </code></pre>
  
  <p><strong>What have I tried?</strong></p>
  
  <p>config.xml</p>
  
  <pre><code>&lt;preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external" /&gt;
  </code></pre>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>javascript code</p>
  
  <pre><code>function createTextDocument(filename, text) {
  
      cordova.filesystem.getDirectoryForPurpose('cache', {sandboxed: false}, successCallback, failureCallback);
  
      function successCallback(directoryEntry){
          console.log('directory found (cordova): ' + directoryEntry.toURL());
          console.log('directory found (native) : ' + directoryEntry.toNativeURL());
          directoryEntry.getFile(filename, {create: true, exclusive: false},
              function(fileEntry){
                  var filePath = fileEntry.toNativeURL();
                  fileEntry.createWriter(
                      function(fileWriter){
                          console.log('start writing to: ' + filePath );
                          fileWriter.write(text);
                          console.log('file written');
                      },failureCallback
                  );
              }, failureCallback
          );
      }
  
      function failureCallback(error){
          console.log('error creating file: ' + error.code);
          // results in code 1000
      }
  }
  </code></pre>