Some test text!
Android / Guides / 1. Integrate
Welcome to Apryse. This guide will help you integrate a free trial of Apryse Android SDK into your Android Studio projects. You can either integrate Apryse packages automatically using Gradle, or install them manually using .aar files by downloading the SDK. Pick whichever your option you prefer, but integrating with Gradle is the recommended approach. Your free trial includes unlimited trial usage and support from solution engineers.
Project specifications:
android.useAndroidX=true
and android.enableJetifier=true
in your gradle.properties
file. For more, check out our FAQ about AndroidX .Create a new project on Android Studio called myApp
.
For the purposes of this guide, you can start with an Empty Activity
.
Open the settings.gradle
file located in your project's root directory and add the Apryse Maven repository:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url "https://pdftron-maven.s3.amazonaws.com/release"
}
jcenter() // Warning: this repository is going to shut down soon
}
}
Open the build.gradle
file in your app module's directory:
Edit it to add a dependency for the full version of Apryse:
android {
defaultConfig {
// ... Anything that was already here
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [pdftronLicenseKey:PDFTRON_LICENSE_KEY]
}
}
dependencies {
// ... Anything that was already here
implementation "com.pdftron:pdftron:10.12.0"
implementation "com.pdftron:tools:10.12.0"
implementation 'androidx.multidex:multidex:2.0.1'
}
In your project's root directory, find the gradle.properties
file. Copy the following line to it:
# Add the PDFTRON_LICENSE_KEY variable here.
# For trial purposes leave it blank.
# For production add a valid commercial license key.
PDFTRON_LICENSE_KEY=
Open your AndroidManifest.xml
file and add a <metadata>
tag inside the <application>
tag to be a placeholder for the license key:
<application>
<!-- Add license key in meta-data tag here. This should be inside the application tag. -->
<meta-data
android:name="pdftron_license_key"
android:value="${pdftronLicenseKey}"/>
</application>
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales