View pdf from an external SD Card (Visualizzare pdf da SD Card External)

Hello to the forum, I apologize for my English that I do not know and for this I use the translator.
I am attaching the aia file of an application that I am designing using projects that I have searched on the internet.
When you start the application, it goes to read all the pdfs contained in the external SD card (Micro SD) of my device and populates the ListView with all the names of the pdfs.
I need help to select a name from the ListView so that it displays the pdf. I have made several tests with suggestions found on the internet but it always gives me error.
Thanks in advance to the forum for any help.

Pdf.aia (59.6 KB)

How are you intending to view the pdf ?

The issue you have is that you have stripped the file path from the files to make your listview.
You will need to get the selection index of your selected file, and correspond that with the original list returned by TaifunFile (fileList), then use this to display your pdf.

My extension ViewPDF, seems to work with most file locations (testing on Android 10, companion), but not sure about external sd cards...)

Pdf_revised.aia (67.3 KB)

1 Like

It works also with a removable (micro) SDcard.
Checked on Android 9.

1 Like

Thanks for the help, now I understand where the mistake was.

Then tell it so others can learn from it too.

I had placed the launch of the "list_pdf" procedure in the "when Screen.PermissionGranted" block when I had to insert it into a "Button". Then I was missing the "ViewPdf" extension.

1 Like

attach please your current blocks

Yes, that wasn't necessary in your case since you didn't want to list/read the PDFs at Screen.Initialize (otherwise it would have been correct).

OK thank you.

MyPdfSdCard.aia (88.8 KB)

Hello, here I am again for help from the forum which I thank for the valuable contribution.
I attach the aia file of the project, I ask if it was possible to view the pdfs with Adobe Acrobat and not as it happens now.
Thanks for any help.

MyPdfSdCard.aia (88.8 KB)

Maybe you could use activity starter

Thanks for the tip but it gives me the following error message:

I am attaching the file aia with your suggestion.

MyPdfSdCard.aia (89.3 KB)