Skip to content

Integration

Add the capture library to the project

To integrate the capture library into your project, follow these steps:

  1. Copy the iad folder from the release archive into the root directory of your project.
  2. Add ":iad" to the include statement in settings.gradle.kts:

    include(":iad")
    

Dependencies

To ensure the library functions correctly, add the required dependencies to your Gradle file.

16 KB Memory Page Support

If you need support for 16 KB memory pages, use the following dependencies.

More information: Android Memory Page Sizes

Kotlin

dependencies {
    implementation(project(":iad", configuration = "default"))
    implementation("androidx.camera:camera-camera2:1.4.0")
    implementation("androidx.camera:camera-core:1.4.0")
    implementation("androidx.camera:camera-lifecycle:1.4.0")
    implementation("androidx.camera:camera-view:1.4.0")
    implementation("com.google.protobuf:protobuf-javalite:3.20.1")
    implementation("com.google.protobuf:protobuf-kotlin-lite:3.20.1")
}

Groovy

dependencies {
    implementation(project(':iad', configuration: 'default'))
    implementation 'androidx.camera:camera-camera2:1.4.0'
    implementation 'androidx.camera:camera-core:1.4.0'
    implementation 'androidx.camera:camera-lifecycle:1.4.0'
    implementation 'androidx.camera:camera-view:1.4.0'
    implementation 'com.google.protobuf:protobuf-javalite:3.20.1'
    implementation 'com.google.protobuf:protobuf-kotlin-lite:3.20.1'
}

4 KB Memory Page Support

If you only need support for 4 KB memory pages, use the following dependencies.

More information: Android Memory Page Sizes

Kotlin
dependencies {
    implementation(project(":iad", configuration = "default"))
    implementation("androidx.camera:camera-camera2:1.2.3")
    implementation("androidx.camera:camera-core:1.2.3")
    implementation("androidx.camera:camera-lifecycle:1.2.3")
    implementation("androidx.camera:camera-view:1.2.3")
    implementation("com.google.protobuf:protobuf-javalite:3.20.1")
    implementation("com.google.protobuf:protobuf-kotlin-lite:3.20.1")
}
Groovy
dependencies {
    implementation(project(':iad', configuration: 'default'))
    implementation 'androidx.camera:camera-camera2:1.2.3'
    implementation 'androidx.camera:camera-core:1.2.3'
    implementation 'androidx.camera:camera-lifecycle:1.2.3'
    implementation 'androidx.camera:camera-view:1.2.3'
    implementation 'com.google.protobuf:protobuf-javalite:3.20.1'
    implementation 'com.google.protobuf:protobuf-kotlin-lite:3.20.1'
}

Final Step

Make sure to sync your project with the Gradle files by clicking the elephant icon in the top-right corner of Android Studio.