Check SD Card is present in device
by Sasikumar[ Edit ] 2013-10-19 19:06:37
To check SD Card is present in android device:
Sometimes we need to read/write files on SD Card due to large memory size. In those cases its better to check whether SD Card is present in the device. The following function would do the need
public static boolean isSdPresent()
{
return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
}
Making a call to this function would return
"true" if sd card is installed or
"false"" if sd card is not present.