Android Crop Image crash
I'm currently using the following code to ask the user to choose an image from memory and to crop it, but it keeps crashing.
Intent i = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);
i.putExtra("crop", "true");
i.开发者_JS百科putExtra("outputX", 90);
i.putExtra("outputY", 90);
i.putExtra("aspectX", 1);
i.putExtra("aspectY", 1);
i.putExtra("scale", true);
startActivityForResult(i, 1);
And then, inside "onActivityResult" I've found data.getData() is null (whether when I comment out the "crop" extra it contains the image Uri), and extras.getParcelable("data") is null as well. :S
Does anybody have any clue, please?
Ok, fixed adding i.putExtra("return-data", true); :D
精彩评论