Class Overview
This class supports MDM(EMM) to create a workspace(container) protected with UCM DAR.
Usage
Following code snippet represents how an MDM Agent shall create a UCM DAR container
// Create Android For Work manage provisioning intent
Intent intent = new Intent(DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE);
intent.putExtra(DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME, EDMAppAdmin.getComponentName(mContext));
// Create UCM DAR configuration bundle
PersistableBundle ucmConfig = new PersistableBundle();
ucmConfig.putBoolean(UCMPolicy.KEY_UCM_CONFIG, true);
ucmConfig.putString(UCMPolicy.UCM_KEY_CONFIG_CLIENT_PACKAGE, "<plugin_package_name>");
ucmConfig.putString(UCMPolicy.UCM_KEY_CONFIG_CLIENT_LOCATION, "<plugin_download_location>");
ucmConfig.putString(UCMPolicy.UCM_KEY_CONFIG_CLIENT_SIGNATURE, "<plugin_signature>");
intent.putExtra(android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE, ucmConfig);
// Start workspace provisioning
startActivityForResult(intent, RESULT_PROVISION_MANAGED_PROFILE);
UCM_KEY_CONFIG_CLIENT_SIGNATURE is optional.
NOTE: This class is only applicable to UCM DAR enabled workspace.
|
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
String
KEY_UCM_CONFIG
Since: API level
Used to mark workspace(container) for UCM DAR protection during creation time.
Constant Value:
"ucm-config"
public
static
final
String
UCM_KEY_CONFIG_CLIENT_LOCATION
Since: API level
Used to set package name of UCM plugin during workspace(container) creation time.
Constant Value:
"ucm-config-client-location"
public
static
final
String
UCM_KEY_CONFIG_CLIENT_PACKAGE
Since: API level
Used to set signature of UCM plugin during workspace(container) creation time.
Constant Value:
"ucm-config-client-package"
public
static
final
String
UCM_KEY_CONFIG_CLIENT_SIGNATURE
Since: API level
Used to set location of UCM plugin during workspace(container) creation time.
Usage
Used as a String param field in admin extras bundle passed as
DevicePolicyManager#EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE with
DevicePolicyManager#PROVISIONING_MODE_MANAGED_PROFILE extra value.
Client location should be an external storage(sdcard area) and should be passed with "file://" prefix.
// Create UCM DAR with configuration bundle
PersistableBundle adminExtras = new PersistableBundle();
adminExtras.putBoolean(UCMPolicy.KEY_UCM_CONFIG, true);
adminExtras.putString(UCMPolicy.UCM_KEY_CONFIG_CLIENT_PACKAGE, UCM_PLUGIN_PACKAGE_NAME);
adminExtras.putString(UCMPolicy.UCM_KEY_CONFIG_CLIENT_SIGNATURE, UCM_PLUGIN_SIGNATURE);
// Set the file path of the client exist location adding with "file://" prefix.
String UCM_CLIENT_PACKAGE_DOWNLOAD_LOCATION = getExternalFilesDir(null) + "/ucm_plugin.apk";
adminExtras.putString(UCMPolicy.KEY_CONFIG_CLIENT_LOCATION, "file://" + UCM_CLIENT_PACKAGE_DOWNLOAD_LOCATION);
// Param field in admin extras bundle passed as DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
Intent intent = new Intent();
intent.putExtra(DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE, adminExtras);
Note: To be used as bundle params key during container creation time. |
Constant Value:
"ucm-config-client-signature"