I have an android tablet where external SD card called "/mnt/extsd" and its internal storage called "/mnt/sdcard".
When I am try to create a folder in "/mnt/sdcard" by the following code. Application successfully creates folder in root directory, while I try to create folder in "/mnt/extsd" it toast an exception "open failed: EACCESS (Permission denied)"
// create a File object for the parent directory
File root_directory = new File("/mnt/extsd/abc/");
// have the object build the directory structure, if needed.
root_directory.mkdirs();
// create a File object for the output file
File outputFile = new File(root_directory, "abc_checking");
// now attach the OutputStream to the file object, instead of a String representation
try {
FileOutputStream fos = new FileOutputStream(outputFile);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
Utility.showDialogue(getActivity(), e.getMessage() + "");
}
Manifest
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Any help from you guys will be very appreciable. Please HELP...:(