/* Checks if external storage is available for read and write */publicbooleanisExternalStorageWritable() {String state =Environment.getExternalStorageState();if (Environment.MEDIA_MOUNTED.equals(state)) {returntrue; }returnfalse;}/* Checks if external storage is available to at least read */publicbooleanisExternalStorageReadable() {String state =Environment.getExternalStorageState();if (Environment.MEDIA_MOUNTED.equals(state) ||Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {returntrue; }returnfalse;}