I have made an App in which I have captured an image from camera and a rectangle is shown to crop the selected area. But I'm facing two big problems in it:
when we change the dimensions of rectangle appeared to large size for cropping the image then instead of showing cropped image file it restart camera activity?while the same thing I have done in taking image from gallery and it is working.
aspect ratio is not working for image taken from camera activity?
Code for camera activity:
public void onClick(DialogInterface dialog, int item)
{
Intent intent = new Intent();
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 774);
intent.putExtra("aspectY", 1115);
intent.putExtra("outputX", 774);
intent.putExtra("outputY", 1115);
if(item==0)
{
intent.setAction("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, PICK_FROM_CAMERA);
}