Hello. I am trying to get the full path of an im...
# android
i
Hello. I am trying to get the full path of an image selected from gallery while following Scoped Storage rules, but I'm struggling with it. Can anyone help?
i
That will never work: you do not have access to the actual File itself. You should be using ContentResolver.openInputStream, etc. to access the file's content
☝️ 1
i
Thank you Ian, I used a cursor to get the file.
i
That won't work for many Uris. Say, a file selected from Google Drive. Please don't ever assume there's even a file
i
Okay, that's interesting. I'll look into using a ContentResolver for this. Thanks