When you call startActivityForResult
from a fragment, the result is sent back to your activity's onActivityResult
. Instead use super.onactivityResult
in your activity's onActivityResult
and the result will instead be sent back to your fragment's onActivityResult
. You can write your code here. Don't use getActivity.onactivityResult
in your fragment's onActivityResult
because it will refer to the activity's onActivityResult
.