One of my friends wants to save some data in his external directory (SD card) but he's been having an odd problem. He's using "Environment.getExternalStorageDirectory() which is returning mnt/sdcard. Then he wants to create two folders in the directory so this is what he's using:
File main = new File(getExternalStorageDirectory() + "/my_app/some_data");
This should make the directory "mnt/sdcard/my_app/some_data" but it's actually creating "mnt/sdcard/my_app/mnt/sdcard/my_app/some_data." Anyone know why this is happening or the proper fix?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!