how to check internal and external storage if exist

后端 未结 5 622
说谎
说谎 2020-11-29 04:03

How do i know if there are internal and external storage in android pragmatically? does anyone how to know how to check both internal and external storage

thanks in

5条回答
  •  心在旅途
    2020-11-29 04:46

    File f = new File("/mnt/sdcard/ext_sd");
        if (f.exists()) {
            // Do Whatever you want sdcard exists
        }
        else{
            Toast.makeText(MainActivity.this, "Sdcard not Exists", Toast.LENGTH_SHORT).show();
        }
    

提交回复
热议问题