App installation
Install an app
You can easily push an app onto a device or inside the Workspace container.
-
Create the `EnterpriseDeviceManager object.
-
Create
getApplicationPolicy
. -
Call
installApplication
and pass in your package name.//Create EnterpriseDeviceManager EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context); //Create app policy ApplicationPolicy appPolicy = edm.getApplicationPolicy(); //Install package appPolicy.installApplication("com.sample.packagename");
Add app package name to blocklist
You can also add an application package name to blocklist, so that an application with a matching application package name cannot be installed.
-
Create the
EnterpriseDeviceManager
object. -
Create
getApplicationPolicy
. -
Call
addAppPackageNameToBlackList
and pass in your package name.//Create EnterpriseDeviceManager EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context); //Create app policy ApplicationPolicy appPolicy = edm.getApplicationPolicy(); //block any app package name appPolicy.addAppPackageNameToBlackList("com.sample.packagename");
Create a Knox Workspace with pre-installed custom apps
The following examples create a Knox container that is pre-populated with custom apps. It also adds some extra security features.
- Sets the container with a lock timeout of thirty minutes.
- selects the authentication method of fingerprint.
- installs three apps into the container — Email, Calendar, Contacts.
To create a Knox Workspace with pre-installed custom apps, do the following.
-
Create a Knox Container.
-
Update the app installation list with email, calendar, and contacts.
-
Set the maximum inactivity time before the Knox container locks to 30 seconds.
- Set the password quality to the minimum quality allowed. Meaning when it is set to fingerprint quality, users can’t select a quality level less than this minimum setting; however users can select both PIN and Password.
-
Add the customized configuration to the configuration list.
- Use the unique name of above configuration to create container.
//Create a Knox container by cloning KnoxConfigurationType defaultConfig = KnoxContainerManager.getConfigurationTypeByName("knox-b2b"); KnoxConfigurationType newConfig = defaultConfig.clone("custom4"); //Add apps List<String> appList = new ArrayList<String> (); appList.add("com.android.email"); appList.add("com.android.calendar"); appList.add("com.android.contacts"); newConfig.setAppInstallationList(appList) //Set maximum lock time newConfig.setMaximumTimeToLock(30 * 60 * 1000); //Set password quality to fingerprint newConfig.setPasswordQuality(BasePasswordPolicy.PASSWORD_QUALITY_FINGERPRINT); //Apply configurations to cloned container KnoxContainerManager.addConfigurationType(this, newConfig); KnoxContainerManager.createContainer("custom4");
On this page
Is this page helpful?