Menu

Run the Sample app

Congratulations! You have now finished implementing the (Undefined variable: Variables.KnoxSDK) into an app. This section covers how to compile and run the app. This section covers how to compile and run the app.

Compile the app

Android Studio provides two ways to compile and test your app:

  1. On an Android Virtual Device (AVD).
  2. On a physical Samsung device.

The Knox SDK must be tested on a physical Knox supported device, as the Android studio emulator does not support Knox features.

  1. Plug your Samsung device into your computer.
  2. Enable developer options on your device by clicking Settings > About device > Build Number (tap 7 times).
  3. Turn on USB debugging on your device by clicking Settings > Developer options > USB debugging.
  4. In Android studio , with your project open, click Run > Run 'app' (or Shift + F10).
  5. Choose the device you want to load and test on under Connected Devices.


Use the app

  1. When the app launches, tap ACTIVATE ADMIN.
  2. In the pop-up prompt, tap Activate.
  3. Tap ACTIVATE LICENSE to verify your Knox license.

  4. Tap SET CCM PROFILE. This brings a dialog box asking whether to whitelist all the packages or no.

    If user taps the YES option, the CCM profile is immediately set as shown below.

    If the NO option is tapped, the user is prompted to select packages to be whitelisted as shown below.

  5. Tap on GET CCM PROFILE to see the current CCM Profile.

  6. Tap DELETE CCM PROFILE to delete the current CCM Profile.

  7. Next, click GET DEFAULT CERTIFICATE ALIAS to see alias of the default certificate in the logview.

  8. Now, tap INSTALL CERTIFICATE, which pops up the following configuration box.

  9. Enter a certificate alias, mark required CheckBoxes and click the CONFIRM button. This brings another dialog box which prompts the user for certificate path and password. Fill in the details and click CONFIRM to install the certificate.

  10. The user can delete the certificate by tapping on DELETE CERTIFICATE. The user is prompted to input the certificate alias.

  11. Tap ADD PACKAGE TO EXEMPT LIST, REMOVE PACKAGE FROM EXEMPT LIST or IS CCM POLICY ENABLED FOR A PACKAGE. The following dialog boxes show up asking user to input a package name to add/remove to/from the exempt list or check if the CCM policy is enabled for that package.
  12. Tap TOGGLE TIMA KEYSTORE to enable/disable TIMA Keystore.

  13. Tap IS TIMA KEYSTORE ENABLED to see its status in the logview.

Uninstall the app

To uninstall an app with device administrator status, you must first disable the app via the security settings screen.

To deactivate device administrator for the app:

  1. Select Settings > General > Security > Device Administrators, then tap the app you want to deactivate.
  2. The app can now be uninstalled normally.

Tutorial Progress

You are done the tutorial. Congratulations!