Android examples for android.os:External Storage
Create a temporary file to see whether a volume on External Storage is really writeable
import java.io.File; import android.os.Environment; public class Main { static boolean checkFsWritable() { String directoryName = Environment.getExternalStorageDirectory().toString() + "/DCIM"; File directory = new File(directoryName); if (!directory.isDirectory()) { if (!directory.mkdirs()) { return false; }//from w ww.ja v a 2 s . c o m } return directory.canWrite(); } }