android write to sdcard

sapan
android to sdcard

Android write to sd-card

Below is the snippet to write into the sd-card. Some devices may not contain the sd-card. So basically we are writing in to user visible space.
String  ROOT_DIR_NAME = "appdir";
File root = 
android.os.Environment.getExternalStorageDirectory(); //for sdcard
File rootdir = new File (root.getAbsolutePath() + "/"+ROOT_DIR_NAME+"/"); //it is my root directory
if(rootdir.exists()==false)  
{  
    rootdir.mkdirs();  
    Log.wtf("SKDINFO","folder created");  
}

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !