Android examples for android.os:External Storage
is External Storage Writeable
import android.os.Environment; import android.os.StatFs; import java.io.File; import java.io.IOException; public class Main{ static Boolean isExternalStorageWriteable() { boolean mExternalStorageWriteable = false; String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state) && Environment.getExternalStorageDirectory().canWrite()) { mExternalStorageWriteable = true; }//from ww w.ja v a 2s . c om return mExternalStorageWriteable; } }