Setting up realtime document collaboration in Android
Prerequisites
Minimum API: 21
Java 8
Step 1: Integration
Integrate collaboration package with Gradle
Integrate Apryse core and the tools library as described in our Gradle get started guide.
In your app module's
build.gradlefile (usuallyapp/build.gradle), set theminSdkVersionto 21+ and enable compatibility for Java 8 features. Then, add the dependency for Apryse's collaboration package:
android {
defaultConfig {
minSdkVersion 21
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation "com.pdftron:collab:11.0.0"
}Integrate collaboration package manually
Integrate Apryse core and tools packages as described in Android manual integration guide.
Copy
pdftron-collab.aardirectly into your app module'slibsdirectory. You will see other Apryse AARs here such aspdftron.aarandtools.aarIn your app module's
build.gradlefile (usuallyapp/build.gradle), make sure theminSdkVersionis 21+ using Java 8 features. And add a dependency to Apryse collaboration package:
Step 2: Add the viewer
Update your
AndroidManifest.xmlas described in Step 1 of this guide.Create the
CollabViewerTabHostFragment2, and start it like any other Android Fragment.
where R.id.fragment_container is the resource id of a layout in your activity that will contain your fragment:
For example:
Next steps
Last updated
Was this helpful?