Set up the Knox SDK
On this page
The following instructions describe how to set up the Samsung Knox SDK. You must do this before you can use any of the Knox APIs on your Samsung device.
Download the Samsung Knox SDK
You can download the Knox SDK from the Samsung Enterprise Alliance Program website.
- Sign in to your SEAP account. If you're not already a member, enroll into SEAP.
- Open the Knox SDK page.
- Click DOWNLOAD SDK.
- Click Agree and Download to accept the terms of the SEAP Not for Resale Agreement Terms & Conditions.
The SDK is saved to your browser's downloads directory. Select the SDK zip file and extract its contents using your unzip tool.
- Copy the unzipped SDK directory to the SDK add-ons directory. This is normally located in AppData\Local\Android\sdk\add-ons
Create your Android Project
- Open Android studio and create a new project.
- Click File > New Project
- Fill out the fields:
- Application name: your app name.
- Company domain: the qualifier for your app package name.
- 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.
- Project Location: the directory where your app is stored. You can use the default or specify another location, if desired.
- Click Next.
- Select Phone and Tablet as your platform.
Select the API level you wish to target. API level 26 is the minimum you must target to utilize the full features of the Knox SDK. See Knox version mapping for more information. If you need to target lower than 26, you must use the add-on support library jar.
6. Select your activity type and click Next. For the purpose of this tutorial, select Empty Activity. For more information on Activities, see Android Activities.
7. Choose an Activity Name and Layout Name. Click Finish. For the purpose of this tutorial, use the default values – MainActivity and activity_main.
Now that you have set up your project, you can finish setting up the Knox SDK with the steps below.
NOTE – The Knox SDK includes a JAR library file called the knoxsdk.jar. You add this library to your Android Studio project if you want to enable your app to manage devices using the Knox SDK
For more information on creating a project in Android, see Google's page on how to Create an Android project.
Adding Samsung Knox SDK libraries to a project
Open the project in Android Studio.
Use a file browser to navigate to the location that the library files are stored.
- Select the
knoxsdk.jar and copy it.
- 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
- A copy dialog appears. Click OK to complete copying the libraries into the project.
- The libraries appear in your project under the libs directory:
- Select the library, right-click and select Add As Library...
- 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.
Your project now includes the Knox SDK.
You are done the tutorial! Congratulations.