I want to upload a file which is stored in sdcard to php server.To upload a file i need the filepath.When i am giving the path in application my file is getting uploaded to php server.For this i have used code from following url Android file uploader with server-side php and it working nice.But here the path is given in source code only.But i donot want to give the path in my application.I want to open the sdcard and then select the file which i want to upload at run time.so my question is how to get the filepath of pdf at run time on selecting pdf file from sdcard so that i can use the path to upload that file. thank you
Share
this is what i use to get video files. you can change them for pdf.
…
and in your onActivityResult
this will open file manager applicatons like FileEexpert, astro, Gallery … and you can browse and select the file.