Back to top

Tutorial - Run the Sample app

Congratulations! You have now finished upgrading your Android P.O to a Knox Workspace. 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.

    Select Deployment Target dialog box

Use the app

  1. When the app launches, tap CREATE MANAGED PROFILE.

  2. Tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.

  3. Tap TOGGLE CONTAINER CAMERA.

  4. Now that you have disabled the camera, try to open it on your device. It displays the message Security policy prevents use of Camera.

  5. To re-enable the Camera, re-tap TOGGLE CAMERA.

  6. TAP ENFORCE MULTI_FACTOR AUTHENTICATION to enable multi factor authentication for container. When this policy is enforced more than one form of authentication is required to enter the container. As an example, user is required to authenticate finger print and also required to authenticate one of the device unlock methods chosen among pattern/pin/password.

    KPE Workspace

    Select Deployment Target dialog box

Tutorial progress

You’ve completed the tutorial. Congratulations!

Is this page helpful?