Android Example PDFab - a default PDF viewer app based on DonManfred's PDFium wrap

I wanted a freeware pdf viewer without ads, tracking, data collection, and what have you. Besides, it wasn't obvious (to me at least) how to make an app that would be offered as default to open a certain type of file, especially a PDF. Time for some R&D fun, and here you go.

Prerequisites: download these files provided by @DonManfred (thank you very much for those):
- from https://www.b4x.com/android/forum/threads/pdfium-pdfview2.102756/ : click the big red link that says 'Download HERE', download the zip (I fetched PDFiumV1.04.zip) and extract its files to your B4A Additional Libraries folder
- from https://www.b4x.com/android/forum/threads/android-pdf-viewer-aar-missing.128982/#post-825649 : download the aar file to your B4A Additional Libraries folder

The icon was generated with https://icon.kitchen/ (thank you @Mashiane for your post, that's a brilliant site). You'll find it in the attached 'icon.zip' file; put folder 'icon' inside the project folder.

If you'd copy the code, make sure you
- have a look at the Manifest too as it contains information without which this won't work
- add the '#AdditionalRes' (for the icon) and '#AdditionalJar' lines you'll find in the Main module (and probably some other code too )
- take into account the PFDium license:

Tested on a Xiaomi Redmi Note 10, MIUI 14.0.5, Android 12.

Enjoy!
 

Attachments

  • icon.zip
    92.1 KB · Views: 318
  • PDFab.zip
    10.2 KB · Views: 371
Cookies are required to use this site. You must accept them to continue using the site. Learn more…