How To Get The File Path For The Picked Files From The External Storage In Android?
I am facing the issues in picking the file path of the file, i searched for all over the stack overflow but the issue is not solved .Code for picking the files from the device is
Solution 1:
How to get the correct file path for the picked file ?
You don't. There is no file. ACTION_GET_CONTENT
has little to do with files. It has everything to do with content.
Use ContentResolver
and openInputStream()
to work with the content identified by the Uri
. For uploading, either:
Give the
InputStream
to the uploading API, if it can upload from that, orUse the
InputStream
and aFileOutputStream
to some file that you control (e.g., ingetCacheDir()
) to make a copy of the content, then upload from your local copy
Post a Comment for "How To Get The File Path For The Picked Files From The External Storage In Android?"