Android library integration¶
Add Android Capture Library to the project¶
To integrate the Android Capture library into your project, follow these steps:
-
Copy the
iad
folder from the release archive to the root directory of your project. -
Add
":iad"
to the include statement insettings.gradle.kts
(include(":iad")
).
Dependencies¶
For the library to function correctly, add the required dependencies to your Gradle file.
16KB memory page support ¶
If you need 16 KB memory page support, please use these dependencies. You can find more information about different memory page sizes in Android here.
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'
}
4KB memory page support¶
If you only need 4 KB memory page support, please use these dependencies. You can find more information about different memory page sizes in Android here.
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'
}
Finally, make sure to sync the project with Gradle files by clicking the elephant icon in the top-right corner of Android Studio.
Android version support¶
The Android capture library module supports its integration within systems that implement Androids API 26 or higher.