检测sd是否可用
1 String sdStatus = Environment.getExternalStorageState(); 2 if (!sdStatus.equals(Environment.MEDIA_MOUNTED)) { // 检测sd是否可用 3 toast.setText("sd card不可用"); 4 return; 5 }
1 String sdStatus = Environment.getExternalStorageState(); 2 if (!sdStatus.equals(Environment.MEDIA_MOUNTED)) { // 检测sd是否可用 3 toast.setText("sd card不可用"); 4 return; 5 }