I am trying to create a directory in the internal memory of a device ...
I did like this:
File testDir = new File(Environment.getRootDirectory(),"Sample");
testDir.mkdir();
But I do not see the folder created in the DDMS file explorer when I run it in the emulator. I also added
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
to the manifest file. Add something else ... Is this correct? If no plz, suggest me the correct procedure.
source
share