Back to top

How to allow access to Wi-Fi/WLAN in ProKiosk mode with the Knox SDK

Environment

Knox SDK

Overview

If you want to restrict your devices to a single application, you must disable the status bar and Settings app to prevent users from leaving the application. These users may need to connect to a Wi-Fi or WLAN network manually, which requires access to Settings.

This article provides sample code to mask the Settings app so that users can only access the Wi-Fi/WLAN module.

How do I allow users access to Wi-Fi / WLAN in ProKiosk mode using the Knox SDK?

In your UEM solution, set ProKiosk mode as shown:

pkm.setProKioskState(true, "12345");
pkm.setSettingsEnabledItems(true, CustomDeviceManager.PRO_KIOSK_SETTINGS_WIFI)
pkm.setHomeActivity( "com.xxx.xxx");

Then, access the Wi-Fi/WLAN module using the code below:

Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
startActivity(intent);

Additional information

You may also want to disable the “Search bar” and “Samsung account” features in ProKiosk mode. To do so:

appPolicy.setApplicationComponentState( new ComponentName("com.android.settings", "com.android.settings.search.SearchResultTrampoline"), false);
appPolicy.setApplicationComponentState( new ComponentName("com.samsung.android.mobileservice", "com.osp.app.signin.ui.AccountView"), false);
appPolicy.setApplicationComponentState( new ComponentName("com.samsung.android.mobileservice", "com.samsung.android.samsungaccount.setting.ui.SettingMainPreference"), false);

In your Settings app, if the Contact us item is present under Connect > WLAN, you can also disable it with the code snippet below:

appPolicy.setApplicationComponentState( new ComponentName("com.samsung.android.voc", "com.samsung.android.voc.app.LauncherActivity"), false);
Back to KBAs

Is this page helpful?