Image capture with camera & upload to Firebase (Uri in onActivityResult() is null)

前端 未结 2 1602
鱼传尺愫
鱼传尺愫 2020-12-11 10:49

So I\'ve got a problem, previously mentioned in the question I\'ve asked: Uploading image (ACTION_IMAGE_CAPTURE) to Firebase storage

I\'ve searched for the issue a b

相关标签:
2条回答
  • 2020-12-11 11:08

    Try changing mCurrentPhotoPath = image.getAbsolutePath(); to mCurrentPhotoPath = "file:" + image.getAbsolutePath();. I didnt spot any other differences from my code, which has worked.

    0 讨论(0)
  • 2020-12-11 11:11

    So the answer is simple, thanks to @wilkas help in the comments. I just forgot to add the photoURI into filepath.putFile(photoURI), it was just filepath.putFile(uri), so the addition of code simply did nothing until I notices this. Hope this Q&A will help someone else with a similar problem!

    0 讨论(0)
提交回复
热议问题