title: How can I let users access the internal storage directory of my app?
body: <p>My app stores files in its internal storage directory (/Android/data/com.mycompany.myapp/files, as returned by getFilesDir()), and I would like to allow users to access those files directly from a file management app on their mobile device or the Android File Transfer desktop appplication.</p>
  
  <p>The <a href="http://developer.android.com/guide/topics/data/data-storage.html#filesInternal" rel="noreferrer">Storage Options developer guide</a> says:</p>
  
  <blockquote>
    <p>By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user).</p>
  </blockquote>
  
  <p>"By default" implies that I can change the default permissions to allow users to access these files, but I can't find any documentation of how to do that. Currently the com.mycompany.myapp directory is hidden when I browse the /Android/data directory with a file management app.</p>
  
  <p>I'm currently saving file data like this:</p>
  
  <pre><code>String fileName = "myfile.jpg";
  String filePath = getFilesDir() + File.separator + fileName;
  FileOutputStream fileStream = new FileOutputStream(filePath);
  fileData.writeTo(fileStream); // fileData is a ByteArrayOutputStream
  fileStream.close();
  </code></pre>
  
  <p>I tried setting the permissions of the individual files to world-readable, but this didn't make the directory visible:</p>
  
  <pre><code>FileOutputStream fileStream = this.app.openFileOutput(fileName, Context.MODE_WORLD_READABLE);
  </code></pre>
  
  <p>I also checked the documentation for the AndroidManifest file and didn't see anything there. Does anyone know how I can do this?</p>