mobicontrol.mdm

This namespace provides access to manufacturer-specific mobile device management configuration functionality.
Since:

Classes

MdmConfigurationError

Members

static, readonly ConfigurationStatusCode :object

This enumeration represents an error status code of mobicontrol.mdm.MdmConfigurationError.
Properties:
Name Type Description
UNKNOWN object No specific failure reason.
NOT_SUPPORTED object MDM configuration is not supported on this device.
MALFORMED_INPUT object The parameter doesn't conform with expected format.
Since:

Methods

static configure(configuration) → {string}

Configure the device via a manufacturer-specific mobile device management configuration string.

Some device manufacturers allow complex configurations or commands to be written in a markup language such as XML. These configurations can be submitted via this function. At present, only Zebra MX XML configurations are supported. These XML configurations can be created as described in Sending StageNow Profiles to Zebra Devices.

Parameters:
Name Type Description
configuration string The manufacturer-specific configuration string to be submitted to the device.
Throws:
Returns:
string - The manufacturer-specific response string.
Since:
Example
mobicontrol.log.info('MX version: ' + getMxVersion());

function getMxVersion() {
    var versionQuery = '<wap-provisioningdoc>' +
                       '    <characteristic type="MX">' +
                       '        <parm-query name="Version"/>' +
                       '    </characteristic>' +
                       '</wap-provisioningdoc>';
    var response = new XML(mobicontrol.mdm.configure(versionQuery));
    return response..parm.@value;
}

static getSetting(key) → {object}

Get a manufacturer-specific device setting for a key.

Some device manufacturers provide specific settings that don't fit into standard Android features. These settings can be obtained via this function. At present, only Castles settings are supported.

Parameters:
Name Type Description
key string The string identifying a manufacturer-specific setting.
Throws:
Returns:
object - The manufacturer-specific response object.
Since:
Example
var versions = mobicontrol.mdm.getSetting("castles.modules");
mobicontrol.log.info("Castles EMV version is " + versions.emv + ", EMVCL is " + versions.emvcl);

static setSetting(key, config)

Set a manufacturer-specific device setting for a key.

Some device manufacturers provide specific settings that don't fit into standard Android features. These settings can be set via this function. At present, only Castles settings are supported.

Parameters:
Name Type Description
key string The string identifying a manufacturer-specific setting.
config object The manufacturer-specific configuration object.
Throws:
Since:
Example
var userPassword = {
    oldPassword: "00000000",
    newPassword: "12341234"
}
mobicontrol.mdm.setSetting("castles.userPassword", userPassword);