0

I need the route of a pdf file in my Android Project.

The file could be in raw or in assets folder.

I need to get the route because I must call using the File Class

Ex: File file = new File(path);

Thanks

Image:

http://img19.imageshack.us/img19/2303/capturaww.png

1 Answers1

0

I am not quite sure what you mean, assuming you want to read to PDF file in your assets (res file) look here

But if you want to get the file path of a folder, then look here

Here is an example of how to get a file path (taken from the third link)

File myFile = new File(uri.toString());

myFile.getAbsolutePath()
Community
  • 1
  • 1
jcw
  • 5,132
  • 7
  • 45
  • 54
  • It's easy understand, i need the path of pdf file which is inside of my Android proyect in folder raw or assets – user1686776 Nov 14 '12 at 20:04
  • It's impossible doing this. I solve this problem copying file from assets to sdcard, and them creating File object. Thanks – user1686776 Nov 14 '12 at 22:21