答案 0 :(得分:7)
例如:
String state = Environment.getExternalStorageState();
if (state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {
}
查看可能的常数:http://developer.android.com/reference/android/os/Environment.html#getExternalStorageState%28%29
答案 1 :(得分:6)
public static boolean isSdPresent() {
return android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
}