Currently, doing this only stores it into the gallery. I have no idea how to save the cropped photo into my own folder.
My Question is:
How can i save the file in to my local folder?
case CROP_FROM_CAMERA:
Bundle extras = data.getExtras();
Bitmap photo = null;
if (extras != null) {
photo = extras.getParcelable("data");
mImageView.setImageBitmap(photo);
}
// Create new folder inside Palm Detect directory
File mediaStorageDir2 = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + "Palm Detect",
"Cropped Image");
// Create the storage directory if it does not exist
if (!mediaStorageDir2.exists()) {
if (!mediaStorageDir2.mkdirs()) {
Log.d(IMAGE_DIRECTORY_NAME, "Oops! Failed create "
+ "Cropped Image" + " directory");
}
}
// Store cropped photo into gallery
Images.Media.insertImage(getContentResolver(), photo, "Img_" + String.valueOf(System.currentTimeMillis()), "");
break;