so I want to choose an image from gallery and then crop it:

```
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,
      "Select Picture"), PHOTO_PICKED_WITH_DATA);

```

OK, pick the photo and then catch it onActivityResult, then crop it:

```
Intent intent = new Intent("com.android.camera.action.CROP");
    intent.setDataAndType(mAvatarUri, "image/*");
    intent.putExtra("crop", true);
    intent.putExtra("aspectX", 1);
    intent.putExtra("aspectY", 1);
    intent.putExtra("outputX", ICON_SIZE);
    intent.putExtra("outputY", ICON_SIZE);
    intent.putExtra("scale", true);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, mAvatarUri);
    intent.putExtra("return-data", true);
    startActivityForResult(intent, CROP_IMAGE);

```

now, the problem is when i want to transform it into bytes and then send it inside an xml... it doesn't take only the cropped image but instead the whole image itself...
also, i cannot access cropped image uri, it says file not found!
hmmmm, seems like my cropped image weren't saved after all...

how can i suppose to fix this?

Samsung ACE 2.3.4