Check if SD card is present

2 votes · 0 comments

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

raw ·
copy
· download
public static boolean isSdPresent() { return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED); }

Be the first to comment

Sign in with OpenID