Hello I am trying to create a directory in the external storage but it is not working for me. I debugged the application there I find that code execute perfectly myDirectory.mkdirs();
but this does not create the directory when I see it using the SD card explorer
Any idea why it is not creating the PMS
directory in the external storage ?
String capturedPhotoName = System.currentTimeMillis() + ".png";
try {
File myDirectory = new File(Environment.getExternalStorageDirectory()+ "/PMS/");
if(!myDirectory.exists()) {
myDirectory.mkdirs();
}
File photo = new File(myDirectory, capturedPhotoName);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo));
imageUri = Uri.fromFile(photo);
startActivityForResult(cameraIntent, CAMERA_INTENT_REQUEST);
} catch(Exception e) {
Log.e("PMS", e.getMessage());
}