Menu

Contact Storage restrictions

The allowLocalContactStorage method allows IT admin to restrict a user from selecting their device as the default storage location for contact information. This allows you to:

  • Force the user to store and sync Work contacts on a corporate server, by removing the local option
  • Disable the default storage location on the mobile device.
 EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance(context);
 try {
  boolean allow = false; // disallow local contact storage
  if (ekm.getAdvancedRestrictionPolicy().allowLocalContactStorage(allow)) {
   Log.w(TAG, "Local contact storage is not allowed");
  } else {
   Log.w(TAG, "Failed to set the policy.");
  }
 } catch (SecurityException e) {
  Log.w(TAG, "Exception" + e);
 }

This provides extra security and control for the company. If a device is lost or stolen, contacts are:

  • Easily retrieved from the server with no interruption to the business.
  • No longer accessible by disrupting the server sync.

Here is an example of the device settings when this feature is turned on. Notice how the exchange server is selected as the default storage location and the Phone option is grayed out.

Contacts app in Personal / Contacts app in Workspace

To see if this feature is allowed, see the isLocalContactStorageAllowed API.

API Behavior

External storage set as default: As seen in the previous image, the local option is grayed out and the default configuration is not effected.

Local storage set as default:

  1. After the allowLocalContactStorage API is called, the local storage is grayed out.
  2. If Active Exchange was previously configured, then it is selected by default.
  3. If Active Exchange was not configured, then the default is set to the next account that was configured, such as Gmail, or other.
  4. If no accounts are configured then the API fails.

Known limitations

While this API provides the functionality to ensure a user cannot store contacts locally it does not provide the capabilities to preset other storage alternatives.