PdfViewer - Library for displaying PDF documents on Android, with animations, gestures, zoom and double tap support. This is improved version of AndroidPdfViewer library for easy integration with VGS products for Android.
Add to your module build.gradle file:
implementation 'com.verygoodsecurity:android-pdf-viewer:<latest-version>'
If you are using ProGuard, add following rule to proguard config file:
-keep class com.shockwave.**
Android PdfViewer depends on PdfiumAndroid, which is set of native libraries (almost 16 MB) for many architectures. Apk must contain all this libraries to run on every device available on market.
Downloading files is long running process which must be aware of Activity lifecycle, must support some configuration, data cleanup and caching, so creating such module will probably end up as new library.
You have to store current page number and then set it with pdfView.defaultPage(page)
, refer to sample app