title: Create a file in Android with certain permission
body: <p>I'm developing an Android application I have to implement a function that create a folder with different files.</p>
  
  <p>I wish the files in the folders were hidden, and this point is not a problem, but I want assign certain permission to files, for example I need that files are not readable / writable by user but only from application.</p>
  
  <p>Also I wish the files in the folder were deleted if the application was uninstalled.</p>
  
  <p>This is the code that i use to create hidden folder:</p>
  
  <pre><code>File JSONStorage = new File(Environment.getExternalStorageDirectory(), ".BMA");
  if (!JSONStorage.exists()) {
      if (!JSONStorage.mkdirs()) {
          Log.wtf("log: ", "Failed to create directory");
      }
  }
  </code></pre>