Menu

Run the sample app

Congratulations! You have now finished upgrading your Android work profile 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 tapping Settings > About device > Build Number (tap 7 times).
  3. Turn on USB debugging on your device by tapping Settings > Developer options > USB debugging.
  4. In Android Studio, with your project open, click Run > Run 'app' (or Shift + F10).
  5. Under Connected Devices, select the device you want to load and test on.


Use the app

  1. When the app launches, tap CREATE MANAGED PROFILE
  2. Once work profile provisioning is complete, go to the app on the workspace side and tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.
  3. Tap TOGGLE PROFILE CAMERA.
  4. Now that you have disabled the camera, try to launch it on your device. The message "Security policy prevents use of Camera." is shown.
  5. To re-enable the Camera, tap TOGGLE PROFILE CAMERA again.
  6. Tap ENFORCE MULTI-FACTOR AUTHENTICATION to enable multi-factor authentication for the workspace. When this policy is enforced, more than one form of authentication is required to enter the workspace. For example, the user may be required to authenticate with both biometrics and a device PIN.

Tutorial Progress

You are done the tutorial. Congratulations!

Share it: