You are getting wrong because you are doing it wrong way.
If you pass the extra parameter MediaStore.EXTRA_OUTPUT
with the camera intent then camera activity will write the captured image to that path and it will not return the bitmap in the onActivityResult
method.
If you will check the path which you are passing then you will know that actually camera had write the captured file in that path.