Monday, 12 December 2011

How to Create Folder Programmatically into Sdcard in Emulator in Android?

Write Following Line into your Oncreate Method:-

File wallpaperDirectory = new File("/sdcard/Wallpaper");
Add below Uses-Permission into your AndroidManifest.xml File:-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Now Run Your Project the Wallpaper Folder is Created in Your Sdcard.

Enjoy :-)

Don’t forget to provide feedback or follow this blog, if you find this blog is useful.


  1. Post is helpful for me. Thank you for this tutorial.........

  2. Thanks, but the code does not work for marshmallow... Can u please help, on how to read or write a file/folder in marshmallow