Hola Carlos:
No he trabajado mucho compartiendo ficheros y con URI's, pero por lo que sé puede ser que una URI no corresponda con un archivo real en el dispositivo y por tanto no pueda copiarse. Por ejemplo, podría ser un archivo de google drive o algo así, y por tanto no tendría un "path" de tu dispositivo, por tanto, no des por hecho que siempre vas a obtener un archivo real que puedas copiar.
Haz algunas pruebas con estos post:
Con este, por ejemplo, podrías ver si hay path, pero puede no estar disponible, por lo que deberías comprobar qué te devuelve "res":
OK, so I want to retrieve a photo from the phone... I use the ContentChooser to get the photo. Now, I want to save the location of that picture in a file, and reload it at a later time. I can GET the picture the first time... That's working. Then I save the Dir and FileName to variables that...
Y con este puedes obtener alguna información del archivo:
example of getting file property information from uri provided by content chooser or received file shared to the app. Curtesy of Erel’s example: Received Share. Shows File name, Mime Type, date modified, file size and a list of all columns from that particular content provider. updated code to...