Some test text!

Search
Hamburger Icon

Android / FAQ / How do I integrate the Apryse libraries from source?

How to integrate the Apryse libraries from source

The source code for the Tools library can be integrated into your Android app and further customized to meet your needs.

Integrate Apryse libraries from source

Prerequisites

  • An existing Android Studio project running in the latest version of Android Studio
  • Minimum API: 16 (using AndroidX)
  • Compile API: 34
  • Recommended target API: 34
  • Downloaded the Apryse Android SDK:

Download the SDK

This guide will help you integrate the Tools library with your Android Studio project.

  1. Add the following lines in your project's root-level build.gradle file.

    allprojects {
        repositories {
            // ...
            flatDir {
                dirs '../libs'
            }
        }
    }
    
    // ...
    ext.mySupportVersion = "1.3.1"
    ext.myBuildToolsVersion = "30.0.2"
    ext.myMinSdkVersion = 16
    ext.myTargetSdkVersion = 34
    ext.myCompileSdkVersion = 34
    
    ext.pdfnetGroup = { dependencyHandler ->
        delegate = dependencyHandler
    
        implementation "com.pdftron:pdftron@aar"
    }
    
    ext.supportLibGroup = { dependencyHandler ->
        delegate = dependencyHandler
    
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.appcompat:appcompat:$ext.mySupportVersion'
        implementation 'androidx.recyclerview:recyclerview:1.2.1'
        implementation 'com.google.android.material:material:1.5.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
        implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
        implementation "androidx.preference:preference:1.1.0"
    
        implementation "commons-io:commons-io:2.4"
        implementation "org.apache.commons:commons-lang3:3.5"
        implementation "com.google.code.gson:gson:2.8.0"
        implementation "io.reactivex.rxjava2:rxjava:2.2.2"
        implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
        implementation "com.github.clans:fab:1.6.4"
        implementation "androidx.exifinterface:exifinterface:1.3.3"
        implementation "com.squareup.picasso:picasso:2.71828"
        implementation "org.ccil.cowan.tagsoup:tagsoup:1.2.1"
    
        implementation 'androidx.multidex:multidex:2.0.1'
        implementation "androidx.room:room-runtime:2.4.2"
        annotationProcessor "androidx.room:room-compiler:2.4.2"
    }
  2. Create a new folder named libs in your project's root directory, then copy the following files from the SDK package to this folder:

  3. Open your project in Android Studio and go to File > New > Import Module... Import the lib\src\PDFViewCtrlTools library modules from the SDK package into your project.

  4. Finally, add the MultiDex and Apryse library dependencies to your app by adding the following to your app's module level build.gradle file:

    android {
        defaultConfig {
            // ...
            multiDexEnabled true
            vectorDrawables.useSupportLibrary = true
        }
    }
    
    dependencies {
        // ...
        pdfnetGroup dependencies
        supportLibGroup dependencies
        
        implementation project(':PDFViewCtrlTools')
    }

Your project is now running Apryse from source and you can start modifying the Apryse Android libraries in your project.

Next Steps

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales