Menu

Kiosk using Container Only Mode

In addition to basic Kiosk mode and more powerful ProKiosk mode, you can use Knox Container Only Mode (COM) to simulate a kiosk.

About Container Only Mode

This a special use case for enterprise-owned devices, where you want to restrict access to the personal mode of the device.

For example, a company purchases a Samsung Knox device specifically for business use and does not want users to have access to the personal side. Normally when you install a Knox container on a device, you get two spaces: a secure Knox container space with enterprise apps and a personal mode, which is the original device launcher where your personal apps and data reside.

When you install a COM container on a device, it is the only launcher, home screen, and apps folder that the user can access. The COM container looks the same as the familiar Knox container, but the user cannot switch to a personal mode, as access to the personal mode home screen, launcher, and apps is completely disabled, although the user does have access to the Phone and Messages apps.

Create COM container with default settings

This creates a COM container with the default settings.

  1. Create a Knox container using the Container Only Mode
  2. Call hideSystemBar() to hide the system bar
KnoxContainerManager.createContainer("knox-b2b-com");
KnoxContainerManager kcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
KioskMode kMode = kcm.getKioskMode();
kMode.hideSystemBar(true);

Clone a COM container

You can also create and customize a container with the clone method. When you clone a container, you select one of the default container types and then add your desired features to it. For example, you may want to change the default password length from 8 characters to 4, or add some custom apps upon creation.

  1. Create a new KnoxConfigurationType
  2. Install the Calendar and Contacts apps
  3. Hide the system bar:
  4. Create the custom COM container
  5. Disable an app such that it is not visible on the launcher:
  6. Install an app from SD card:
  7. Install an app that is already downloaded or sideloaded onto the device:
KnoxConfigurationType typeobj = KnoxContainerManager.getConfigurationTypeByName("knox-b2b-com");
KnoxConfigurationType  newType  = typeobj.clone("custom-b2b-com");

List<String> appList = new ArrayList<String>();
appList.add("com.android.calendar");
appList.add("com.android.contacts");
newType.setAppInstallationList(appList);

if(newType instanceOf ContainerModeConfigurationType){
        newType.setHideSystemBar(true);
   }

KnoxContainerManager.addConfigurationType(Context, newType);
KnoxContainerManager.createContainer("custom-b2b-com");

KnoxContainerManager kcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
ApplicationPolicy aPolicy = mcm.getApplicationPolicy();
aPolicy.setDisableApplication("<app package name>");

KnoxContainerManager mcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
ApplicationPolicy aPolicy = mcm.getApplicationPolicy();
aPolicy.installApplication("/mnt/sdcard/test.apk", true/false);

KnoxContainerManager mcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
ApplicationPolicy aPolicy = mcm.getApplicationPolicy();
aPolicy.installApplication("package name");
Share it: