Alexandre Di Guida
Nov 17, 2015
3:53 pm

Error when using ProKiosk Mode

I'm trying to use the KNOX CUstomization SDK in my app for the ProKiosk Mode.

Bascialy I have done all the step here : <link>https://seap.samsung.com/developer/html-docs/html-doc/unzip/2203/en/Sams... Customization SDK Developer Guide/To develop a KNOX Customization.htm%3FTocPath%3DTo%2520develop%2520a%2520KNOX%2520Customization%2520app%7C_____0</link>

- Defined Permission in manifest
- Create an AdminReceiver class
- Code to activate the admin mode 
- Activate my ELM licence key 

But when I want to turn on/off the ProKioskMode I get a crash : Caused by: java.lang.ClassNotFoundException: Didn't find class "android.app.enterprise.knoxcustom.CustomDeviceManager" on path: DexPathList[[zip file "/data/app/com.my.package-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

 

So it's like the CusotmDeviceManager class is not found. In my code I don't have any problems to implent this :  

// Activation ProKiosk Mode
CustomDeviceManager cdm = CustomDeviceManager.getInstance();
ProKioskManager pkm = cdm.getProKioskManager();
result = pkm.setProKioskState(true, mPassCode);
// Disable ProKiosk Mode
CustomDeviceManager cdm = CustomDeviceManager.getInstance();
ProKioskManager pkm = cdm.getProKioskManager();
result = pkm.setProKioskState(false, mPassCode);

I have the good imports and no error :

import android.app.enterprise.knoxcustom.CustomDeviceManager;
import android.app.enterprise.knoxcustom.ProKioskManager;

 

Is someone have an idea of where could be the reseaon of this error ? Thank you.

Kieran McCormick
Nov 17, 2015
4:07 pm

Hi Alexandre,

This is most likely due to your device not supporting KNOX Customization Ver 2.5. When looking at the ProKioskManager class we can see that it was introduced in KNOX Customization version 2.5.

Please let me know the build number of the device you are testing with, this should be found in the "About device" menu in the settings app. Depending on how new your device is there may also be a KNOX version stated in this menu. With this information I will be able to further understand your issue.

As a side note, the method KnoxCustomManager.setSealedState() shouldn’t have any issues and has very similar behavior to ProKioskState.

Alexandre Di Guida
Nov 17, 2015
4:27 pm

Hi Kieran,

Thank you for your answer.

I'm using a galaxy tab S Model SM-T800 with the following build number: LRX22G.T800XXU1BOCC

I will also have a look on the Sealed mode.

Alexandre Di Guida
Nov 17, 2015
4:53 pm

I've implemented the sealedState mode.

KnoxCustomManager kcm = KnoxCustomManager.getInstance();
String defaultPassCode = "12345";
kcm.setSealedState(true, defaultPassCode);

But I get an exception : java.lang.SecurityException: Admin  does not have com.sec.enterprise.knox.permission.CUSTOM_SEALEDMODE

This exception is trigger on : kcm.setSealedState(true, defaultPassCode);

My app has been defined as a device administrator and I'm using the good permission :

<uses-permission android:name="com.sec.enterprise.knox.permission.CUSTOM_SEALEDMODE"/>
Kieran McCormick
Nov 17, 2015
5:17 pm

Hi Alex,

I believe that your device only supports KNOX Customization version 2.4. You can check this by calling:

CustomDeviceManager.SdkVersion.getSdkVersion().toString()

As for your error, this may be due to an issue with your license. If you visit this link: https://www.samsungknox.com/en/user

Can you see the "Check License Key" tool at the bottom of the page?

If you can, please enter your cSDK license into it and let me know how many activations it has. If it is something like 11/10 then you will need to create a new cSDK license.

Alexandre Di Guida
Nov 17, 2015
6:03 pm

Hi Kieran,

Cannot resovled methode : getSdkVersion() in :

CustomDeviceManager.SdkVersion.getSdkVersion().toString()

And I can't use (because of my current problem) : cdm.getSdkVersion().toString();

So I'm not sure how to check that.

I've tried with :

KnoxCustomManager kcm = KnoxCustomManager.getInstance();
String sdkversion = kcm.getKnoxCustomSdkVer().toString();

And here sdkversion = KNOX_CUSTOM_SDK_VERSION_2_4

On your website I've downloaded knox custom sdk v2.4.1 (Didn't find 2.4).

But the problem is now with this sdk version : cannot resolved CustomDeviceManager and cannot resolved ProKioskManager.

Also when I try to to your link I have to Log in and then I get this error :

Error message

You do not have a valid KNOX Portal account.

Thanks.

Comments

Hi Alex,

Please try to use this code for checking the cSDK version, the above code wasn’t copy/paste ready:

CustomDeviceManager csd = CustomDeviceManager.getInstance();
Log.v(TAG, "Customization Ver: " + csd.getSdkVersion().toString());

In order to resolve your other issue I will need more information. I would like to raise a customer support ticket for you so we can privately resolve this issue.

May I raise the ticket with the email you used to sign up for this forum?

Kieran McCormickNov 17, 2015 at 6:38 pm
Alexandre Di Guida
Nov 18, 2015
9:15 am

Hi Kieran,

Yes you can create a ticket with this email. Thank you very much

José Maurício
Feb 07, 2019
3:52 pm

I had the same problem and the solution was to associate the package name of the project ProKiosk Mode with my license.

Go to "Associate a package", select you license, click "extract package" so you can upload the apk of the project. The associated package should be: com.samsung.knox.example.prokioskmode

Thanks.