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;