简体   繁体   中英

How can i load my pdf file from sd card

I have a simple code in which i am reading a pdf file from sd card.

Here is my code

In the activity CcActivity: I have given path of the file name,at line number 25:

String filename = "/mnt/sdcard/sample3.pdf";

The pdf is looking fine in emulator. But now i want to set one button and on click event of that button i want to see all the pdf file stored in sd card. I don't have any idea about it,can some one please help me out to solve this problem.

1 Firstly you have to search all pdf files present in sdcard and store it into an array . To find pdf files in sdcard go through link search pdf's .

2 Then show all pdf's from array on any layout you are feasible onclick of button event. After that handle the specific pdf to display in pdfviewer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM