From 897b91452213dbfbd71f75eb0951c6cdebfe7352 Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Mon, 21 Dec 2015 13:38:38 +0530 Subject: [PATCH] Fixed light, proximity and pressure problem. --- .../iot/androidsense/service/impl/AndroidSenseService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java index 3003d898c1..8dbefa3d03 100644 --- a/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java +++ b/components/device-mgt-iot-androidsense/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java @@ -308,17 +308,17 @@ public class AndroidSenseService { case 5: streamDef = LIGHT_STREAM_DEFINITION; sensorName = SENSOR_LIGHT; - payloadData = new Float[]{Float.parseFloat(sensor.value)}; + payloadData = new Float[]{Float.parseFloat(valuesM[0])}; break; case 6: streamDef = PRESSURE_STREAM_DEFINITION; sensorName = SENSOR_PRESSURE; - payloadData = new Float[]{Float.parseFloat(sensor.value)}; + payloadData = new Float[]{Float.parseFloat(valuesM[0])}; break; case 8: streamDef = PROXIMITY_STREAM_DEFINITION; sensorName = SENSOR_PROXIMITY; - payloadData = new Float[]{Float.parseFloat(sensor.value)}; + payloadData = new Float[]{Float.parseFloat(valuesM[0])}; break; case 9: streamDef = GRAVITY_STREAM_DEFINITION;