We need to do the following changes/fixes in our earlier onActivityResult()'s gallery picker code to run seamlessly on Android 4.4 (KitKat) and on all other earlier versions as well.
Uri selectedImgFileUri = data.getData();
if (selectedImgFileUri == null ) {
// The user has not selected any photo
}
try {
InputStream input = mActivity.getContentResolver().openInputStream(selectedImgFileUri);
mSelectedPhotoBmp = BitmapFactory.decodeStream(input);
}
catch (Throwable tr) {
// Show message to try again
}