How to make PDF Reader App in Android Studio With Source Code

Make PDF Reader Application in Android Studio With Source Code free . This app have many features i.e. Counting the number of pages and read pdf from phone Storage and SD Card. lets to create pdf reader app in android studio

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, and then read all other apps’ PDF files through that reader app.

     DESCRIPTION     

This tutorial is about:
✓Create PDF app.
✓Display Specific or all pages from PDF
✓Display PDF from Mobile Phone.
✓Add padding between pages.
✓Passwords
✓Scroll PDF pages vertically or Swipe horizontally.

<img decoding=

PDF App-Manifest File

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.technic.pdfview">

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:allowBackup="true"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".PdfActivity"></activity>
    </application>

</manifest>

How to Create PDF Viewers App for Android.

PDF Reader Features:

  1. Runtime Permission of External Storage.
  2. Read all PDF files from Phone.
  3. Display PDF files in Custom List View including icon and filename.
  4. View PDF Files.

Add This dependency on gradle file

 implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'

PDF reader app – Android Studio Tutorial

PDF Readers App – If you’re ever in need of extra help with your Android app development projects, you can find experienced Android developers on Android Studio to help you with everything from UI design to creating a native Android app.

How to make wallpaper app in android : Click Here.

gradle file


apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.technic.pdfview"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'

}

YOUTUBE VIDEO

This inspired me to come up with a hybrid solution for reading that checks if a PDF reader app is installed and does the follwing:

Note- For Publish on play store App , choose “Start in locked mode” in firebase than proceed the work.

<img decoding=

Note- For No publish app on play store only for texting purpose than choose “Start in Test mode ” in firebase than proceed the work.

<img decoding=

If a reader is installed, download the PDF file to the device and start a PDF reader app
If no reader is installed, ask the user if he wants to view the PDF file online through Google Drive

Download Source Code

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 application.

Conclusion

We have successfully created a PDF Reader Android application using Android Studio.


Cheers!


Don’t Forget to Share this Post.

READ MORE

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top