Menu

Introduction

In January 2018, we introduced a new consolidated Knox SDK v3.0. This SDK now includes the legacy Knox Standard, Premium, Customization, ISV, UCM, and VPN SDKs. In this tutorial, we'll show how to migrate an app that was using a legacy Knox SDK v2.x to the latest Knox SDK v3.x. For details, about the changes in the v3.0 SDK, see What's new in Knox SDK 3.0.

Caution: You must stop using the legacy Knox SDKs and their old namespaces before deploying on devices with Android 10 (Q). If you do not migrate to the Knox SDK and new namespace before Android 10, your app will no longer work!

New namespace

One key change in v3.x is the use of a new namespace. Here is a code sample showing an app importing Knox packages with the old namespace:

import android.app.enterprise.EnterpriseDeviceManager;

import android.app.enterprise.license.EnterpriseLicenseManager;

import com.sec.enterprise.knox.container.KnoxContainerManager;

Here is how you would now import these packages using the new namespace:

import com.samsung.android.knox.EnterpriseDeviceManager;

import com.samsung.android.knox.license.EnterpriseLicenseManager;

import com.samsung.android.knox.container.KnoxContainerManager;

Updating an app to use the new namespace is straightforward, especially with an IDE like Android Studio, which can look up the class for an API method.

Although the old namespaces will be supported for some time, we strongly encourage you to update your existing apps now to avoid any future anomalies.

Requirements

  1. Samsung Knox SDK — This new consolidated SDK provides two JAR libraries:
    • knoxsdk.jar — This provides all the API methods in the Samsung Knox SDK, using the new namespace for its API methods, intents, and permissions.
    • supportlib.jar — This library provides backwards compatibility with older devices, translating the new namespace used by the Samsung Knox SDK to the old namespace recognized by the older devices.
  2. Samsung Android phones, with
    • Knox v3.0 or later — These devices have built-in support for the Samsung Knox SDK and can recognize the new namespace being used by its API methods, intents, and permissions. For these phones, you need to compile only the knoxsdk.jar.
    • Knox v2.9 or earlier — These older devices don’t recognize the new namespace. You can compile the supportlib.jar into your app and test to ensure that your updated app works on older devices.
  3. Knox Platform for Enterprise license — This KPE license replaces the legacy licenses (ELM, KLM, ISV). To generate a license, see Get a license.

Tutorial Progress

You are 1/4 done! Go to the next step.