diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/asset/androidsense.apk similarity index 100% rename from features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk rename to components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/asset/androidsense.apk diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/js/download.js b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/js/download.js index f963c0e0c..250d07109 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/js/download.js +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/public/js/download.js @@ -56,14 +56,6 @@ function showPopup() { deviceType = this.value; } }); - if (deviceType == 'virtual_firealarm') { - $('.sketchType').remove(); - $('input[name="sketchType"][value="virtual_firealarm"]').prop('checked', true); - $("label[for='virtual_firealarm']").text("Simple Agent"); - $("label[for='virtual_firealarm_advanced']").text("Advanced Agent"); - } else { - $('.sketchTypes').remove(); - } } /* @@ -90,10 +82,6 @@ function attachEvents() { * on Device Management page in WSO2 DC Console. */ $("a.download-link").click(function () { - var sketchType = $(this).data("sketchtype"); - var deviceType = $(this).data("devicetype"); - var downloadDeviceAPI = "/devicemgt/api/devices/sketch/generate_link"; - var payload = {"sketchType": sketchType, "deviceType": deviceType}; $(modalPopupContent).html($('#download-device-modal-content').html()); showPopup(); var deviceName; @@ -104,29 +92,6 @@ function attachEvents() { } }); $('label[for=deviceName]').remove(); - if (deviceName && deviceName.length >= 4) { - payload.deviceName = deviceName; - invokerUtil.post( - downloadDeviceAPI, - payload, - function (data, textStatus, jqxhr) { - doAction(data); - }, - function (data) { - doAction(data); - } - ); - } else if (deviceName) { - $('.controls').append(''); - $('.control-group').removeClass('success').addClass('error'); - } else { - $('.controls').append(''); - $('.control-group').removeClass('success').addClass('error'); - } }); $("a#download-device-cancel-link").click(function () { @@ -134,47 +99,4 @@ function attachEvents() { }); }); -} - -//Device owner removed. -function downloadAgent() { - $('#downloadForm').submit(); - hidePopup(); - $(modalPopupContent).html($('#device-agent-downloading-content').html()); - showPopup(); - setTimeout(function () { - hidePopup(); - }, 1000); -} - -function doAction(data) { - //if it is saml redirection response - if (data.status == null) { - document.write(data); - } - if (data.status == "200") { - $(modalPopupContent).html($('#download-device-modal-content-links').html()); - $("input#download-device-url").val(data.responseText); - $("input#download-device-url").focus(function () { - $(this).select(); - }); - showPopup(); - } else if (data.status == "401") { - $(modalPopupContent).html($('#device-401-content').html()); - $("#device-401-link").click(function () { - window.location = "/devicemgt/login"; - }); - showPopup(); - } else if (data == "403") { - $(modalPopupContent).html($('#device-403-content').html()); - $("#device-403-link").click(function () { - window.location = "/devicemgt/login"; - }); - showPopup(); - } else { - $(modalPopupContent).html($('#device-unexpected-error-content').html()); - $("a#device-unexpected-error-link").click(function () { - hidePopup(); - }); - } } \ No newline at end of file diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs index 6548564fa..09c98431b 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.hbs @@ -1,231 +1,68 @@
-

Android Sense

+

Android Mobile


-
- +
- +
+

What it Does


-

Connect an Android device to WSO2 IoT Server and visualize sensor - data.

+

Connect and manage your Android device with WSO2 IoT Server.


+

What You Need


-

You should have an Android Device to get started.


- - Enroll Device -

- - - -
- -
- -
- -
-
- -
+ Enroll Device -
- -
- -
- -


-
-

Prepare

-
+
+

Prepare



+
-

Try Out

-
- -

Click on the image to zoom

- - + +
- -
-
- + .doc-link a { + color: white; + } + +{{/zone}} {{#zone "bottomJs"}} - {{js "/js/download.js"}} - {{js "/js/jquery.validate.js"}} -{{/zone}} +{{/zone}} \ No newline at end of file diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.js b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.js index 6f277602a..ad4f0ec9c 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.js +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view/type-view.js @@ -18,9 +18,7 @@ function onRequest(context){ var viewModel = {}; - var process = require("process"); - var serverIP = process.getProperty("carbon.local.ip"); - var serverPort = process.getProperty("carbon.http.port"); - viewModel.enrollmentURL = "http://"+serverIP+":"+serverPort+"/android_sense_mgt/manager/device/android_sense/download/"; + var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); + viewModel.hostName = devicemgtProps["httpsURL"]; return viewModel; } \ No newline at end of file diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/sketch.properties b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/sketch.properties deleted file mode 100644 index aefe1a60b..000000000 --- a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/sketch.properties +++ /dev/null @@ -1,2 +0,0 @@ -templates=androidsense.apk -zipfilename=androidsense.zip \ No newline at end of file