There are multiple questions about this issue (see here, for example) and the solution seems to be to create a getRealPathFromURI
method which uses a pretty hacky method to figure out the path of the file. My question is why is this necessary in the first place? Why doesn't getPath
return the actual path of the file?
My use case is that I'm receiving an ACTION_SEND intent with MIME type */*
and want to copy the file to another location, so I need the full path.