I am using following code to pick image from gallery
public void takePhotoFromLibrary() {
_isFromLogin = false;
try {
// Launch picker to choose photo for selected contact
Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType("image/*");
// intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("outputX", 200);
intent.putExtra("outputY", 200);
intent.putExtra("scale", true);
intent.putExtra("return-data", true);
intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG
.toString());
intent.putExtra("noFaceDetection", false);
startActivityForResult(intent, PHOTO_PICKED);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}
I am using Lg optimus p350 for testing. In this case when i select an image picked by camera onActivityForResult is not getting called. Can anyone please help me with this?