I am using a fragment. I am getting an error in the onResult() method. I need a substitute method for setResult(RESULT_OK, data) that I can use in my f
onResult()
setResult(RESULT_OK, data)
You should call it on your fragment owning activity:
getActivity().setResult(Activity.RESULT_OK, data)
also you might want to finish your activity:
getActivity().finish();