is External Storage Writable - Android android.os

Android examples for android.os:External Storage

Description

is External Storage Writable

Demo Code

import android.os.Environment;

public class Main {

  public static boolean isExternalStorageWritable() {
    String state = Environment.getExternalStorageState();
    if (Environment.MEDIA_MOUNTED.equals(state)) {
      return true;
    }/*from  ww  w . ja  v a  2s .  co m*/
    return false;
  }

}

Related Tutorials