Since: API level 12
public class

ContainerModeConfigurationType

extends KnoxConfigurationType
java.lang.Object
   ↳ com.samsung.android.knox.container.KnoxConfigurationType
     ↳ com.samsung.android.knox.container.ContainerModeConfigurationType

Class Overview

Interface for managing a Container only mode configuration type.

Usage

This class is used to manage a configuration type only targeted for a special container, commonly refered as COM(Container only mode) container. An instance of this type can be created by cloning (clone(String)) an instance of ContainerModeConfigurationType object.

A pre-provisioned ContainerModeConfigurationType, with a name "knox-b2b-com" is available for MDMs to use or clone from. Another way to access these pre-provisioned objects would be to access getConfigurationTypes() and then going over each object and checking the instantiating class using instanceOf operator. Please refer to KnoxConfigurationType for more details.

Since
API level 12
KNOX 2.1

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
void allowClearAllNotification(boolean allow)
API to allow/disallow the clear all notification in the container.
void allowHomeKey(boolean allow)
API to allow/disallow the use of Home key in the container.
void allowSettingsChanges(boolean allow)
API to allow/disallow Setting change in the container.
void allowStatusBarExpansion(boolean allow)
API to allow/disallow Statusbar expansion in the container.
ContainerModeConfigurationType clone(String name)
API to return a new ContainerModeConfigurationType object by cloning it from another existing ContainerModeConfigurationType object.
boolean isClearAllNotificationAllowed()
API to check if clear all notification is allowed in container.
boolean isHideSystemBarEnabled()
API to check if system bar is enabled in container.
boolean isHomeKeyAllowed()
API to check if use of Home key is allowed in container.
boolean isSettingChangesAllowed()
API to check if Setting changes is allowed in container.
boolean isStatusBarExpansionAllowed()
API to check if Statusbar expansion is allowed in the container.
boolean isWipeRecentTasksEnabled()
API to check if wipe recent tasks enabled in container.
void setHideSystemBar(boolean enabled)
API to enable/disable system bar in the container.
void setWipeRecentTasks(boolean enabled)
API to enable/disable wipe recent tasks in the container.
[Expand]
Inherited Methods
From class com.samsung.android.knox.container.KnoxConfigurationType
From class java.lang.Object
From interface android.os.Parcelable

Public Methods

public void allowClearAllNotification (boolean allow)

Since: API level 12

API to allow/disallow the clear all notification in the container.

Since
API level 12
KNOX 2.1

public void allowHomeKey (boolean allow)

Since: API level 12

API to allow/disallow the use of Home key in the container.

Since
API level 12
KNOX 2.1

public void allowSettingsChanges (boolean allow)

Since: API level 12

API to allow/disallow Setting change in the container.

Since
API level 12
KNOX 2.1 NOTE: Since KNOX 2.3, this API is not supported as Container shares global Settings application.

public void allowStatusBarExpansion (boolean allow)

Since: API level 12

API to allow/disallow Statusbar expansion in the container.

Since
API level 12
KNOX 2.1

public ContainerModeConfigurationType clone (String name)

Since: API level 12

API to return a new ContainerModeConfigurationType object by cloning it from another existing ContainerModeConfigurationType object.

Returns
  • ContainerModeConfigurationType object.
Usage


 try {

     ContainerModeConfigurationType predefinedConfiguration = KnoxContainerManager.getConfigurationTypeByName("knox-b2b-com");

     ContainerModeConfigurationType newConfig = predefinedConfiguration.clone("custom-configuration"); //Clones and assigns a new name

     ArrayList appList = newConfig.getAppInstallationList();

     appList.add("com.custom.app");

     newConfig.setAppInstallationList(appList);

     KnoxContainerManager.addConfigurationType(newConfig);

 } catch (RemoteException e) {

     Log.e(TAG, "UnsupportedOperationException: " + e);

 }

 

Since
API level 12
KNOX 2.1

public boolean isClearAllNotificationAllowed ()

Since: API level 12

API to check if clear all notification is allowed in container.

Since
API level 12
KNOX 2.1

public boolean isHideSystemBarEnabled ()

Since: API level 12

API to check if system bar is enabled in container.

Since
API level 12
KNOX 2.1

public boolean isHomeKeyAllowed ()

Since: API level 12

API to check if use of Home key is allowed in container.

Since
API level 12
KNOX 2.1

public boolean isSettingChangesAllowed ()

Since: API level 12

API to check if Setting changes is allowed in container.

Since
API level 12
KNOX 2.1 NOTE: Since KNOX 2.3, this API is not supported as Container shares global Settings application.

public boolean isStatusBarExpansionAllowed ()

Since: API level 12

API to check if Statusbar expansion is allowed in the container.

Since
API level 12
KNOX 2.1

public boolean isWipeRecentTasksEnabled ()

Since: API level 12

API to check if wipe recent tasks enabled in container.

Since
API level 12
KNOX 2.1

public void setHideSystemBar (boolean enabled)

Since: API level 12

API to enable/disable system bar in the container.

Since
API level 12
KNOX 2.1

public void setWipeRecentTasks (boolean enabled)

Since: API level 12

API to enable/disable wipe recent tasks in the container.

Since
API level 12
KNOX 2.1