Reputation: 3270
Alright so I created 2 folders in the SD card using the following code:
String folderPath = Environment.getExternalStorageDirectory() + "/AllAroundMe/Images/";
File file = new File(folderPath);
if(!file.exists())
{
if(file.mkdirs());
Log.d("MyTag","Successfully created folders");
}
I tested this program and it really works, the logcat prints the success message above.
But if I navigate to my sd card I don't see "AllAroundMe" folder.
How can I access that folder from my computer?
Upvotes: 1
Views: 2208
Reputation: 33544
First i hope you have given the External Storage
permission in your Manifest.xml
Do something like this... i know what you did right, but still i prefer this approach.
File f = new File("/sdcard/AllAroundMe/Images/");
Now browse your sdcard from you pc, i am sure you will find the folder.
Upvotes: 0
Reputation: 2927
Just check u can`t give the permission in manifest file in your Application just add the permission of this.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Than run your own code the folder has been create in sdcard ok check this.
Upvotes: 0
Reputation: 3422
Go to Android DDMS FIleExplorer-->mnt-->sdcard--> and search for your sdcard folder which is created by you
Upvotes: 1
Reputation: 312
Try this Open DDMS perspective -> File Explorer - > mnt -> sdcard
Upvotes: 3