Saturday, 17 September 2011

Android How to create folder in Sdcard Programmatically

Using below code we can create folder in Sdcard.(copy this below code in your activity)

String newFolder = "/mynewfolder";
String extSdcard = Environment.getExternalStorageDirectory().toString();
File file = new File(extSdcard + newFolder);
file.mkdir();

Note: Dont forget to add permission

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />











2 comments:

Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...