查看SDCard是否被挂载

获取Environment.getExternalStorageState(),然后得到的字符串进行查看
  
if("mounted".equals(Environment.getExternalStorageState())){
    
System.out.println("SDcard 挂载着");
  
}else if("unmounted".equals(Environment.getExternalStorageState())){
    
System.out.println("SDcard 未挂载");
  
}

你可能感兴趣的:(查看SDCard是否被挂载)