I\'m trying to take a photo using the android camera and telling it to save to the phone\'s gallery. I think i messed up on the path, but i can\'t seem to find my error. Cou
You need to set a value to this uriToFileInExternalStorage
Sample code:
fileName = "image_" + String.valueOf(numImages) + ".jpg";
File output = new File(direct + File.separator + fileName); // create
// output
while (output.exists()) { // while the file exists
numImages++; // increment number of images
fileName = "image_" + String.valueOf(numImages) + ".jpg";
output = new File(outputFolder, fileName);
}
uriToFileInExternalStorage = Uri.fromFile(output);