Menu

Data sharing

There are different levels of data sharing you can enable or disable inside the container. Most of the following examples are disabled by default for security reasons.

Share calendar settings from the device side to the container

Set a policy to enable end-users to share calender from the device side to the container and vice-versa.

KnoxContainerManager mcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
RCPPolicy rPolicy = mcm.getRCPSyncPolicy();
List<String> appName = new ArrayList<String>();
appName.add(RCPPolicy.CALENDAR);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.IMPORT_DATA, true);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.EXPORT_DATA, false);

Share contacts from the device side to the container

Set a policy to enable end-users to share contacts from the device side to the container and vice-versa.

KnoxContainerManager mcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
RCPPolicy rPolicy = mcm.getRCPSyncPolicy();
List<String> appName = new ArrayList<String>();
appName.add(RCPPolicy.CONTACTS);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.IMPORT_DATA, true);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.EXPORT_DATA, true);

Disable shared notifications between device side and container.

Set a policy to disable shared notifications from the device side to the container and vice-versa.

KnoxContainerManager mcm = EnterpriseKnoxManager.getInstance().getKnoxContainerManager(context, containerid);
RCPPolicy rPolicy = mcm.getRCPSyncPolicy();
List<String> appName = new ArrayList<String>();
appName.add(RCPPolicy.CONTACTS);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.IMPORT_DATA, true);
rPolicy.setAllowChangeDataSyncPolicy(appName, RCPPolicy.EXPORT_DATA, true);

Display Contacts info from Business to Personal for incoming calls

Displays Knox caller ID for incoming calls when in personal mode.  Enabled by default, but controlled by a Knox setting.

EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
PhoneRestrictionPolicy phoneRestrictionPolicy = edm.getPhoneRestrictionPolicy();
phoneRestrictionPolicy.allowCallerIDDisplay(false)

More apps support

The More Apps feature supports the sharing of plain text and files in device using the isMoveFilesToOwnerAllowed policy.

Users can share content inside the container to apps outside the container—for example, share a photo with Facebook—using the following method: 

  • Select the desired photo or text file > Tap Share > Tap More Apps > Select to select a specific app to share a photo or text file.

You can enable the More apps sharing feature with the example code shared below.

EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance(context);
KnoxContainerManager kcm = ekm.getKnoxContainerManager(containerID)
ApplicationPolicy appPolicy = kcm.getApplicationPolicy();
appPolicy.setApplicationComponentState(new ComponentName("com.sec.knox.switcher", "com.sec.knox.switcher.B2CShareViaActivity"), true);

Note: To use this feature the RCPPolicy isMoveFilesToOwnerAllowed must be set to TRUE.

Add Workspace shortcut icon to device side

You can enable a feature that allows users to add a direct shortcut to an application inside the container on the device side.

This API consists of two controllable components: a package name, and the class name. The package name is mandatory, the class name is optional.

String pkgName = "com.android.browser";
String clsName = null; //or classname
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance(context);

KnoxContainerManager kcm = ekm.getKnoxContainerManager(containerID);
ContainerConfigurationPolicy ccp = kcm.getContainerConfigurationPolicy();
ccp.addHomeShortcutToPersonal(pkgName,clsName);

If you leave the class name as null, the API adds a shortcut based on information of the package name only.

Remove Workspace shortcut icon from device side

This API consist of 2 controllable components: a package name, and the class name. The package name is mandatory, the class name is optional.

public boolean deleteHomeShortcutFromPersonal(String pkgName, String clsName)

Enable or disable container access to external SD Card

EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance(context);
KnoxContainerManager kcm = ekm.getKnoxContainerManager(containerID)
ContainerConfigurationPolicy ccp = kcm.getContainerConfigurationPolicy();
ccp.enableExternalStorage(true);