Sayaji Kadam
Dec 11, 2018
12:01 pm


We migrate our app from Premium Knox SDK to Knox SDK facing following problems -

RestrictionPolicy class depricated following methods - 
 - setUsbMassStorage, setBluetoothState, setWiFiState, setNonTrustedAppInstallBlock

I searched in API reference but not find optional method for this.

Please provide me alternative method for above mentioned.


Similar topics

No similar topics found.
Jenna Slomowitz
Selected Answer
Dec 12, 2018
6:51 pm

Hello Sayaji,

Here are the methods in the Knox SDK: setUsbMAssStorageState, setBluetoothState, setWiFiState, setNonTrustedAppInstallBlock.

Best regards,


Sayaji Kadam
Jan 09, 2019
5:47 am

Hello Jenna,

I used setwifistatus and getting following error -

Caused by: java.lang.NoSuchMethodError: setWifiState(boolean, java.lang.String, java.lang.String, java.lang.String) method from class is only supported from API level 15 and above (current is 11)

And below my code -

try {
    CustomDeviceManager cdm = CustomDeviceManager.getInstance();
    SettingsManager kcsm1 = cdm.getSettingsManager();
    kcsm1.setWifiState(true, null, null, null);
} catch (SecurityException e) {
    DvBancLog.d("SecurityException: " + e);
} catch (Exception e) {
    DvBancLog.d("Exception: " + e);

I activate backword compatibility license also.

My device knox api is 11.



Hi Sayaji,

The method setWifiState() was introduced in API level 17. There is no adjacent method in API level 11 that a backwards compatible key can map to. In order to use this method you will need to use a device that runs Knox API 17 or higher. 



Mikayla N.Jan 28, 2019 at 9:27 pm
Sayaji Kadam
Jan 28, 2019
10:16 am


We used setUsbMAssStorageState api for stop usb mass storage state is working fine. But this api is a part of KPE premium (Paid).

Please provide me anu other api if available which are belong with KPE Standard.