diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql index 3cdb2caf6..5eaa1a492 100755 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql @@ -153,5 +153,5 @@ select meta_owner, meta_deviceId, meta_timestamp, data_type as type, data_receiv insert into DataStream; from AndroidSense[meta_type == 'gps'] -select meta_deviceId ,meta_type as meta_deviceType, meta_timestamp as timeStamp, gps_lat as latitude, gps_long as longitude +select meta_deviceId ,'android_sense' as meta_deviceType, meta_timestamp as timeStamp, gps_lat as latitude, gps_long as longitude insert into geoLocationStream; \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs index f77a46de6..e680bf678 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs @@ -31,52 +31,48 @@ {{/zone}} {{#zone "device-details"}} + {{/zone}} {{#zone "device-view-tabs"}}
  • Device - Statistics + Statistics
  • -
  • Device Location
  • +
  • Device Location
  • {{/zone}} {{#zone "device-view-tab-contents"}}
    -
    Device Statistics
    {{unit "cdmf.unit.device.type.android_sense.realtime.analytics-view" device=device}}
    -
    Device Location
    -
    - {{unit "cdmf.unit.geo-dashboard" device=device}} - {{#if locationHistory}} -
    + {{#if locationEnabled}} +
    +
    +
    +
    +
    +
    + {{unit "cdmf.unit.geo-dashboard" device=device noGeoFencing=false hideSearch=true}}
    -
    - - - - - Add Geo Fencing - {{else}}

    - Device location information is not available. + Device location information is not available. Please check whether Geo Location Based Services is Enabled.

    {{/if}} -
    -
    {{/zone}} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js index a1a4d3aab..4e0dbb689 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js @@ -37,6 +37,7 @@ function onRequest(context) { viewObject.portalUrl = devicemgtProps['portalURL']; viewObject.anchor = encodeURI(JSON.stringify(anchor)); viewObject.locationHistory = stringify(device.content.locationHistory); + viewObject.locationEnabled = (device.content.locationHistory.length !== 0); return viewObject; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");