Skip to main content

Check SD card availability on android device programatically

We can check SD card is present or not before doing the file operations on the SD card,

For Example:

public static boolean isSDcardPresent(){
return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);

}

 This code will return true if the SD card is present.

Comments