Adding generalizations to android-operations bar

revert-dabc3590
Ace 8 years ago
parent d2933087e3
commit 8a96aa204c

@ -16,7 +16,8 @@
under the License. under the License.
}} }}
{{#if control_operations}} {{#if control_operations}}
<div class="wr-operations" style="height: 87px; display: block;"> <div class="wr-operations" style="height: 87px; display: block;"
xmlns="http://www.w3.org/1999/html">
<style> <style>
::-webkit-input-placeholder { ::-webkit-input-placeholder {
color: #B8B8B8; color: #B8B8B8;
@ -55,7 +56,7 @@
<h3> <h3>
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-service fw-stack-1x"></i> <i class="fw {{iconFont}} fw-stack-1x"></i>
</span> </span>
{{name}} {{name}}
<br> <br>
@ -68,7 +69,9 @@
<form action="{{params.0.uri}}" method="{{params.0.method}}" <form action="{{params.0.uri}}" method="{{params.0.method}}"
style="padding-bottom: 20px;" style="padding-bottom: 20px;"
data-payload="{{payload}}" id="form-{{operation}}" data-payload="{{payload}}" id="form-{{operation}}"
data-device-id="{{../device.deviceIdentifier}}"> data-device-id="{{../device.deviceIdentifier}}"
data-content-type="{{params.0.contentType}}"
data-operation-code="{{operation}}">
{{#each params.0.pathParams}} {{#each params.0.pathParams}}
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="path" value="{{value}}" /> <input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="path" value="{{value}}" />
<br /> <br />
@ -81,6 +84,22 @@
<input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="query" value="{{value}}" /> <input type="{{type}}" id="{{name}}" placeholder="{{name}}" class="form-control" data-param-type="query" value="{{value}}" />
<br /> <br />
{{/each}} {{/each}}
{{#each uiParams}}
{{#equal this.type "checkbox"}}
<input type="{{this.type}}" id="{{this.id}}"
class="checkbox"
placeholder="{{this.label}}"
data-param-type="form"/>
{{this.label}}
<br/>
{{/equal}}
{{#equal this.type "text"}}
<input type="{{this.type}}" id="{{this.id}}"
placeholder="{{this.label}}" class="form-control"
data-param-type="form" value=""/>
<br/>
{{/equal}}
{{/each}}
<button id="btnSend" type="button" onclick="submitForm('form-{{operation}}')" class="btn btn-default">&nbsp;&nbsp;&nbsp;&nbsp;Send <button id="btnSend" type="button" onclick="submitForm('form-{{operation}}')" class="btn btn-default">&nbsp;&nbsp;&nbsp;&nbsp;Send
to Device&nbsp;&nbsp;&nbsp;&nbsp;</button> to Device&nbsp;&nbsp;&nbsp;&nbsp;</button>
<label id="lblSending" class="wr-input-label hidden"><i <label id="lblSending" class="wr-input-label hidden"><i

@ -28,13 +28,14 @@ function onRequest(context) {
var pathParams = []; var pathParams = [];
for (var i = 0; i < controlOperations.length; i++) { for (var i = 0; i < controlOperations.length; i++) {
var currentParamList = controlOperations[i]["params"]; var currentParamList = controlOperations[i]["params"];
var uiParamList = controlOperations[i]["uiParams"];
for (var j = 0; j < currentParamList.length; j++) { for (var j = 0; j < currentParamList.length; j++) {
var currentParam = currentParamList[j]; var currentParam = currentParamList[j];
currentParamList[j]["formParams"] = processParams(currentParam["formParams"], autoCompleteParams); currentParamList[j]["formParams"] = processParams(currentParam["formParams"], autoCompleteParams);
currentParamList[j]["queryParams"] = processParams(currentParam["queryParams"], autoCompleteParams); currentParamList[j]["queryParams"] = processParams(currentParam["queryParams"], autoCompleteParams);
currentParamList[j]["pathParams"] = processParams(currentParam["pathParams"], autoCompleteParams); currentParamList[j]["pathParams"] = processParams(currentParam["pathParams"], autoCompleteParams);
} }
controlOperations[i]["params"] = currentParamList; controlOperations[i]["uiParams"] = uiParamList;
if (encodedFeaturePayloads) { if (encodedFeaturePayloads) {
controlOperations[i]["payload"] = getPayload(encodedFeaturePayloads, controlOperations[i]["operation"]); controlOperations[i]["payload"] = getPayload(encodedFeaturePayloads, controlOperations[i]["operation"]);
} }

@ -31,6 +31,8 @@ function submitForm(formId) {
var form = $("#" + formId); var form = $("#" + formId);
var uri = form.attr("action"); var uri = form.attr("action");
var deviceId = form.data("device-id"); var deviceId = form.data("device-id");
var contentType = form.data("content-type");
var operationCode = form.data("operation-code");
var uriencodedQueryStr = ""; var uriencodedQueryStr = "";
var uriencodedFormStr = ""; var uriencodedFormStr = "";
var payload = {}; var payload = {};
@ -44,21 +46,18 @@ function submitForm(formId) {
} else if (input.data("param-type") == "form") { } else if (input.data("param-type") == "form") {
var prefix = (uriencodedFormStr == "") ? "" : "&"; var prefix = (uriencodedFormStr == "") ? "" : "&";
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val(); uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
//payload[input.attr("id")] = input.val(); if(input.attr("type") == "text"){
payload[input.attr("id")] = input.val();
} else if(input.attr("type") == "checkbox"){
payload[input.attr("id")] = input.is(":checked");
}
} }
}); });
uri += uriencodedQueryStr; uri += uriencodedQueryStr;
var httpMethod = form.attr("method").toUpperCase(); var httpMethod = form.attr("method").toUpperCase();
var contentType = form.attr("enctype"); //var contentType = form.attr("enctype");
console.log("URL "+uri);
console.log("Method "+httpMethod);
console.log("Content Type "+contentType);
var featurePayload = form.attr("data-payload");
if (featurePayload) {
contentType = "application/json";
payload = JSON.parse(atob(featurePayload));
} else if (contentType == undefined || contentType.isEmpty()) { if (contentType == undefined || contentType == "") {
contentType = "application/x-www-form-urlencoded"; contentType = "application/x-www-form-urlencoded";
payload = uriencodedFormStr; payload = uriencodedFormStr;
} }
@ -101,9 +100,9 @@ function submitForm(formId) {
if (httpMethod == "GET") { if (httpMethod == "GET") {
invokerUtil.get(uri, successCallBack, errorCallBack, contentType); invokerUtil.get(uri, successCallBack, errorCallBack, contentType);
} else if (httpMethod == "POST") { } else if (httpMethod == "POST") {
console.log("------ cType "+contentType); var deviceList = [deviceId];
var payloadTest = [deviceId]; payload = generatePayload(operationCode, payload, deviceList);
invokerUtil.post(uri, payloadTest, successCallBack, errorCallBack, "application/json"); invokerUtil.post(uri, payload, successCallBack, errorCallBack, contentType);
} else if (httpMethod == "PUT") { } else if (httpMethod == "PUT") {
invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType); invokerUtil.put(uri, payload, successCallBack, errorCallBack, contentType);
} else if (httpMethod == "DELETE") { } else if (httpMethod == "DELETE") {
@ -144,3 +143,261 @@ $(document).on('submit', 'form', function (e) {
lblSent.addClass('hidden'); lblSent.addClass('hidden');
}); });
}); });
// Constants to define operation types available
var operationTypeConstants = {
"PROFILE": "profile",
"CONFIG": "config",
"COMMAND": "command"
};
var generatePayload = function (operationCode, operationData, deviceList) {
var payload;
var operationType;
switch (operationCode) {
case androidOperationConstants["CAMERA_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"CAMERA" : operationData["cameraEnabled"],
"DISALLOW_ADJUST_VOLUME" : operationData["disallowAdjustVolumeEnabled"],
"DISALLOW_CONFIG_BLUETOOTH" : operationData["disallowConfigBluetooth"],
"DISALLOW_CONFIG_CELL_BROADCASTS" : operationData["disallowConfigCellBroadcasts"],
"DISALLOW_CONFIG_CREDENTIALS" : operationData["disallowConfigCredentials"],
"DISALLOW_CONFIG_MOBILE_NETWORKS" : operationData["disallowConfigMobileNetworks"],
"DISALLOW_CONFIG_TETHERING" : operationData["disallowConfigTethering"],
"DISALLOW_CONFIG_VPN" : operationData["disallowConfigVpn"],
"DISALLOW_CONFIG_WIFI" : operationData["disallowConfigWifi"],
"DISALLOW_APPS_CONTROL" : operationData["disallowAppControl"],
"DISALLOW_CREATE_WINDOWS" : operationData["disallowCreateWindows"],
"DISALLOW_CROSS_PROFILE_COPY_PASTE" : operationData["disallowCrossProfileCopyPaste"],
"DISALLOW_DEBUGGING_FEATURES" : operationData["disallowDebugging"],
"DISALLOW_FACTORY_RESET" : operationData["disallowFactoryReset"],
"DISALLOW_ADD_USER" : operationData["disallowAddUser"],
"DISALLOW_INSTALL_APPS" : operationData["disallowInstallApps"],
"DISALLOW_INSTALL_UNKNOWN_SOURCES" : operationData["disallowInstallUnknownSources"],
"DISALLOW_MODIFY_ACCOUNTS" : operationData["disallowModifyAccounts"],
"DISALLOW_MOUNT_PHYSICAL_MEDIA" : operationData["disallowMountPhysicalMedia"],
"DISALLOW_NETWORK_RESET" : operationData["disallowNetworkReset"],
"DISALLOW_OUTGOING_BEAM" : operationData["disallowOutgoingBeam"],
"DISALLOW_OUTGOING_CALLS" : operationData["disallowOutgoingCalls"],
"DISALLOW_REMOVE_USER" : operationData["disallowRemoveUser"],
"DISALLOW_SAFE_BOOT" : operationData["disallowSafeBoot"],
"DISALLOW_SHARE_LOCATION" : operationData["disallowLocationSharing"],
"DISALLOW_SMS" : operationData["disallowSMS"],
"DISALLOW_UNINSTALL_APPS" : operationData["disallowUninstallApps"],
"DISALLOW_UNMUTE_MICROPHONE" : operationData["disallowUnmuteMicrophone"],
"DISALLOW_USB_FILE_TRANSFER" : operationData["disallowUSBFileTransfer"],
"ALLOW_PARENT_PROFILE_APP_LINKING" : operationData["disallowParentProfileAppLinking"],
"ENSURE_VERIFY_APPS" : operationData["ensureVerifyApps"],
"AUTO_TIME" : operationData["enableAutoTime"],
"SET_SCREEN_CAPTURE_DISABLED" : operationData["disableScreenCapture"],
"SET_STATUS_BAR_DISABLED" : operationData["disableStatusBar"]
}
};
break;
case androidOperationConstants["CHANGE_LOCK_CODE_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"lockCode" : operationData["lockCode"]
}
};
break;
case androidOperationConstants["ENCRYPT_STORAGE_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"encrypted" : operationData["encryptStorageEnabled"]
}
};
break;
case androidOperationConstants["NOTIFICATION_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
//"message" : operationData["message"]
"messageText": operationData["messageText"],
"messageTitle": operationData["messageTitle"]
}
};
break;
case androidOperationConstants["UPGRADE_FIRMWARE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"schedule" : operationData["schedule"],
"server" : operationData["server"]
}
};
break;
case androidOperationConstants["WIPE_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"pin" : operationData["pin"]
}
};
break;
case androidOperationConstants["WIFI_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"ssid": operationData["wifiSSID"],
"type": operationData["wifiType"],
"password" : operationData["wifiPassword"],
"eap" : operationData["wifiEAP"],
"phase2" : operationData["wifiPhase2"],
"provisioning" : operationData["wifiProvisioning"],
"identity" : operationData["wifiIdentity"],
"anonymousIdentity" : operationData["wifiAnoIdentity"],
"cacert" : operationData["wifiCaCert"],
"cacertName" : operationData["wifiCaCertName"]
}
};
break;
case androidOperationConstants["VPN_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"serverAddress": operationData["serverAddress"],
"serverPort": operationData["serverPort"],
"sharedSecret": operationData["sharedSecret"],
"dnsServer": operationData["dnsServer"]
}
};
break;
case androidOperationConstants["LOCK_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"message" : operationData["lock-message"],
"isHardLockEnabled" : operationData["hard-lock"]
}
};
break;
case androidOperationConstants["WORK_PROFILE_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"profileName": operationData["workProfilePolicyProfileName"],
"enableSystemApps": operationData["workProfilePolicyEnableSystemApps"],
"hideSystemApps": operationData["workProfilePolicyHideSystemApps"],
"unhideSystemApps": operationData["workProfilePolicyUnhideSystemApps"],
"enablePlaystoreApps": operationData["workProfilePolicyEnablePlaystoreApps"]
}
};
break;
case androidOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"allowSimple": operationData["passcodePolicyAllowSimple"],
"requireAlphanumeric": operationData["passcodePolicyRequireAlphanumeric"],
"minLength": operationData["passcodePolicyMinLength"],
"minComplexChars": operationData["passcodePolicyMinComplexChars"],
"maxPINAgeInDays": operationData["passcodePolicyMaxPasscodeAgeInDays"],
"pinHistory": operationData["passcodePolicyPasscodeHistory"],
"maxFailedAttempts": operationData["passcodePolicyMaxFailedAttempts"]
}
};
break;
case androidOperationConstants["APPLICATION_OPERATION_CODE"]:
payload = {
"operation": {
"restriction-type": operationData["restrictionType"],
"restricted-applications": operationData["restrictedApplications"]
}
};
break;
case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]:
operationType = operationTypeConstants["PROFILE"];
if (operationData["cosuSystemUpdatePolicyType"] != "window") {
payload = {
"operation": {
"type": operationData["cosuSystemUpdatePolicyType"]
}
};
} else {
payload = {
"operation": {
"type": operationData["cosuSystemUpdatePolicyType"],
"startTime": operationData["cosuSystemUpdatePolicyWindowStartTime"],
"endTime": operationData["cosuSystemUpdatePolicyWindowEndTime"]
}
};
}
break;
case androidOperationConstants["KIOSK_APPS_CODE"]:
operationType = operationTypeConstants["PROFILE"];
payload = {
"operation": {
"whitelistedApplications": operationData["cosuWhitelistedApplications"]
}
};
break;
default:
// If the operation is neither of above, it is a command operation
operationType = operationTypeConstants["COMMAND"];
// Operation payload of a command operation is simply an array of device IDs
payload = deviceList;
}
if (operationType == operationTypeConstants["PROFILE"] && deviceList) {
payload["deviceIDs"] = deviceList;
}
return payload;
};
// Constants to define Android Operation Constants
var androidOperationConstants = {
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
"VPN_OPERATION_CODE": "VPN",
"CAMERA_OPERATION_CODE": "CAMERA",
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
"WIFI_OPERATION_CODE": "WIFI",
"WIPE_OPERATION_CODE": "WIPE_DATA",
"NOTIFICATION_OPERATION_CODE": "NOTIFICATION",
"WORK_PROFILE_CODE": "WORK_PROFILE",
"CHANGE_LOCK_CODE_OPERATION_CODE": "CHANGE_LOCK_CODE",
"LOCK_OPERATION_CODE": "DEVICE_LOCK",
"UPGRADE_FIRMWARE": "UPGRADE_FIRMWARE",
"DISALLOW_ADJUST_VOLUME": "DISALLOW_ADJUST_VOLUME",
"DISALLOW_CONFIG_BLUETOOTH" : "DISALLOW_CONFIG_BLUETOOTH",
"DISALLOW_CONFIG_CELL_BROADCASTS" : "DISALLOW_CONFIG_CELL_BROADCASTS",
"DISALLOW_CONFIG_CREDENTIALS" : "DISALLOW_CONFIG_CREDENTIALS",
"DISALLOW_CONFIG_MOBILE_NETWORKS" : "DISALLOW_CONFIG_MOBILE_NETWORKS",
"DISALLOW_CONFIG_TETHERING" : "DISALLOW_CONFIG_TETHERING",
"DISALLOW_CONFIG_VPN" : "DISALLOW_CONFIG_VPN",
"DISALLOW_CONFIG_WIFI" : "DISALLOW_CONFIG_WIFI",
"DISALLOW_APPS_CONTROL" : "DISALLOW_APPS_CONTROL",
"DISALLOW_CREATE_WINDOWS" : "DISALLOW_CREATE_WINDOWS",
"DISALLOW_CROSS_PROFILE_COPY_PASTE" : "DISALLOW_CROSS_PROFILE_COPY_PASTE",
"DISALLOW_DEBUGGING_FEATURES" : "DISALLOW_DEBUGGING_FEATURES",
"DISALLOW_FACTORY_RESET" : "DISALLOW_FACTORY_RESET",
"DISALLOW_ADD_USER" : "DISALLOW_ADD_USER",
"DISALLOW_INSTALL_APPS" : "DISALLOW_INSTALL_APPS",
"DISALLOW_INSTALL_UNKNOWN_SOURCES" : "DISALLOW_INSTALL_UNKNOWN_SOURCES",
"DISALLOW_MODIFY_ACCOUNTS" : "DISALLOW_MODIFY_ACCOUNTS",
"DISALLOW_MOUNT_PHYSICAL_MEDIA" : "DISALLOW_MOUNT_PHYSICAL_MEDIA",
"DISALLOW_NETWORK_RESET" : "DISALLOW_NETWORK_RESET",
"DISALLOW_OUTGOING_BEAM" : "DISALLOW_OUTGOING_BEAM",
"DISALLOW_OUTGOING_CALLS" : "DISALLOW_OUTGOING_CALLS",
"DISALLOW_REMOVE_USER" : "DISALLOW_REMOVE_USER",
"DISALLOW_SAFE_BOOT" : "DISALLOW_SAFE_BOOT",
"DISALLOW_SHARE_LOCATION" : "DISALLOW_SHARE_LOCATION",
"DISALLOW_SMS" : "DISALLOW_SMS",
"DISALLOW_UNINSTALL_APPS" : "DISALLOW_UNINSTALL_APPS",
"DISALLOW_UNMUTE_MICROPHONE" : "DISALLOW_UNMUTE_MICROPHONE",
"DISALLOW_USB_FILE_TRANSFER" : "DISALLOW_USB_FILE_TRANSFER",
"ALLOW_PARENT_PROFILE_APP_LINKING" : "ALLOW_PARENT_PROFILE_APP_LINKING",
"ENSURE_VERIFY_APPS" : "ENSURE_VERIFY_APPS",
"AUTO_TIME" : "AUTO_TIME",
"SET_SCREEN_CAPTURE_DISABLED" : "SET_SCREEN_CAPTURE_DISABLED",
"SET_STATUS_BAR_DISABLED" : "SET_STATUS_BAR_DISABLED",
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION",
"SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY",
"KIOSK_APPS_CODE": "KIOSK_APPS"
};

@ -9,7 +9,20 @@
"icon": "fw-dial-up" "icon": "fw-dial-up"
}, },
"DEVICE_LOCK": { "DEVICE_LOCK": {
"icon" : "fw-lock" "icon": "fw-lock",
"formParams": [
{
"type": "text",
"id": "lock-message",
"optional": true,
"label": "Message to be sent to the device"
},{
"type": "checkbox",
"id": "hard-lock",
"optional": true,
"label": "Hard lock enabled"
}
]
}, },
"DEVICE_LOCATION": { "DEVICE_LOCATION": {
"icon": "fw-map-location" "icon": "fw-map-location"
@ -21,25 +34,74 @@
"icon": "fw-refresh" "icon": "fw-refresh"
}, },
"UPGRADE_FIRMWARE": { "UPGRADE_FIRMWARE": {
"icon" : "fw-hardware" "icon": "fw-hardware",
"formParams": [
{
"type": "checkbox",
"id": "immediate",
"optional": true,
"label": "Instant Upgrade",
"helper": "Once enabled, device firmware upgrade process will start instantly."
},
{
"type": "text",
"id": "schedule",
"optional": false,
"label": "Enter the date and time to schedule firmware upgrade."
},
{
"type": "text",
"id": "server",
"optional": true,
"label": "Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota)"
}
]
}, },
"DEVICE_MUTE": { "DEVICE_MUTE": {
"icon": "fw-mute" "icon": "fw-mute"
}, },
"NOTIFICATION": { "NOTIFICATION": {
"icon" : "fw-message" "icon": "fw-message",
"formParams": [
{
"type": "text",
"id": "messageText",
"optional": false,
"label": "Title Here..."
},
{
"type": "text",
"id": "messageTitle",
"optional": false,
"label": "Message Here..."
}
]
}, },
"CHANGE_LOCK_CODE": { "CHANGE_LOCK_CODE": {
"icon" : "fw-security" "icon": "fw-security",
"formParams": [
{
"type": "text",
"id": "lockCode",
"optional": false,
"label": "Lock Code"
}
]
}, },
"ENTERPRISE_WIPE": { "ENTERPRISE_WIPE": {
"icon": "fw-block" "icon": "fw-block"
}, },
"WIPE_DATA": { "WIPE_DATA": {
"icon" : "fw-delete" "icon": "fw-delete",
"formParams": [
{
"type": "text",
"id": "pin",
"optional": false,
"label": "Enter PIN code* of the device."
}
]
} }
} }
} }
} }

@ -61,86 +61,67 @@
<Feature code="DEVICE_RING"> <Feature code="DEVICE_RING">
<Name>Ring</Name> <Name>Ring</Name>
<Description>Ring the device</Description> <Description>Ring the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/ring" method="POST"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/ring" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_LOCK"> <Feature code="DEVICE_LOCK">
<Name>Device Lock</Name> <Name>Device Lock</Name>
<Description>Lock the device</Description> <Description>Lock the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/lock-devices" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/lock-devices" method="POST" type="application/json">
<FormParameters>
<Parameter id="message" optional="true" type="text">Message to be sent to the device</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_LOCATION"> <Feature code="DEVICE_LOCATION">
<Name>Location</Name> <Name>Location</Name>
<Description>Request coordinates of device location</Description> <Description>Request coordinates of device location</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/location" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/location" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="CLEAR_PASSWORD"> <Feature code="CLEAR_PASSWORD">
<Name>Clear Password</Name> <Name>Clear Password</Name>
<Description>Clear current password</Description> <Description>Clear current password</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/clear-password" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/clear-password" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_REBOOT"> <Feature code="DEVICE_REBOOT">
<Name>Reboot</Name> <Name>Reboot</Name>
<Description>Reboot the device</Description> <Description>Reboot the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/reboot" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/reboot" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="UPGRADE_FIRMWARE"> <Feature code="UPGRADE_FIRMWARE">
<Name>Upgrade Firmware</Name> <Name>Upgrade Firmware</Name>
<Description>Upgrade Firmware</Description> <Description>Upgrade Firmware</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/upgrade-firmware" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/upgrade-firmware" method="POST" type="application/json">
<FormParameters>
<Parameter id="immediate" optional="true" type="check" helper-text="Once enabled, device firmware upgrade process will start instantly.">Instant Upgrade</Parameter>
<Parameter id="schedule" optional="false" type="text">Enter the date and time to schedule firmware upgrade.</Parameter>
<Parameter id="server" optional="true" type="text">Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota) (Optional).</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="DEVICE_MUTE"> <Feature code="DEVICE_MUTE">
<Name>Mute</Name> <Name>Mute</Name>
<Description>Enable mute in the device</Description> <Description>Enable mute in the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/mute" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/mute" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="NOTIFICATION"> <Feature code="NOTIFICATION">
<Name>Message</Name> <Name>Message</Name>
<Description>Send message</Description> <Description>Send message</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/send-notification" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/send-notification" method="POST" type="application/json">
<FormParameters>
<Parameter id="messageText" optional="false" type="text">Title Here...</Parameter>
<Parameter id="messageTitle" optional="false" type="text-area">Message Here...</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="CHANGE_LOCK_CODE"> <Feature code="CHANGE_LOCK_CODE">
<Name>Change Lock-code</Name> <Name>Change Lock-code</Name>
<Description>Change current lock code</Description> <Description>Change current lock code</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/change-lock-code" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/change-lock-code" method="POST" type="application/json">
<FormParameters>
<Parameter id="lockCode" optional="false" type="text">Lock Code</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="ENTERPRISE_WIPE"> <Feature code="ENTERPRISE_WIPE">
<Name>Enterprise Wipe</Name> <Name>Enterprise Wipe</Name>
<Description>Remove enterprise applications</Description> <Description>Remove enterprise applications</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/enterprise-wipe" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/enterprise-wipe" method="POST" type="application/json">
</Operation> </Operation>
</Feature> </Feature>
<Feature code="WIPE_DATA"> <Feature code="WIPE_DATA">
<Name>Wipe Data</Name> <Name>Wipe Data</Name>
<Description>Factory reset the device</Description> <Description>Factory reset the device</Description>
<Operation context="/api/device-mgt/android/v1.0/admin/devices/wipe" method="POST" conent-type="application/json"> <Operation context="/api/device-mgt/android/v1.0/admin/devices/wipe" method="POST" type="application/json">
<FormParameters>
<!-- Needs to be converted to a unit -->
<Parameter id="pin" optional="false" type="text">Enter PIN code* of the device.</Parameter>
</FormParameters>
</Operation> </Operation>
</Feature> </Feature>
<Feature code="WIFI"> <Feature code="WIFI">
@ -328,20 +309,5 @@
<Description>Unlock the device</Description> <Description>Unlock the device</Description>
</Feature> </Feature>
</Features> </Features>
<TaskConfiguration>
<Operations>
<Operation>
<Name>DEVICE_INFO</Name>
<RecurrentTimes>1</RecurrentTimes>
</Operation>
<Operation>
<Name>APPLICATION_LIST</Name>
<RecurrentTimes>5</RecurrentTimes>
</Operation>
<Operation>
<Name>DEVICE_LOCATION</Name>
<RecurrentTimes>1</RecurrentTimes>
</Operation>
</Operations>
</TaskConfiguration>
</DeviceTypeConfiguration> </DeviceTypeConfiguration>
Loading…
Cancel
Save