PDF Reader App with Firebase in Android Studio- Store the PDF file into firebase Storage and fetch it and Display PDF using pdfviewer I got many messages asking how to store and fetch PDF files in Firebase Storage.
So here is the detailed post explaining about Uploading PDF files in Firebase Storage and Fetching those uploaded files from Firebase Storage. I already posted a tutorial about the same thing but with image files. You can check that post from the below link.
- Setup Firebase account and add your project.
- Click on “Storage” from left Menu
- than add your PDF files
- after that in your android project create recycle view or use list view to view data
- use PDFviewer library and AsyncTask to Display Data
Firebase Setup: (https://firebase.google.com/docs/android/setup)(url)
Firebase dependency : (https://firebase.google.com/support/release-notes/android)(url)
Dependency in project:
- Firebase Core: ‘com.google.firebase:firebase-core:17.0.1’
- Analytics: com.google.firebase:firebase-analytics:17.0.1
- Cloud Messaging: com.google.firebase:firebase-messaging:19.0.1
- Cloud Storage: com.google.firebase:firebase-storage:18.1.1
- In-App Messaging: com.google.firebase:firebase-inappmessaging:18.0.2
Note: If your Are using the new version of library than you may get Error of AndroidX.
Solution:You need migrate project into AndroidX.
If You have Any Queries About this Comment it in details
Creating a New Project
So again we will start by creating a new project. I just created a project named FirebaseStorage.
After creating the project add Firebase Storage and Firebase Database to your project (Go to tools->firebase).
PDF Reader with Firebase in Android Studio
Uploading PDF in Firebase Storage PDF Reader with Firebase in Android Studio
Now here comes the main task of this post which is uploading PDF files to the storage. The uploading is done on the Main Activity so come inside MainActivity.java and write the following code.
There is no built-in support for reading PDF files on Android, which is kind of a shame, especially since iOS has native support for the format. The vision must have been that user’s will select their own favorite PDF readers app.
This tutorial is about:
✓Create PDF app.
✓Display Specific or all pages from PDF
✓Display PDF from Mobile Phone.
✓Add padding between pages.
✓Firebase Integration real time data storage
✓Scroll PDF pages vertically or Swipe horizontally.
Note- For Publish on play store App , choose “Start in locked mode” in firebase than proceed the work.
Note- For No publish app on play store only for texting purpose than choose “Start in Test mode ” in firebase than proceed the work.
Click below to get the full source code android PDF Reader application.
PDF Reader APK Download : Click Me
Get the full source code android PDF Reader app with firebase application.
We have successfully created a PDF Reader with Firebase in Android Studio Android application .
READ MORE ANDROID APPS
Wallpaper Android App- CLICK HERE
All IN ONE Status Saver App – CLICK HERE
Photo Video Maker Android App – CLICK HERE
Video Downloader Android App – CLICK HERE
College Student Portal System App – CLICK HERE
Best Status and Sayari Android App – CLICK HERE
Make Quotes Premium Android App – CLICK HERE