Menu

Run the Sample app

Congratulations! You have successfully implemented the Knox SDK into an 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. On your device, navigate to Settings > About device, then tap Build Number seven times to enable developer options.
  3. Tap Settings > Developer options > USB debuggingto turn USB debugging on.
  4. In Android Studio, with your project open, click Run > Run 'app' (or Shift + F10).
  5. Under Connected Devices, choose your test device.


Use the app

  1. When the app launches, tap ACTIVATE ADMIN.
  2. In the pop-up prompt, tap Activate.
  3. Tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.
  4. Tap ACTIVATE BACKWARDS COMPATIBLE KEY if needed.
  5. Tap SHOW ENABLED APPS to see the list of enabled apps.
  6. Tap SHOW DISABLED APPS to see the list of disabled apps.
  7. Tap ENABLE DISABLED APPS to enable all disabled apps.
  8. To enable/disable an application, tap ENABLE GIVEN APP or DISABLE GIVEN APP and enter its package name.
  9. To add or remove an application from the battery optimization whitelist, tap TOGGLE BATTERY WHITELIST and enter its package name.
  10. To add or remove an application from the force stop blacklist, tap TOGGLE FORCE STOP BLACKLIST and enter its package name.

Uninstall the app

To uninstall an app with device administrator status, you must first deactivate its device admin privileges.

To deactivate device administrator for the app, tap DEACTIVATE ADMIN. The app can now be uninstalled normally.

Tutorial Progress

You have completed the tutorial. Congratulations!

Share it: