Intent captureImageIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(captureImageIntent, TAKE_FIRST_IMAGE_REQUEST_CODE);
In onActivityResult(int requestCode, int resultCode, Intent data)
String mediaKey = "data";
case TAKE_FIRST_IMAGE_REQUEST_CODE:
mImageUri1 = data.getData();
if (mImageUri1 != null) {
mImageBitmap1 = (Bitmap) data.getExtras().get(mediaKey);
postCaptureImg1();
} else {
LOGD(TAG, "mImageUri1 == null");
}
break;
The code works fine on Android version < 5.0. However, on 5.0, it no longer works, mImageUri1 is always null.
Anything changed in Android 5.0 that causes this?