How to create a directory in External SD in android application

前端 未结 4 764
暖寄归人
暖寄归人 2021-01-25 09:39

I want to create a directory on \"/mnt/extsd/MyFolder\" this path. while calling mkdir() it returns false.I inserted the sdcard on my tablet, got the external path as \"/mnt/ext

4条回答
  •  孤街浪徒
    2021-01-25 10:06

    Do you have declared permission in Manifest.xml file?

    
    

    Also I suggest you to not going for HardCoded path of /mnt/extsd/ Instead of it just use Environment.getExternalStorageDirectory().getPath().

提交回复
热议问题