Back to top

Install the SDK

Download the SDK

  1. Sign in to the Knox Developers portal.

  2. In the Knox Developers dashboard, click SDK Tools > SDK Downloads.

  3. On the SDK Downloads page, click Download for the SDK you want.

  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. Copy the extracted Knox SDK JAR to the add-ons folder of your integrated development environment (IDE). For Android Studio, the add-ons folder is located in AppData \ Local \ Android \ sdk \ add-ons.

Create your Android Project

  1. Open Android Studio.

  2. Create a new project. Click File > New Project.

  3. Fill out the fields:

    1. Application name — your app name.

    2. Company Domain — the qualifier for your app package name.

    3. Package name — this is the combination of the company domain and application name, which must be unique across all packages in the Android environment. Android generates this from the application name and company domain values.

    4. Project location — the directory where your app is stored. You can use the default or specify another location, if desired.

  4. Click Next.

    android new project

  5. Select Phone and Tablet as your platform.

  6. Select the API level you want to target.

    target android

    • For details about which Android version maps to which Knox SDK versions, see Knox version mapping.

    • If you target API level 26 or lower, you must later include the Knox supportlib.jar. This is for backwards compatibility, as earlier Knox platforms don’t support the namespaces in the Knox SDK v3.x.

  7. Select your activity type and click Next. For the purpose of this tutorial, select Empty Activity. For more information on Activities, see Android Activities.

  8. Choose an Activity Name and Layout Name. Click Finish. For the purpose of this tutorial, accept the default Activity Name and Layout Name. Click Finish.

    empty act

For more information on creating an Android project, see Google’s Create an Android project.

Add Knox libraries to a project

  1. Open the project in Android Studio.

  2. Use a file browser to navigate to the location that the library files are stored.

  3. Select the knoxsdk.jar and click Copy.

    • If you previously targeted API level 26 or lower, you must also include the supportlib.jar. This is for backwards compatibility, as earlier Knox platforms don’t support the namespaces in the Knox SDK v3.x.

      knox sdk copy

  4. Switch to your Android Studio project, select the libs directory, and Paste the libraries into your project. If you do not see the libs directory, ensure your file browser is using ‘Project’ view rather than ‘Android’ view. You may have to create this folder yourself.

    libs android studio

  5. Click OK to complete copying the libraries into the project. The libraries in your project are displayed in the libs directory.

  6. Select and right-click the library you just copied. Click Add As Library…

  7. Select the module to add the library to, and click OK. If your app contains several modules, you must ensure that you add the library to the appropriate module. For the purpose of this tutorial, select the app module.

    create library

Your project now includes the Knox SDK.

Is this page helpful?