Cropping library not working on Nexus S

275 views Asked by At

I am working on an Android application in which I am doing image cropping. I have used the following line of code which is working for Gallery and Camera. I have tested it on LG- Nexus and MicroMax Mobile having API 4.2, it is working fine on both of them but not for Samsung Nexus - S. On Cropping activity when I press OK button nothing happens. It also don't give any error.

public void cropCapturedImage(Uri picUri){
        //call the standard crop action intent 
        Intent cropIntent = new Intent("com.android.camera.action.CROP");
        //indicate image type and Uri of image
        cropIntent.setDataAndType(picUri, "image/*");
        //set crop properties
        cropIntent.putExtra("crop", "true");
        //indicate aspect of desired crop
        cropIntent.putExtra("aspectX", 1);
        cropIntent.putExtra("aspectY", 1);
        //indicate output X and Y
        cropIntent.putExtra("outputX", 512);
        cropIntent.putExtra("outputY", 512);

        //retrieve data on return
        cropIntent.putExtra("return-data", true);
        //start the activity - we handle returning in onActivityResult
        startActivityForResult(cropIntent, 2);
    }
0

There are 0 answers