forum

Home / DeveloperSection / Forums / How to use Choose file in android without using browse?

How to use Choose file in android without using browse?

Anonymous User 1897 16-Nov-2014

I have an application on android phone. People will download pdf file before using my app, and the pdf file will be saved in a certain folder.

I know the absolute path of the folder, but I don't know the name of the new pdf file people download, so I can't get the absolute path of the pdf apparently.

Is there any method to choose the file by using maybe the file type? (Because I am sure that there is only one pdf file in that folder.) By the way, I don't want to choose file by browse.

Here is the stupid method I used before, but it can't match my demand anymore.

public static final String file_name = "//sdcard//Download//test.pdf";
File myFile = new File(file_name);

Any easy way to solve the problem? Thanks for your help sincerely.


Updated on 17-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By