I have task to capture image from camera and send that image to crop Intent. following is the code i have written
for camera capture
Intent captureIntent = new Intent(
                        MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(captureIntent, CAMERA_CAPTURE);
In on Activity result
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == RESULT_OK) {
        if (requestCode == CAMERA_CAPTURE) {
            // get the Uri for the captured image
            picUri = data.getData();  // picUri is global string variable 
            performCrop();
        }
   }
}
public void performCrop() {
    try {
        Intent cropIntent = new Intent("com.android.camera.action.CROP");
        cropIntent.setDataAndType(picUri, "image/*");
        cropIntent.putExtra("crop", "true");
        cropIntent.putExtra("aspectX", 3);
        cropIntent.putExtra("aspectY", 2);
        cropIntent.putExtra("outputX", 256);
        cropIntent.putExtra("outputY", 256);
        cropIntent.putExtra("return-data", true);
        startActivityForResult(cropIntent, CROP_PIC);
    } catch (ActivityNotFoundException anfe) {
        String errorMessage = "Your device doesn't support the crop action";
        Toast toast = Toast.makeText(getApplicationContext(), errorMessage,
                Toast.LENGTH_SHORT);
        toast.show();
    }
}
I am getting different behaviours on different devices
In some devices i am getting error "couldn't find item". In some devices after capturing image activity stuck and doesn't go ahead
I have also tried this
Please tell me the Right way to do this