Run 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:
- 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.
- On your device, navigate to Settings > About device, then tap Build Number seven times to enable developer options.
- Tap Settings > Developer options > USB debugging to turn USB debugging on.
- In Android Studio, with your project open, click Run > Run ‘app’ (or Shift + F10).
- Under Connected Devices, choose your test device.
Use the app
When the app launches, tap ACTIVATE ADMIN
In the pop-up prompt, tap Activate.
Tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.
Tap ACTIVATE BACKWARDS COMPATIBLE KEY if needed.
Tap SET CCM PROFILE. A dialog box appears, asking the user if they want to whitelist all the packages.
If the user taps YES, the CCM profile is immediately set, as shown below.
If the user taps NO, they are prompted to select the packages they want to whitelist, as shown below.
Tap GET CCM PROFILE to see the current CCM profile.
Tap DELETE CCM PROFILE to delete the current CCM profile.
Next, tap GET DEFAULT CERTIFICATE ALIAS to see the alias of the default certificate in the logview.
Now, tap INSTALL CERTIFICATE to show the following configuration box:
Enter a certificate alias, select the required check boxes, and tap CONFIRM. Another dialog box appears, which prompts the user for a certificate path and password. Fill in the details and tap CONFIRM to install the certificate.
The user can delete the certificate by tapping DELETE CERTIFICATE, after which they are prompted to input the certificate alias.
Tap ADD PACKAGE TO EXEMPT LIST, REMOVE PACKAGE FROM EXEMPT LIST or IS CCM POLICY ENABLED FOR A PACKAGE. The following dialog boxes appear, asking the user to input a package name to add or remove from the exempt list, or check if the CCM policy is enabled for that package.
Tap TOGGLE TIMA KEYSTORE to enable or disable the TIMA Keystore.
Tap IS TIMA KEYSTORE ENABLED to see the TIMA Keystore’s status in the logview.
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.
Congratulations! You’ve completed the tutorial.
Is this page helpful?
Thank you for your feedback!