I am creating a gallery app using a tutorial but get the following error:
abc directory path is not valid! Please set the image directory name AppConstant.java class
Please visit the following link to see the entire tutorial's code as I am using the same code:
I found this code in Utils Class:
else { // image directory is empty Toast.makeText( _context, AppConstant.PHOTO_ALBUM + " is empty. Please load some images in it !", Toast.LENGTH_LONG).show(); }
    } else {
        AlertDialog.Builder alert = new AlertDialog.Builder(_context);
        alert.setTitle("Error!");
        alert.setMessage(AppConstant.PHOTO_ALBUM
                + " directory path is not valid! Please set the image directory name AppConstant.java class");
        alert.setPositiveButton("OK", null);
        alert.show();
    }
    return filePaths;
How can I create the missing directory programmatically instead of display this error dialog?
 
     
    