推断手机上是否有SD卡存在。作为经常用法,写到工具类里,用时直接调用。代码例如以下:

public static boolean hasSdcard(){
         String state = Environment.getExternalStorageState();
         if(state.equals(Environment.MEDIA_MOUNTED)){
                 return true;
         }else{
                 return false;
         }
	 }


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-10-16
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-01-14
相关资源
相似解决方案