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:
- On an Android Virtual Device (AVD).
- 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.
Plug your Samsung device into your computer.
Enable developer options on your device by clicking Settings > About device > Build Number (tap 7 times).
Turn on USB debugging on your device by clicking Settings > Developer options > USB debugging.
In Android Studio, with your project open, click Run > Run ‘app’ (or Shift + F10).
Choose the device you want to load and test on under Connected Devices.
Use the app
When the app launches, tap CREATE MANAGED PROFILE.
Tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.
Tap TOGGLE CONTAINER CAMERA.
Now that you have disabled the camera, try to open it on your device. It displays the message Security policy prevents use of Camera.
To re-enable the Camera, re-tap TOGGLE CAMERA.
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.
You’ve completed the tutorial. Congratulations!
Is this page helpful?
Thank you for your feedback!