The activity hosting this fragment has its onActivityResult
called when the camera activity returns.
My fragment starts an activity for a result with th
I was also facing the same problem once I shifted this block of code outside of a Fragment to a Utility Class, with parentActivity
passed as argument,
Intent intent = new Intent(parentActivity, CameraCaptureActivity.class);
parentActivity.startActivityForResult(intent,requestCode);
Then I was not getting any value in onActivityResult
method of that Fragment,
Afterwards, I changed the argument to Fragment, so the revised definition of method looked like,
Intent intent = new Intent(fragment.getContext(), CameraCaptureActivity.class);
fragment.startActivityForResult(intent,requestCode);
After that, I was able to get value in onActivityResult
on the Fragment