Run 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:
- 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 tapping Settings > About device > Build Number (tap 7 times).
- Turn on USB debugging on your device by tapping Settings > Developer options > USB debugging.
- In Android Studio, with your project open, click Run > Run ‘app’ (or Shift + F10).
- Under Connected Devices, select the device you want to load and test on.
Use the app
-
When the app launches, tap CREATE MANAGED PROFILE
-
Once work profile provisioning is complete, go to the app on the workspace side and tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.
-
Tap TOGGLE PROFILE CAMERA.
-
Now that you have disabled the camera, try to launch it on your device. The message “Security policy prevents use of Camera.” is shown.
-
To re-enable the Camera, tap TOGGLE PROFILE CAMERA again.
-
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
Congratulations! You’ve completed the tutorial.
On this page
Is this page helpful?