Sometimes we need to know whether an SD card is present or not. So here is a check to see if an SD card is present. It returns true if the SD card is present and writable, false otherwise. first posted on anddev by MrSnowflake
public static boolean isSdPresent() {
return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
}
Be the first to comment