Android examples for android.os:External Storage
is External Storage Readable
import android.content.Context; import android.net.Uri; import android.os.Environment; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; public class Main{ public static boolean isExternalStorageReadable() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { return true; }/*from www . ja v a 2 s .c o m*/ return false; } }