Back to top

Install Knox Capture SDK

After you’ve installed Android Studio, and set up your Android development environment, you can begin with downloading and installing the Knox Capture SDK.

In order to download the Knox Capture SDK, you’ll need to have a valid Samsung Knox Partner Program account. If you don’t have an account, you can enroll in the Samsung Knox Partner Program as a developer by following the instructions on our partner documentation site.

Download the Knox Capture SDK.aar file

The Knox Capture SDK.aar file can be downloaded from the Knox Developers console. To do this:

  1. Go to and sign in with your Samsung account.
  2. On the Knox Developers console, go to SDK Tools Downloads.
  3. Locate the Knox Capture SDK, then click Download.
  4. Review the SDK Agreement. If you agree to the terms, select the checkbox and click Accept. The browser saves the SDK package into your Downloads folder.
  5. Navigate to your downloads and extract the contents of the SDK folder.

Install the Knox Capture SDK.aar file

To install and use the Knox Capture SDK, you’ll need to add the SDK’s.aar file to your Android Studio project. The.aar file for the Knox Capture SDK can be found in the root folder after unzipping.

After you locate the.aar file, follow the instructions on Android Studio’s documentation page regarding library creation.

Gradle configuration instead of IDE

For developers who are more comfortable with gradle code configuration than with using an IDE, you can instead add the dependencies for the Knox Capture SDK Android libraries to your module’s app-level gradle file, which is usually app/build.gradle.

For bundling the model with your app:

    dependencies {
        // Use this dependency to bundle the model with your app
        implementation fileTree(dir: 'libs', include: ['knoxcapture-sdk-1.0.0.aar'])

However, if you are using gradle code, the Knox Capture SDK will have some dependencies on the cameraX library. You will need to add the following cameraX library in your gradle file (please put your preferred version number for the camerax_version variable) :

    def camerax_version = "1.1.0"
    implementation "${camerax_version}"
    implementation "${camerax_version}"
    implementation "${camerax_version}"
    implementation "${camerax_version}"
    implementation "${camerax_version}"

Camera permission requirement

Android developers must explicitly grant permission for each app to access the device camera. Your app needs to declare the Camera permission in the AndroidManifest.xml file, and request it when running the app so the user can grant or deny the permission. Refer to Android’s documentation on requesting runtime permissions to request the android.permission.CAMERA permission.

Is this page helpful?