I need an urgent help, I'm following tutorial in: https://seap.samsung.com/html-docs/android/Content/tutorial-upgrade-work...

to provision PO (success) then activate KPE (success) then upgrade PO to KNOX Workspace and try some KNOX policy.

I'm following the tutorial and all good until I try to: calling KNOX Policy --> in this case is set camera policy:

the high level process is like this:

  1. activate PO --> success
  2. Go to Work profile, and run the agent (the agent will be duplicated to work profile)
  3. activate KPE --> Success
  4. trigger / set camera policy
  5. Toggle container Camera --> failed
    it said "java.lang.SecurityException: Profile is not a knox premium user 10 ContectInfo.uid 1010304"

I'm running/Testing on: Note 9 (N960F) -- Build No: N960FXX2ARK3 -- Android 8.1.0 -- KNOX Version 3.2 -- KNOX API Level 26

What possibly went wrong here?

I share my overall code here: https://github.com/on3nx/Samsung-KNOX-KPE/tree/master/DOPO/DOPO

Please let me know where am I missed.


thank you and appreciate the helps!

Jay H.Samsung SEAP Moderator
Jan 17, 2019
2:11 am

Hi Andre,

You are seeing that error because your Android for Work profile needs to be upgraded to a Knox workspace before you can call setCameraEnabled() API. The profile is upgraded to Knox workspace when you activate a license. But in this case, there are two missing permissions preventing that from happening:

<uses-permission android:name="com.samsung.android.knox.permission.KNOX_APP_MGMT" />
<uses-permission android:name="com.samsung.android.knox.permission.KNOX_CONTAINER" />

Once you add this to your manifest file and rebuild your app, your workspace should be upgraded to a container when activating the license.