Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>I am trying to make an app that creates a folder not in an external directory a.k.a the sdcard but in the device's memory. </p> </blockquote> <p>I encourage you to read the documentation, as you may be confused about the definition of <a href="http://developer.android.com/guide/topics/data/data-storage.html#filesExternal" rel="nofollow">external</a> and <a href="http://developer.android.com/guide/topics/data/data-storage.html#filesInternal" rel="nofollow">internal</a> storage. External storage means "accessible by the user", it does not mean "an SD card".</p> <blockquote> <p>I am trying to create a folder at the SD card.</p> </blockquote> <p>There is no SD card in most devices. External storage exists in nearly all devices, but it is not necessarily an SD card.</p> <blockquote> <p>Is there anything wrong with my code?</p> </blockquote> <p>You do not have rights to write to the root directory of the device.</p> <blockquote> <p>I want to make a folder near the documents folder of my device</p> </blockquote> <p><a href="http://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory%28java.lang.String%29" rel="nofollow">Use <code>Enviroment.getExternalStoragePublicDirectory()</code></a>, passing it <code>Environment.DIRECTORY_DOCUMENTS</code>.</p> <blockquote> <p>Is there any other folder created when an application is installed?</p> </blockquote> <p>You can use <code>getExternalFilesDir()</code>, a method on any <code>Context</code> (such as an <code>Activity</code>). However, this is usually for files that you want to store on external storage but are not necessarily convenient for the user to find.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload