I\'m trying to upload an image taken by the camera in an android application to Firebase storage. The problem is that after I take the picture, in the confirmation activit
The exception occurs because the Uri in onActivityResult() is null:
Uri uri = data.getData();
The documentation for capturing a camera image explains:
The Android Camera application saves a full-size photo if you give it a file to save into. You must provide a fully qualified file name where the camera app should save the photo.
Follow the example in the documentation to create a file Uri and add it to the intent for the camera app.